Skip to content

Commit

Permalink
refactor: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Sep 25, 2023
1 parent f18c9a6 commit 49b7011
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hcloud/core/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class BaseDomain:
__slots__ = ()
__slots__: tuple[str, ...] = ()

@classmethod
def from_dict(cls, data: dict): # type: ignore[no-untyped-def]
Expand All @@ -13,7 +13,7 @@ def from_dict(cls, data: dict): # type: ignore[no-untyped-def]
return cls(**supported_data)

def __repr__(self) -> str:
kwargs = [f"{key}={getattr(self, key)!r}" for key in self.__slots__] # type: ignore[var-annotated]
kwargs = [f"{key}={getattr(self, key)!r}" for key in self.__slots__]
return f"{self.__class__.__qualname__}({', '.join(kwargs)})"


Expand Down

0 comments on commit 49b7011

Please sign in to comment.