Skip to content

Commit

Permalink
fix: デフォルト値が入ってない
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Apr 18, 2023
1 parent 60fec8b commit 1c19685
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion mipac/actions/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ async def get_my_favorite(self) -> list[Channel]:
Route('POST', '/api/channels/my-favorites'), auth=True
)
return [Channel(i, client=self._client) for i in res]

2 changes: 1 addition & 1 deletion mipac/actions/drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(
self.__client: ClientManager = client
self.__file_id = file_id

async def show_file(self, file_id: str | None, url: str | None) -> File:
async def show_file(self, file_id: str | None = None, url: str | None = None) -> File:
"""
ファイルの情報を取得します。
Expand Down
1 change: 1 addition & 0 deletions mipac/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def __init__(self, options: CacheConfigData) -> None:
IMisskeyDistribution = Literal['ayuskey', 'm544', 'areionskey', 'official']
IMisskeyVersions = Literal[13, 12, 11]


class ILimits(TypedDict, total=False):
channel_name: int
channel_description: int
Expand Down
9 changes: 6 additions & 3 deletions mipac/manager/channel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from __future__ import annotations
from typing import TYPE_CHECKING

Expand All @@ -11,11 +10,15 @@


class ChannelManager(AbstractManager):
def __init__(self, channel_id: str | None = None, *, session: HTTPClient, client: ClientManager):
def __init__(
self, channel_id: str | None = None, *, session: HTTPClient, client: ClientManager
):
self.__channel_id: str | None = channel_id
self.__session: HTTPClient = session
self.__client: ClientManager = client

@property
def action(self) -> ChannelActions:
return ChannelActions(channel_id=self.__channel_id, session=self.__session, client=self.__client)
return ChannelActions(
channel_id=self.__channel_id, session=self.__session, client=self.__client
)
2 changes: 1 addition & 1 deletion mipac/models/lite/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if TYPE_CHECKING:
from mipac.manager import ClientManager
from mipac.manager.channel import ChannelManager


T = TypeVar('T', bound=IChannelLite)

Expand Down
1 change: 0 additions & 1 deletion mipac/models/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def poll(self) -> Poll | None:
return Poll(self._note['poll'], client=self._client) if 'poll' in self._note else None



class NoteTranslateResult:
"""
NoteTranslateResult
Expand Down
2 changes: 1 addition & 1 deletion mipac/types/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,5 +359,5 @@
'/api/channels/search',
'/api/emoji',
'/api/roles/notes',
'/api/users/update-memo'
'/api/users/update-memo',
]
1 change: 1 addition & 0 deletions mipac/utils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ def __init__(self) -> None:
self.green = '\x1b[92;1m'
self.reset = '\x1b[0m'


COLORS = Colors()

0 comments on commit 1c19685

Please sign in to comment.