diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-07-17 19:28:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-17 19:28:56 +0200 |
commit | 7e63ebe2c3187c3b3d9e80e4a407de77002e89e5 (patch) | |
tree | 04b277b3a39542c60d201225d87f00bb22b35eaf /tests/functional/r/regression_02/regression_5776.py | |
parent | 0ce5277068c2821946184f2424848e1b69baa7b4 (diff) | |
download | pylint-git-7e63ebe2c3187c3b3d9e80e4a407de77002e89e5.tar.gz |
Add regression test for Enum imported as alias (#6798)
Diffstat (limited to 'tests/functional/r/regression_02/regression_5776.py')
-rw-r--r-- | tests/functional/r/regression_02/regression_5776.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional/r/regression_02/regression_5776.py b/tests/functional/r/regression_02/regression_5776.py new file mode 100644 index 000000000..5e8342511 --- /dev/null +++ b/tests/functional/r/regression_02/regression_5776.py @@ -0,0 +1,15 @@ +"""Test for a regression with Enums not being recognized when imported with an alias. + +Reported in https://github.com/PyCQA/pylint/issues/5776 +""" + +from enum import Enum as PyEnum + + +class MyEnum(PyEnum): + """My enum""" + + ENUM_KEY = "enum_value" + + +print(MyEnum.ENUM_KEY.value) |