Skip to content

Commit

Permalink
_is_c_extension already checks if owner is a Module
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Dec 1, 2024
1 parent 51c9061 commit 8e103a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ def _get_nomember_msgid_hint(
node: nodes.Attribute | nodes.AssignAttr | nodes.DelAttr,
owner: SuccessfulInferenceResult,
) -> tuple[Literal["c-extension-no-member", "no-member"], str]:
if isinstance(owner, nodes.Module) and _is_c_extension(owner):
if _is_c_extension(owner):
return "c-extension-no-member", ""
if not self.linter.config.missing_member_hint:
return "no-member", ""
Expand Down

0 comments on commit 8e103a6

Please sign in to comment.