Skip to content

[docutils] Add missing stubs for transforms dir #14234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

donBarbos
Copy link
Contributor

No description provided.

@donBarbos donBarbos marked this pull request as ready for review June 7, 2025 18:55
Copy link
Contributor

github-actions bot commented Jun 7, 2025

Diff from mypy_primer, showing the effect of this PR on open source code:

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/transforms/__init__.py:96: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/transforms/__init__.py: note: In member "apply" of class "ExtraTranslatableNodes":
+ sphinx/transforms/__init__.py:283:13: error: Unsupported target for indexed assignment ("Node")  [index]
+ sphinx/transforms/__init__.py: note: In member "visit_image" of class "SphinxContentsFilter":
+ sphinx/transforms/__init__.py:355:5: error: Return type "None" of "visit_image" incompatible with return type "Never" in supertype "ContentsFilter"  [override]
+ sphinx/transforms/__init__.py: note: In member "apply" of class "SphinxSmartQuotes":
+ sphinx/transforms/__init__.py:372:9: error: Cannot assign to class variable "smartquotes_action" via instance  [misc]
+ sphinx/transforms/__init__.py: note: At top level:
- sphinx/transforms/__init__.py:397:5: error: Return type "Iterator[tuple[str, str]]" of "get_tokens" incompatible with return type "Generator[tuple[str, str], None, None]" in supertype "SmartQuotes"  [override]
+ sphinx/transforms/__init__.py:397:5: error: Return type "Iterator[tuple[str, str]]" of "get_tokens" incompatible with return type "Generator[tuple[Literal['literal', 'plain'], str], None, None]" in supertype "SmartQuotes"  [override]
+ sphinx/transforms/__init__.py:397:26: error: Argument 1 of "get_tokens" is incompatible with supertype "SmartQuotes"; supertype defines the argument type as "Iterable[Node]"  [override]
+ sphinx/transforms/__init__.py:397:26: note: This violates the Liskov substitution principle
+ sphinx/transforms/__init__.py:397:26: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
+ sphinx/builders/latex/transforms.py:531: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/transforms/i18n.py: note: In member "apply" of class "PreserveTranslatableMessages":
+ sphinx/transforms/i18n.py:143:43: error: Only concrete class can be given where "type[translatable]" is expected  [type-abstract]
+ sphinx/builders/linkcheck.py: note: In member "run" of class "HyperlinkCollector":
+ sphinx/builders/linkcheck.py:216:37: error: Argument 1 to "find_uri" of "HyperlinkCollector" has incompatible type "Node"; expected "Element"  [arg-type]
+ sphinx/builders/linkcheck.py:217:36: error: Argument 2 to "_add_uri" of "HyperlinkCollector" has incompatible type "Node"; expected "Element"  [arg-type]

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