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
This bug caused by defind an attribute in new for a class. This bug had been reported in #982.
To Reproduce
classMyObject:
""" A file that is either input or output of a rule. """__slots__= ["a"]
def__new__(cls, text):
obj=object.__new__(cls)
obj.a=textreturnobjmo=MyObject("")
mo.a
Expected Behavior
Success: no issues found in 1 source file
Actual Behavior
2023/08/03.py:16: error: "MyObject" has no attribute "a" [attr-defined]
Found 1 error in 1 file (checked 1 source file)
Your Environment
Mypy version used: mypy 1.4.1 (compiled: yes)
Mypy command-line flags: mypy 2023/08/03.py
Mypy configuration options from mypy.ini (and other config files): None (default)
Python version used: Python 3.10.8
The text was updated successfully, but these errors were encountered:
Bug Report
This bug caused by defind an attribute in new for a class. This bug had been reported in #982.
To Reproduce
Expected Behavior
Actual Behavior
Your Environment
mypy 1.4.1 (compiled: yes)
mypy 2023/08/03.py
mypy.ini
(and other config files): None (default)Python 3.10.8
The text was updated successfully, but these errors were encountered: