-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
--strict changes return type to Any #13933
Comments
The problem seems to be EDIT: If I see things correctly the return type Implicit reexport is explained here: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport |
Fixes some of python#13965 We also need to modify attribute access logic (this is the TODO in the PR), which is a little trickier. But cases like python#13933 convinced me it's worth making this change, even before I get around to figuring that out.
Thanks, closing as a duplicate of the (partially fixed) #13965 |
Bug Report
Running mypy with
--strict
does not find an error which is found without--strict
because the return type of a method is changed toAny
.To Reproduce
Running mypy without --strict: The return type of
dbc.decode_message
is recognized correctly and an expected error message is printed for the last line.Running mypy with
--strict
: The return type ofdbc.decode_message
is considered to beAny
and because of that the error is not recognized.Expected Behavior
mypy should detect the return type even when using
--strict
and print the same error message like without--strict
.Actual Behavior
mypy does not find the error.
Your Environment
--strict
mypy.ini
(and other config files): noneReferences
dbc.decode_message
is defined here: https://github.com/cantools/cantools/blob/master/cantools/database/can/database.py#L451DecodeResultType
is defined here: https://github.com/cantools/cantools/blob/master/cantools/typechecking.py#L61The text was updated successfully, but these errors were encountered: