We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
make float not act like float | int (and complex act like complex | float) , and bytes not act like bytes | memoryview | bytearray
float
float | int
complex
complex | float
bytes
bytes | memoryview | bytearray
we can still infer float | int though:
a = 1 reveal_type(a) # float | int
will support configuration per module, to preserve compatibility:
from thirdparty import some_float reveal_type(some_float) # float | int
The text was updated successfully, but these errors were encountered:
Float
int
I currently always use (at least) the following (undocumented) settings in vanilla mypy:
disable_bytearray_promotion = true disable_memoryview_promotion = true
so how about something like:
disable_int_promotion = true disable_float_promotion = true
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
make
float
not act likefloat | int
(andcomplex
act likecomplex | float
) , andbytes
not act likebytes | memoryview | bytearray
we can still infer
float | int
though:will support configuration per module, to preserve compatibility:
The text was updated successfully, but these errors were encountered: