Skip to content
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

Fix new mypy error in blib2to3 #3674

Merged
merged 3 commits into from
May 3, 2023
Merged

Conversation

JelleZijlstra
Copy link
Collaborator

See python/mypy#15174

Description

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

@JelleZijlstra JelleZijlstra added the skip news Pull requests that don't need a changelog entry. label May 3, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

diff-shades reports zero changes comparing this PR (2601427) to main (e712e48).


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra
Copy link
Collaborator Author

Seems like there's a new crash on pandas code. Trying to reproduce it locally but no luck so far.

@JelleZijlstra
Copy link
Collaborator Author

Got it, reduced repro case:

print(
    f"Tried directories {str(rootdirs)} \
    but none started with prefix {parentdir_prefix}"
)

@JelleZijlstra
Copy link
Collaborator Author

I'm trying to understand now why mypy was fine with the old code. Ivan on the mypy PR said it was some special-casing for dict.update, but I can't find where that is, and on the playground I get an error as expected: https://mypy-play.net/?mypy=latest&python=3.7&flags=strict&gist=9acbef1e99c9355bb6ff87f5d318171b

@JelleZijlstra
Copy link
Collaborator Author

Seems like it's because the _combinations function is unannotated.

@JelleZijlstra JelleZijlstra merged commit a07871b into psf:main May 3, 2023
@JelleZijlstra JelleZijlstra deleted the dictup branch May 3, 2023 15:43
jsh9 added a commit to jsh9/cercis that referenced this pull request May 4, 2023
* Fix new mypy error in blib2to3 (psf#3674)

See python/mypy#15174

* blib2to3: add a few annotations (psf#3675)

---------

Co-authored-by: Jelle Zijlstra <[email protected]>
@JelleZijlstra JelleZijlstra restored the dictup branch September 10, 2024 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news Pull requests that don't need a changelog entry.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants