typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

improve type annotations in 'docutils.core'

Open danieleades opened this issue 1 year ago • 6 comments

danieleades avatar Mar 10 '24 07:03 danieleades

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/html/__init__.py:21: note: In module imported here:
+ sphinx/io.py:161:53: error: Missing type parameters for generic type "Publisher"  [type-arg]
+ sphinx/io.py:189:24: error: Incompatible types in assignment (expression has type "optparse.Values", variable has type "Optional[docutils.frontend.Values]")  [assignment]
+ sphinx/builders/__init__.py: note: In member "read_doc" of class "Builder":
+ sphinx/builders/__init__.py:491:9: error: Item "None" of "Optional[Values]" has no attribute "record_dependencies"  [union-attr]
+ sphinx/builders/__init__.py:508:37: error: Argument 2 to "write_doctree" of "Builder" has incompatible type "Optional[document]"; expected "document"  [arg-type]
+ sphinx/builders/__init__.py: note: At top level:
+ sphinx/builders/html/__init__.py:214:28: error: Incompatible types in assignment (expression has type "optparse.Values", variable has type "Optional[docutils.frontend.Values]")  [assignment]
- sphinx/builders/html/__init__.py:439: error: Unused "type: ignore" comment  [unused-ignore]

cwltool (https://github.com/common-workflow-language/cwltool)
+ note: In module imported here,
+ note: ... from here,
+ note: ... from here,
+ cwltool/software_requirements.py:32: note: ... from here:

github-actions[bot] avatar Mar 10 '24 07:03 github-actions[bot]

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/html/__init__.py:21: note: In module imported here:
+ sphinx/io.py:161:53: error: Missing type parameters for generic type "Publisher"  [type-arg]
+ sphinx/builders/__init__.py: note: In member "read_doc" of class "Builder":
+ sphinx/builders/__init__.py:491:9: error: Item "None" of "Optional[Values]" has no attribute "record_dependencies"  [union-attr]
+ sphinx/builders/__init__.py:508:37: error: Argument 2 to "write_doctree" of "Builder" has incompatible type "Optional[document]"; expected "document"  [arg-type]
+ sphinx/builders/__init__.py: note: At top level:
- sphinx/builders/html/__init__.py:439: error: Unused "type: ignore" comment  [unused-ignore]

cwltool (https://github.com/common-workflow-language/cwltool)
+ note: In module imported here,
+ note: ... from here,
+ note: ... from here,
+ cwltool/software_requirements.py:32: note: ... from here:

github-actions[bot] avatar Mar 12 '24 07:03 github-actions[bot]

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/html/__init__.py:21: note: In module imported here:
+ sphinx/io.py:161:53: error: Missing type parameters for generic type "Publisher"  [type-arg]
+ sphinx/builders/__init__.py: note: In member "read_doc" of class "Builder":
+ sphinx/builders/__init__.py:491:9: error: Item "None" of "Optional[Values]" has no attribute "record_dependencies"  [union-attr]
+ sphinx/builders/__init__.py:508:37: error: Argument 2 to "write_doctree" of "Builder" has incompatible type "Optional[document]"; expected "document"  [arg-type]
+ sphinx/builders/__init__.py: note: At top level:
- sphinx/builders/html/__init__.py:439: error: Unused "type: ignore" comment  [unused-ignore]

cwltool (https://github.com/common-workflow-language/cwltool)
+ note: In module imported here,
+ note: ... from here,
+ note: ... from here,
+ cwltool/software_requirements.py:32: note: ... from here:

github-actions[bot] avatar Mar 13 '24 14:03 github-actions[bot]

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/html/__init__.py:21: note: In module imported here:
+ sphinx/io.py:161:53: error: Missing type parameters for generic type "Publisher"  [type-arg]
+ sphinx/builders/__init__.py: note: In member "read_doc" of class "Builder":
+ sphinx/builders/__init__.py:491:9: error: Item "None" of "Optional[Values]" has no attribute "record_dependencies"  [union-attr]
+ sphinx/builders/__init__.py:508:37: error: Argument 2 to "write_doctree" of "Builder" has incompatible type "Optional[document]"; expected "document"  [arg-type]
+ sphinx/builders/__init__.py: note: At top level:
- sphinx/builders/html/__init__.py:439: error: Unused "type: ignore" comment  [unused-ignore]

cwltool (https://github.com/common-workflow-language/cwltool)
+ note: In module imported here,
+ note: ... from here,
+ note: ... from here,
+ cwltool/software_requirements.py:32: note: ... from here:

github-actions[bot] avatar Mar 13 '24 19:03 github-actions[bot]

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/html/__init__.py:21: note: In module imported here:
+ sphinx/io.py:161:53: error: Missing type parameters for generic type "Publisher"  [type-arg]
+ sphinx/builders/__init__.py: note: In member "read_doc" of class "Builder":
+ sphinx/builders/__init__.py:491:9: error: Item "None" of "Optional[Values]" has no attribute "record_dependencies"  [union-attr]
+ sphinx/builders/__init__.py:508:37: error: Argument 2 to "write_doctree" of "Builder" has incompatible type "Optional[document]"; expected "document"  [arg-type]
+ sphinx/builders/__init__.py: note: At top level:
- sphinx/builders/html/__init__.py:439: error: Unused "type: ignore" comment  [unused-ignore]

cwltool (https://github.com/common-workflow-language/cwltool)
+ note: In module imported here,
+ note: ... from here,
+ note: ... from here,
+ cwltool/software_requirements.py:32: note: ... from here:

github-actions[bot] avatar Mar 14 '24 14:03 github-actions[bot]

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/html/__init__.py:21: note: In module imported here:
+ sphinx/io.py:161:53: error: Missing type parameters for generic type "Publisher"  [type-arg]
+ sphinx/builders/__init__.py: note: In member "read_doc" of class "Builder":
+ sphinx/builders/__init__.py:491:9: error: Item "None" of "Optional[Values]" has no attribute "record_dependencies"  [union-attr]
+ sphinx/builders/__init__.py:508:37: error: Argument 2 to "write_doctree" of "Builder" has incompatible type "Optional[document]"; expected "document"  [arg-type]
+ sphinx/builders/__init__.py: note: At top level:
- sphinx/builders/html/__init__.py:439: error: Unused "type: ignore" comment  [unused-ignore]

cwltool (https://github.com/common-workflow-language/cwltool)
+ note: In module imported here,
+ note: ... from here,
+ note: ... from here,
+ cwltool/software_requirements.py:32: note: ... from here:

github-actions[bot] avatar Mar 16 '24 08:03 github-actions[bot]

This has a huge merge conflict; do we still need this PR?

JelleZijlstra avatar Dec 28 '24 04:12 JelleZijlstra