Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 52c9339

Browse files
committedJun 4, 2025·
wip don't merge
1 parent 290056a commit 52c9339

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎pylint/checkers/deprecated.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@ def visit_decorators(self, node: nodes.Decorators) -> None:
148148
)
149149
def visit_importfrom(self, node: nodes.ImportFrom) -> None:
150150
"""Triggered when a from statement is seen."""
151-
basename = node.modname
152-
basename = get_import_name(node, basename)
151+
basename = get_import_name(node, node.modname)
153152
self.check_deprecated_module(node, basename)
154153
class_names = (name for name, _ in node.names)
154+
assert (
155+
basename is not None
156+
), "basename should not be None (checking the primer don't merge)"
155157
self.check_deprecated_class(node, basename, class_names)
156158

157159
def deprecated_methods(self) -> Container[str]:

‎pylint/config/argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ def __init__(
483483
kwargs: dict[str, Any],
484484
hide_help: bool,
485485
section: str | None,
486-
metavar: str,
486+
metavar: str | None,
487487
) -> None:
488488
super().__init__(
489489
flags=flags, arg_help=arg_help, hide_help=hide_help, section=section

0 commit comments

Comments
 (0)
Please sign in to comment.