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

Fixes to curses stubs #6620

Merged
merged 6 commits into from
Dec 17, 2021
Merged

Fixes to curses stubs #6620

merged 6 commits into from
Dec 17, 2021

Conversation

JelleZijlstra
Copy link
Member

Fixes python/mypy#11768.

I reviewed all the function definitions in https://github.com/python/cpython/blob/3.9/Modules/_cursesmodule.c#L4152 and checked their types. I did not review the constants or the methods on the Window object.

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.

I trust your judgement, LGTM.

stdlib/_curses.pyi Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

JelleZijlstra added a commit to python/mypy that referenced this pull request Dec 17, 2021
JelleZijlstra added a commit to JelleZijlstra/tornado that referenced this pull request Dec 17, 2021
@github-actions
Copy link
Contributor

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

tornado (https://github.com/tornadoweb/tornado)
+ tornado/log.py:154: error: Argument 1 to "str" has incompatible type "Optional[bytes]"; expected "bytes"

mypy (https://github.com/python/mypy)
+ mypy/util.py:573: error: Item "None" of "Optional[bytes]" has no attribute "decode"  [union-attr]

@srittau srittau merged commit 183a43a into master Dec 17, 2021
@srittau srittau deleted the JelleZijlstra-patch-1 branch December 17, 2021 17:39
hauntsaninja pushed a commit to python/mypy that referenced this pull request Dec 17, 2021
hauntsaninja pushed a commit to hauntsaninja/mypy that referenced this pull request Dec 17, 2021
JukkaL pushed a commit to python/mypy that referenced this pull request Dec 20, 2021
Solves #11768 in the 0.930 branch

Found by python/typeshed#6620

Co-authored-by: hauntsaninja <>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
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.

Regression: crash in initialize_unix_colors in 0.920
2 participants