Skip to content

[parsimonious] Refine default_rule, grammar, and generic_visit types - #16772

Open
sumit-2007-git wants to merge 1 commit into
python:mainfrom
sumit-2007-git:fix/parsimonious-typing
Open

sumit-2007-git wants to merge 1 commit into
python:mainfrom
sumit-2007-git:fix/parsimonious-typing

Conversation

@sumit-2007-git

Copy link
Copy Markdown

Replaces remaining Incomplete annotations and completes NodeVisitor.generic_visit in parsimonious:

  • parsimonious/grammar.pyi: type Grammar.default_rule as Expression | None (matches Grammar.__init__, where first may be None when no string-based rules are provided) and remove unused Incomplete import.
  • parsimonious/nodes.pyi: type NodeVisitor.grammar as Grammar | None (defaults to None at runtime), annotate NodeVisitor.generic_visit return type as Any, and remove unused Incomplete import.
  • pyrightconfig.stricter.json: remove stubs/parsimonious/parsimonious/nodes.pyi from exclusions as all parsimonious stubs now pass strict pyright.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant