chore: 型などの些細な修正

pull/11/head
yupix 2 years ago
parent 5ab58910f3
commit 612f8c573f
No known key found for this signature in database
GPG Key ID: 2FF705F5C56D9C06

@ -3,7 +3,7 @@ from __future__ import annotations
from datetime import datetime from datetime import datetime
from typing import Any, Optional from typing import Any, Optional
from mipac.types.drive import FilePayload, FolderPayload, PropertiesPayload from mipac.types.drive import IDriveFile, FolderPayload, PropertiesPayload
from mipac.types.user import UserPayload from mipac.types.user import UserPayload
__all__ = ('RawProperties', 'RawFolder', 'RawFile') __all__ = ('RawProperties', 'RawFolder', 'RawFile')
@ -125,7 +125,7 @@ class RawFile:
'user', 'user',
) )
def __init__(self, data: FilePayload): def __init__(self, data: IDriveFile):
self.id: str = data['id'] self.id: str = data['id']
self.created_at: datetime = datetime.strptime( self.created_at: datetime = datetime.strptime(
data['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ' data['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ'

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import Optional from typing import Optional
from mipac.types.note import PollPayload from mipac.types.note import IPoll
__all__ = ['RawPollChoices', 'RawPoll'] __all__ = ['RawPollChoices', 'RawPoll']
@ -43,7 +43,7 @@ class RawPoll:
__slots__ = ('multiple', 'expires_at', 'choices', 'expired_after') __slots__ = ('multiple', 'expires_at', 'choices', 'expired_after')
def __init__(self, data: PollPayload): def __init__(self, data: IPoll):
self.multiple: Optional[bool] = data.get('multiple') self.multiple: Optional[bool] = data.get('multiple')
self.expires_at: Optional[int] = data.get('expires_at') self.expires_at: Optional[int] = data.get('expires_at')
self.choices: Optional[list[RawPollChoices]] = [ self.choices: Optional[list[RawPollChoices]] = [

@ -5,7 +5,7 @@ from mipac.types.chart import (
DriveRemoteChartPayload, DriveRemoteChartPayload,
) )
from mipac.types.chat import ChatPayload from mipac.types.chat import ChatPayload
from mipac.types.drive import FilePayload, FolderPayload, PropertiesPayload from mipac.types.drive import IDriveFile, FolderPayload, PropertiesPayload
from mipac.types.emoji import EmojiPayload from mipac.types.emoji import EmojiPayload
from mipac.types.instance import ( from mipac.types.instance import (
FeaturesPayload, FeaturesPayload,
@ -21,7 +21,7 @@ from mipac.types.note import (
IReaction, IReaction,
IReactionRequired, IReactionRequired,
IRenote, IRenote,
PollPayload, IPoll,
) )
from mipac.types.page import ( from mipac.types.page import (
AttachedFilePayload, AttachedFilePayload,
@ -49,13 +49,13 @@ __all__ = (
'ChatPayload', 'ChatPayload',
'PropertiesPayload', 'PropertiesPayload',
'FolderPayload', 'FolderPayload',
'FilePayload', 'IDriveFile',
'EmojiPayload', 'EmojiPayload',
'INoteRequired', 'INoteRequired',
'INote', 'INote',
'GeoPayload', 'GeoPayload',
'IReaction', 'IReaction',
'PollPayload', 'IPoll',
'IRenote', 'IRenote',
'IReactionRequired', 'IReactionRequired',
'FeaturesPayload', 'FeaturesPayload',

Loading…
Cancel
Save