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
{{ message }}
Repository navigation
False positive "Method must have at least one argument" with @enum.member #18720
enum.member-decorated functions become enum members and do not undergo self binding, similar to static methods. The repro snippet can be run with python 3.11 and newer to confirm.
main.py:6: error: Method must have at least one argument. Did you forget the "self" argument? [misc]
main.py:10: note: Revealed type is "enum.member[def () -> builtins.int]"
main.py:11: note: Revealed type is "def () -> builtins.int"
Your Environment
Mypy version used: 1.15.0 and current master
Mypy command-line flags: N/A
Mypy configuration options from mypy.ini (and other config files): N/A
Activity
Move self argument checks to a later phase - after decorator applicat…