Skip to content

Itertools stubtest exception fixes / adjustments - #5211

Merged
srittau merged 6 commits into
python:masterfrom
hatal175:itertools
Apr 12, 2021
Merged

srittau merged 6 commits into
python:masterfrom
hatal175:itertools

Conversation

@hatal175

Copy link
Copy Markdown
Contributor
  1. Fixed itertools stubtest exceptions
  2. Mostly classes defined as functions (see Functions that are actually classes #5145)
  3. Did not fix product and combinations due to Tuple mypy issues. see Incompatible return type for overlapping signatures with regards to __new__ mypy#10313
  4. Tried to make count more accurate as it technically can accept anything that passes PyNumber_Check and has add. There also isn't a need to tie the start and step together type-wise.

@github-actions

Copy link
Copy Markdown
Contributor

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

sphinx (https://github.com/sphinx-doc/sphinx.git)
+ sphinx/pycode/parser.py: note: In member "add_entry" of class "VariableCommentPicker":
+ sphinx/pycode/parser.py:252:50: error: Incompatible types in assignment (expression has type "SupportsComplex", target has type "int")
+ sphinx/pycode/parser.py: note: At top level:

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@srittau
srittau merged commit 7adb021 into python:master Apr 12, 2021
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.

2 participants