You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error (in strict mode) from code that I feel should not be producing one:
Returning Any from function declared to return "Taggable"
Seemingly in support of the assertion that the warning is spurious, the (largely equivalent) version remove_part_id_tag_2 (only a type hint added) checks OK.
To Reproduce
curl -L -O https://gist.githubusercontent.com/inducer/bf7dd340bc752384c353335b665f4d68/raw/23520c57e4dfdec2f31ae4fd083c917efa408600/mypy-remove-tag.py
$ mypy --strict mypy-remove-tag.py
mypy-remove-tag.py:13: error: Returning Any from functiondeclared to return"Taggable"
Found 1 error in 1 file (checked 1 source file)
Your Environment
Mypy version used: 0.942
Mypy command-line flags: --show-error-codes --strict (see run-mypy.sh)
Mypy configuration options from mypy.ini (and other config files): n/a
Python version used: 3.10.4
Operating system and version: Debian Linux unstable/testing
The text was updated successfully, but these errors were encountered:
PEP 673 isn't yet supported by mypy, which is why you're getting strange errors here. You can follow along on progress with implementing PEP 673 support here: #11871.
Bug Report
From the code in the following gist:
https://gist.github.com/inducer/bf7dd340bc752384c353335b665f4d68
I get an error (in strict mode) from code that I feel should not be producing one:
Seemingly in support of the assertion that the warning is spurious, the (largely equivalent) version
remove_part_id_tag_2
(only a type hint added) checks OK.To Reproduce
Your Environment
--show-error-codes --strict
(seerun-mypy.sh
)mypy.ini
(and other config files): n/aThe text was updated successfully, but these errors were encountered: