поле notice_displayed класса Client теперь приватное

このコミットが含まれているのは:
Ilya (Marshal) 2022-11-10 23:07:35 +01:00
コミット 5d0b2c1c10
2個のファイルの変更6行の追加6行の削除

ファイルの表示

@ -102,7 +102,7 @@ class Client(YandexMusicObject):
которых нет в библиотеке.
"""
notice_displayed = False
__notice_displayed = False
def __init__(
self,
@ -112,10 +112,10 @@ class Client(YandexMusicObject):
language: str = 'ru',
report_unknown_fields=False,
) -> None:
if not Client.notice_displayed:
if not Client.__notice_displayed:
print(f'Yandex Music API v{__version__}, {__copyright__}')
print(f'Licensed under the terms of the {__license__}', end='\n\n')
Client.notice_displayed = True
Client.__notice_displayed = True
self.logger = logging.getLogger(__name__)
self.token = token

ファイルの表示

@ -106,7 +106,7 @@ class ClientAsync(YandexMusicObject):
которых нет в библиотеке.
"""
notice_displayed = False
__notice_displayed = False
def __init__(
self,
@ -116,10 +116,10 @@ class ClientAsync(YandexMusicObject):
language: str = 'ru',
report_unknown_fields=False,
) -> None:
if not ClientAsync.notice_displayed:
if not ClientAsync.__notice_displayed:
print(f'Yandex Music API v{__version__}, {__copyright__}')
print(f'Licensed under the terms of the {__license__}', end='\n\n')
ClientAsync.notice_displayed = True
ClientAsync.__notice_displayed = True
self.logger = logging.getLogger(__name__)
self.token = token