Manual changes of Any union to Incomplete in stubs folder (#9566)

- ClassVar[Any | None]
- Missed previous changes due to alias
- Manual review of leftover Any unions (`| Any` and `Any |`)
This commit is contained in:
Avasam
2023-02-02 09:48:41 -05:00
committed by GitHub
parent 95dc689b28
commit f1aede7162
12 changed files with 32 additions and 22 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import collections.abc
from _typeshed import Incomplete
from collections import OrderedDict
from collections.abc import Callable, Mapping
from typing import Any, NoReturn
@@ -7,7 +8,7 @@ from parsimonious.expressions import _CALLABLE_TYPE, Expression, Literal, Lookah
from parsimonious.nodes import Node, NodeVisitor
class Grammar(OrderedDict[str, Expression]):
default_rule: Expression | Any
default_rule: Expression | Incomplete
def __init__(self, rules: str = ..., **more_rules: Expression | _CALLABLE_TYPE) -> None: ...
def default(self, rule_name: str) -> Grammar: ...
def parse(self, text: str, pos: int = ...) -> Node: ...
+2 -1
View File
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from collections.abc import Callable, Iterator, Sequence
from re import Match
from typing import Any, NoReturn, TypeVar
@@ -27,7 +28,7 @@ class RegexNode(Node):
class RuleDecoratorMeta(type): ...
class NodeVisitor(metaclass=RuleDecoratorMeta):
grammar: Grammar | Any
grammar: Grammar | Incomplete
unwrapped_exceptions: tuple[type[BaseException], ...]
def visit(self, node: Node) -> Any: ...
def generic_visit(self, node: Node, visited_children: Sequence[Any]) -> NoReturn: ...