Skip to content

Conversation

FrancescElies
Copy link
Contributor

Adds explicit return types for 4 functions

@github-actions
Copy link
Contributor

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

pytest (https://github.com/pytest-dev/pytest)
+ testing/test_junitxml.py:1491: error: "Node" has no attribute "getAttribute"  [attr-defined]
+ testing/test_junitxml.py:1492: error: "Node" has no attribute "getAttribute"  [attr-defined]
+ testing/test_junitxml.py:1520: error: "Node" has no attribute "getAttribute"  [attr-defined]

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/cuda.py: note: In function "cuda_version_and_device_count":
+ cwltool/cuda.py:21:13: error: Item "Node" of "Optional[Node]" has no attribute "data"  [union-attr]
+ cwltool/cuda.py:21:13: error: Item "None" of "Optional[Node]" has no attribute "data"  [union-attr]

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new pytest primer hits are probably because getElementsByTagName should return NodeList[Element], instead of NodeList[Node]. The new cwltool hit seems to point to a genuine problem.

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.

3 participants