plus.py 743 B

1234567891011121314151617181920212223242526
  1. from typing import TYPE_CHECKING, Optional
  2. from yandex_music import YandexMusicModel
  3. from yandex_music.utils import model
  4. if TYPE_CHECKING:
  5. from yandex_music import ClientType
  6. @model
  7. class Plus(YandexMusicModel):
  8. """Класс, представляющий `Plus` подписку.
  9. Attributes:
  10. has_plus (:obj:`bool`): Наличие.
  11. is_tutorial_completed (:obj:`bool`): Закончено ли руководство.
  12. client (:obj:`yandex_music.Client`, optional): Клиент Yandex Music.
  13. """
  14. has_plus: bool
  15. is_tutorial_completed: bool
  16. client: Optional['ClientType'] = None
  17. def __post_init__(self) -> None:
  18. self._id_attrs = (self.has_plus, self.is_tutorial_completed)