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 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
__all__ = ('RawProperties', 'RawFolder', 'RawFile')
@ -125,7 +125,7 @@ class RawFile:
'user',
)
def __init__(self, data: FilePayload):
def __init__(self, data: IDriveFile):
self.id: str = data['id']
self.created_at: datetime = datetime.strptime(
data['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ'

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import Optional
from mipac.types.note import PollPayload
from mipac.types.note import IPoll
__all__ = ['RawPollChoices', 'RawPoll']
@ -43,7 +43,7 @@ class RawPoll:
__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.expires_at: Optional[int] = data.get('expires_at')
self.choices: Optional[list[RawPollChoices]] = [

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

Loading…
Cancel
Save