Skip to content

Commit 05a3b51

Browse files
pre-commit
1 parent d074fb8 commit 05a3b51

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

pylint/checkers/imports.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,9 @@ def _get_imported_module(
10471047
return None
10481048

10491049
dotted_modname = get_import_name(importnode, modname)
1050-
self.add_message("import-error", args=repr(dotted_modname), node=importnode)
1050+
self.add_message(
1051+
"import-error", args=repr(dotted_modname), node=importnode
1052+
)
10511053
else:
10521054
# Re-raise other AttributeErrors
10531055
raise astroid.AstroidError from e

tests/functional/i/import_mypy_extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
# pylint: disable=unused-import
1010

1111
# This should not crash when using --extension-pkg-allow-list=mypy
12-
import mypy.build # [import-error]
12+
import mypy.build # [import-error]

tests/functional/i/import_mypy_extension.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
disable=C,R,W
33

44
[TYPECHECK]
5-
extension-pkg-allow-list=mypy
5+
extension-pkg-allow-list=mypy
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import-error:4:0:4:17::Unable to import 'mypy.build':UNDEFINED
1+
import-error:12:0:12:17::Unable to import 'mypy.build':UNDEFINED

0 commit comments

Comments
 (0)