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
"""Docstring."""
from enum import Enum
class Person(Enum):
"""Docstring."""
name = 'Bob'
gender = 'Male'
print(Person.name.value.upper())
Run pylint file.py, with pylint 1.8.3 and astroid 1.6.2. The output is:
No config file found, using default configuration
************* Module file
E: 12, 6: Method 'value' has no 'upper' member (no-member)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
Person.name.value infers [<Const.NoneType l.6 at 0x7e9e127eaef0>] in 1.6.1
but [<Const.NoneType l.6 at 0x7f59f3f4f0b8>, <BoundMethod value of enum.Enum at 0x140024321807416] in 1.6.2
Funny through it actually should be a Const.str
brycepg
changed the title
Deprecation with enums
Regression with enums
Mar 17, 2018
Steps to reproduce
Given the following code:
Run
pylint file.py
, with pylint 1.8.3 and astroid 1.6.2. The output is:With astroid 1.6.1, these errors do not occur.
Current behavior
no-member
errors occur.Expected behavior
No errors occur.
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
output1.6.2
The text was updated successfully, but these errors were encountered: