ops need to be typing strings

This commit is contained in:
əlemi 2022-04-28 12:59:52 +02:00
parent 8503a36df4
commit 1ecb1c44e8
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E
2 changed files with 5 additions and 5 deletions

View file

@ -43,17 +43,17 @@ class Addon:
config: ConfigObject config: ConfigObject
logger: logging.Logger logger: logging.Logger
_client: Treepuncher _client: 'Treepuncher'
@dataclass(frozen=True) @dataclass(frozen=True)
class Options(ConfigObject): class Options(ConfigObject):
pass pass
@property @property
def client(self) -> Treepuncher: def client(self) -> 'Treepuncher':
return self._client return self._client
def __init__(self, client: Treepuncher, *args, **kwargs): def __init__(self, client: 'Treepuncher', *args, **kwargs):
self._client = client self._client = client
self.name = type(self).__name__ self.name = type(self).__name__
cfg = self._client.config cfg = self._client.config

View file

@ -13,10 +13,10 @@ class Provider(Addon):
class Notifier: class Notifier:
_report_functions : List[Callable] _report_functions : List[Callable]
_providers : List[Provider] _providers : List[Provider]
_client : Treepuncher _client : 'Treepuncher'
logger : logging.Logger logger : logging.Logger
def __init__(self, client:Treepuncher): def __init__(self, client:'Treepuncher'):
self._report_functions = [] self._report_functions = []
self._providers = [] self._providers = []
self._client = client self._client = client