Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"stubs/openpyxl",
"stubs/opentracing/opentracing/span.pyi",
"stubs/paramiko/paramiko/_winapi.pyi",
"stubs/parsimonious/parsimonious/nodes.pyi",
"stubs/peewee",
"stubs/pexpect",
"stubs/pika/pika/adapters/twisted_connection.pyi",
Expand Down
3 changes: 1 addition & 2 deletions stubs/parsimonious/parsimonious/grammar.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import collections.abc
from _typeshed import Incomplete
from collections import OrderedDict
from collections.abc import Callable, Mapping
from typing import Any
Expand All @@ -9,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 | Incomplete
default_rule: Expression | None
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 = 0) -> Node: ...
Expand Down
5 changes: 2 additions & 3 deletions stubs/parsimonious/parsimonious/nodes.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from collections.abc import Callable, Iterator, Sequence
from re import Match
from typing import Any, Generic, TypeVar
Expand Down Expand Up @@ -35,10 +34,10 @@ _VisitResultT = TypeVar("_VisitResultT")
_ChildT = TypeVar("_ChildT")

class NodeVisitor(Generic[_VisitResultT], metaclass=RuleDecoratorMeta):
grammar: Grammar | Incomplete
grammar: Grammar | None
unwrapped_exceptions: tuple[type[BaseException], ...]
def visit(self, node: Node) -> _VisitResultT: ...
def generic_visit(self, node: Node, visited_children: Sequence[Any]): ...
def generic_visit(self, node: Node, visited_children: Sequence[Any]) -> Any: ...
def parse(self, text: str, pos: int = 0) -> _VisitResultT: ...
def match(self, text: str, pos: int = 0) -> _VisitResultT: ...
def lift_child(self, node: Node, children: Sequence[_ChildT]) -> _ChildT: ...
Expand Down
Loading