summaryrefslogtreecommitdiff
path: root/pylint/lint/pylinter.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/lint/pylinter.py')
-rw-r--r--pylint/lint/pylinter.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py
index 41f72a70f..72ab3637c 100644
--- a/pylint/lint/pylinter.py
+++ b/pylint/lint/pylinter.py
@@ -974,7 +974,7 @@ class PyLinter(
"In pylint 3.0, the checkers check function will only accept sequence of string",
DeprecationWarning,
)
- files_or_modules = (files_or_modules,) # type: ignore
+ files_or_modules = (files_or_modules,) # type: ignore[assignment]
if self.config.from_stdin:
if len(files_or_modules) != 1:
raise exceptions.InvalidArgsError(
@@ -1336,12 +1336,12 @@ class PyLinter(
if confidence is None:
confidence = interfaces.UNDEFINED
if self.config.confidence and confidence.name not in self.config.confidence:
- return MSG_STATE_CONFIDENCE # type: ignore # mypy does not infer Literal correctly
+ return MSG_STATE_CONFIDENCE # type: ignore[return-value] # mypy does not infer Literal correctly
try:
if line in self.file_state._module_msgs_state[msgid]:
- return MSG_STATE_SCOPE_MODULE # type: ignore
+ return MSG_STATE_SCOPE_MODULE # type: ignore[return-value]
except (KeyError, TypeError):
- return MSG_STATE_SCOPE_CONFIG # type: ignore
+ return MSG_STATE_SCOPE_CONFIG # type: ignore[return-value]
return None
def _is_one_message_enabled(self, msgid: str, line: Optional[int]) -> bool:
@@ -1415,7 +1415,7 @@ class PyLinter(
if line is None and node is not None:
line = node.fromlineno
if col_offset is None and hasattr(node, "col_offset"):
- col_offset = node.col_offset # type: ignore
+ col_offset = node.col_offset # type: ignore[union-attr]
# should this message be displayed
if not self.is_message_enabled(message_definition.msgid, line, confidence):