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

Overload bool.__new__ for Literal bools #10465

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Gobot1234
Copy link
Contributor

@Gobot1234 Gobot1234 commented Jul 15, 2023

Inspired by microsoft/pyright#5515
Closes #6069


Deferred because of: python/mypy#15687

@github-actions

This comment has been minimized.

Gobot1234 added a commit to Gobot1234/mypy that referenced this pull request Jul 15, 2023
@srittau srittau added the status: deferred Issue or PR deferred until some precondition is fixed label Jul 17, 2023
@Gobot1234 Gobot1234 changed the title Overload bool.__new__ for Literals Overload __new__ for Literals Jul 19, 2023
@Gobot1234
Copy link
Contributor Author

Is there a way to see the projects this affects using mypy-primer using my mypy branch?

@AlexWaygood
Copy link
Member

Is there a way to see the projects this affects using mypy-primer using my mypy branch?

The easiest way would be to temporarily push a commit to your mypy PR that makes these edits to mypy/typeshed/stdlib/builtins.pyi

@github-actions

This comment has been minimized.

stdlib/builtins.pyi Outdated Show resolved Hide resolved
@Gobot1234 Gobot1234 changed the title Overload __new__ for Literals Overload bool.__new__ for Literal bools Jul 19, 2023
stdlib/builtins.pyi Outdated Show resolved Hide resolved
Co-authored-by: Alex Waygood <[email protected]>
@Gobot1234
Copy link
Contributor Author

python/mypy#15687 (comment) changes don't appear to be causing any problems

@github-actions

This comment has been minimized.

Copy link
Contributor

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

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/engine.py:2851: error: Unexpected keyword argument "task" for "create_call"  [call-arg]
+ src/prefect/_internal/concurrency/api.py:41: note: "create_call" defined here
+ src/prefect/engine.py:2851: error: Unexpected keyword argument "task_run" for "create_call"  [call-arg]
+ src/prefect/_internal/concurrency/api.py:41: note: "create_call" defined here
+ src/prefect/engine.py:2851: error: Unexpected keyword argument "state" for "create_call"  [call-arg]
+ src/prefect/_internal/concurrency/api.py:41: note: "create_call" defined here

@srittau
Copy link
Collaborator

srittau commented Feb 19, 2024

Still waiting for python/mypy#15687.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: deferred Issue or PR deferred until some precondition is fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bool() return type on with no arguments
4 participants