Skip to content

Commit

Permalink
Simplify is_staticmethod check
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Weiler committed Nov 9, 2023
1 parent bc42c57 commit 8121e3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/stubgenc.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def is_staticmethod(self, class_info: ClassInfo | None, name: str, obj: object)
elif self.is_c_module:
raw_lookup = getattr(class_info.cls, "__dict__") # noqa: B009
raw_value = raw_lookup.get(name, obj)
return type(raw_value).__name__ in ("staticmethod")
return type(raw_value).__name__ == "staticmethod"
else:
return isinstance(inspect.getattr_static(class_info.cls, name), staticmethod)

Expand Down

0 comments on commit 8121e3c

Please sign in to comment.