From 4cf63de19de5d22f86e8ffa564f41bdbe22b8641 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 3 Aug 2023 15:31:57 +0200 Subject: [PATCH] refactor: improve code --- hcloud/core/domain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcloud/core/domain.py b/hcloud/core/domain.py index 692f748..30c2d3e 100644 --- a/hcloud/core/domain.py +++ b/hcloud/core/domain.py @@ -2,7 +2,7 @@ class BaseDomain: - __slots__ = () + __slots__: tuple[str, ...] = () @classmethod def from_dict(cls, data: dict): # type: ignore[no-untyped-def] @@ -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)})"