diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-04-12 17:34:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 17:34:34 +0200 |
commit | 16fe498b68c170b317eaea94bf85efd568a1dd0a (patch) | |
tree | c541686924a2e689a043e918a2f4688123d6cea5 /tests | |
parent | 61dae1e5f4fa4b8f2f93d8846e66f4eee6cc877f (diff) | |
download | pylint-git-16fe498b68c170b317eaea94bf85efd568a1dd0a.tar.gz |
Fix `unused-import` to check`dummy-variables-rgx` (#8566) (#8568)
Resolve #8500
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
(cherry picked from commit 0cd41b1fb15e31eb311b61f93bc27f7cacc2f7ac)
Co-authored-by: RSTdefg <34202999+RSTdefg@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/checkers/unittest_typecheck.py | 2 | ||||
-rw-r--r-- | tests/functional/i/import_dummy.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/checkers/unittest_typecheck.py b/tests/checkers/unittest_typecheck.py index afcc2dc2e..dba69eaf3 100644 --- a/tests/checkers/unittest_typecheck.py +++ b/tests/checkers/unittest_typecheck.py @@ -10,7 +10,7 @@ from pylint.interfaces import INFERENCE, UNDEFINED from pylint.testutils import CheckerTestCase, MessageTest, set_config try: - from coverage import tracer as _ # pylint: disable=unused-import + from coverage import tracer as _ C_EXTENTIONS_AVAILABLE = True except ImportError: diff --git a/tests/functional/i/import_dummy.py b/tests/functional/i/import_dummy.py new file mode 100644 index 000000000..eecfa0d8a --- /dev/null +++ b/tests/functional/i/import_dummy.py @@ -0,0 +1,5 @@ +"""Testing importing module as dummy variable.""" +import gettext as _ +import sys as __ +import typing as ___dummy +from base64 import b64encode as ____dummy |