Skip to content

Commit

Permalink
feat!: 本来v0.7.0で消す予定のクラスを消し忘れていたので削除 close #100
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Aug 18, 2024
1 parent 8ecca38 commit 5ecc256
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
30 changes: 1 addition & 29 deletions mipac/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from mipac.models.announcement import Announcement
from mipac.models.lite.role import PartialRole
from mipac.models.lite.user import BadgeRole, PartialUser
from mipac.models.lite.user import PartialUser
from mipac.models.note import Note
from mipac.types.follow import IFederationFollowCommon, IFederationFollower, IFederationFollowing
from mipac.types.meta import IPolicies
Expand All @@ -26,14 +26,12 @@
IUserList,
IUserListMembership,
IUserNotify,
IUserRole,
IUserSecurityKey,
NotificationRecieveConfig,
is_me_detailed,
is_user_detailed_not_me,
)
from mipac.utils.format import str_to_datetime
from mipac.utils.util import DeprecatedClass

if TYPE_CHECKING:
from mipac.manager.client import ClientManager
Expand Down Expand Up @@ -137,32 +135,6 @@ def _get(self, key: str) -> Any | None:
return self._raw_user_field.get(key)


@DeprecatedClass(remove_in_version="0.7.0")
class UserRole(BadgeRole[IUserRole]):
def __init__(self, data: IUserRole, *, client: ClientManager) -> None:
super().__init__(data, client=client)

@property
def id(self) -> str:
return self._data["id"]

@property
def color(self) -> str | None:
return self._data["color"]

@property
def description(self) -> str:
return self._data["description"]

@property
def is_moderator(self) -> bool:
return self._data["is_moderator"]

@property
def is_administrator(self) -> bool:
return self._data["is_administrator"]


class UserDetailedNotMeOnly:
def __init__(self, raw_user: IUserDetailedNotMeOnlySchema, *, client: ClientManager) -> None:
self._raw_user: IUserDetailedNotMeOnlySchema = raw_user
Expand Down
14 changes: 0 additions & 14 deletions mipac/types/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ class IBadgeRole(TypedDict):
display_order: int


class IUserRole(IBadgeRole):
"""
Deprecated
Will be removed in v0.7.0
"""

id: str
color: str | None
description: str
is_moderator: bool
is_administrator: bool


class IUserRequired(TypedDict):
id: str
username: str
Expand Down

0 comments on commit 5ecc256

Please sign in to comment.