blob: 06759c7d3dd280f74267d5e18f3523ac21f092ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Regression test for https://github.com/PyCQA/astroid/pull/1734
# The following should lint just fine
# Fixed in https://github.com/PyCQA/astroid/pull/1743
# pylint: disable=missing-docstring,invalid-name
from enum import Enum
class Test(Enum):
LOADED = "loaded", True
SETUP_ERROR = "setup_error", True
_recoverable: bool
def __new__(cls, value: str, recoverable: bool):
obj = object.__new__(cls)
obj._value_ = value
obj._recoverable = recoverable
return obj
@property
def recoverable(self) -> bool:
"""Get if the state is recoverable."""
return self._recoverable
|