-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Needs PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationNeeds astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergable
Milestone
Description
Bug description
$ cat t.py
from http import HTTPMethod
print(HTTPMethod.__members__)
$ uv run pylint t.py
Installed 6 packages in 2ms
************* Module t
t.py:3:6: E1101: Class 'HTTPMethod' has no '__members__' member (no-member)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 9.41/10, -9.41)Since Python 3.11, IIUC
Might be because of the ✨ magic ✨ @_simple_enum(StrEnum) (https://github.com/python/cpython/blob/8adac492d4d6f5cbff74e5250c211230e41cdbbf/Lib/enum.py#L1652)
Related? #4135
Configuration
Command used
uv run pylint t.pyPylint output
************* Module t
t.py:3:6: E1101: Class 'HTTPMethod' has no '__members__' member (no-member)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 9.41/10, -9.41)Expected behavior
$ uv run t.py
{'CONNECT': <HTTPMethod.CONNECT>, 'DELETE': <HTTPMethod.DELETE>, 'GET': <HTTPMethod.GET>, 'HEAD': <HTTPMethod.HEAD>, 'OPTIONS': <HTTPMethod.OPTIONS>, 'PATCH': <HTTPMethod.PATCH>, 'POST': <HTTPMethod.POST>, 'PUT': <HTTPMethod.PUT>, 'TRACE': <HTTPMethod.TRACE>}So no error
Pylint version
$ uv run pylint --version
pylint 3.3.8
astroid 3.3.11
Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]OS / Environment
No response
Additional dependencies
Metadata
Metadata
Assignees
Labels
Needs PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationNeeds astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergable