mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-20 07:19:46 +08:00
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:
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user