Skip to content

Commit dd9aafb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8cace41 commit dd9aafb

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

pylint/checkers/imports.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,7 @@ def _check_position(self, node: ImportNode) -> None:
702702
# if a first non-import instruction has already been encountered,
703703
# it means the import comes after it and therefore is not well placed
704704
if self._first_non_import_node:
705-
if self.linter.is_message_enabled(
706-
"wrong-import-position", node.fromlineno
707-
):
705+
if self.linter.is_message_enabled("wrong-import-position", node.fromlineno):
708706
self.add_message(
709707
"wrong-import-position", node=node, args=node.as_string()
710708
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
wrong-import-position:10:0:10:10::"Import ""import sys"" should be placed at the top of the module":UNDEFINED
1+
wrong-import-position:10:0:10:10::"Import ""import sys"" should be placed at the top of the module":UNDEFINED

tests/functional/w/wrong_import_position_pragma_scope.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ wrong-import-position:19:0:19:9::"Import ""import os"" should be placed at the t
22
wrong-import-position:20:0:20:14::"Import ""import pathlib"" should be placed at the top of the module":UNDEFINED
33
wrong-import-position:21:0:21:13::"Import ""import random"" should be placed at the top of the module":UNDEFINED
44
wrong-import-position:29:0:29:10::"Import ""import csv"" should be placed at the top of the module":UNDEFINED
5-
wrong-import-position:30:0:30:9::"Import ""import re"" should be placed at the top of the module":UNDEFINED
5+
wrong-import-position:30:0:30:9::"Import ""import re"" should be placed at the top of the module":UNDEFINED

0 commit comments

Comments
 (0)