case_forms.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 CaseForms(YandexMusicModel):
  8. """Класс, представляющий склонение имени.
  9. Attributes:
  10. nominative (:obj:`str`): Именительный.
  11. genitive (:obj:`str`): Родительный.
  12. dative (:obj:`str`): Дательный.
  13. accusative (:obj:`str`): Винительный.
  14. instrumental (:obj:`str`): Творительный.
  15. prepositional (:obj:`str`): Предложный.
  16. client (:obj:`yandex_music.Client`, optional): Клиент Yandex Music.
  17. """
  18. nominative: str
  19. genitive: str
  20. dative: str
  21. accusative: str
  22. instrumental: str
  23. prepositional: str
  24. client: Optional['ClientType'] = None
  25. def __post_init__(self) -> None:
  26. self._id_attrs = (
  27. self.nominative,
  28. self.genitive,
  29. self.dative,
  30. self.accusative,
  31. self.instrumental,
  32. self.prepositional,
  33. )