Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 21, 2024
1 parent d2d2d76 commit 8d6e925
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypy/stubgenc.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def generate_class_stub(self, class_name: str, cls: type, output: list[str]) ->
if sys.version_info >= (3, 10):
annotations = inspect.get_annotations(cls)
else:
annotations = getattr(cls, '__annotations__', {})
annotations = getattr(cls, "__annotations__", {})

for attr, value in attrs:
if attr == "__hash__" and value is None:
Expand Down Expand Up @@ -914,7 +914,7 @@ def generate_variable_stub(self, name: str, obj: object, output: list[str]) -> N
if sys.version_info >= (3, 10):
annotations = inspect.get_annotations(self.module)
else:
annotations = getattr(self.module, '__annotations__', {})
annotations = getattr(self.module, "__annotations__", {})

if name in annotations:
type_str = self.strip_or_import(annotations[name])
Expand Down

0 comments on commit 8d6e925

Please sign in to comment.