Skip to content

Commit

Permalink
🚨 auto fix by pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed May 6, 2024
1 parent 485fdd1 commit ccc0290
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
4 changes: 1 addition & 3 deletions nonebot_plugin_all4one/middlewares/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ async def get_self_info(
"""获取机器人自身信息"""
raise NotImplementedError

async def get_user_info(
self, *, user_id: str, **kwargs: Any
) -> dict[
async def get_user_info(self, *, user_id: str, **kwargs: Any) -> dict[
Union[Literal["user_id", "user_name", "user_displayname", "user_remark"], str],
str,
]:
Expand Down
6 changes: 3 additions & 3 deletions nonebot_plugin_all4one/middlewares/qqguild.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ async def get_guild_member_list(
"user_id": str(member.user.id) if member.user.id else "",
"user_name": member.user.username or "",
"user_displayname": member.nick or "",
"qqguild.user": member.user.model_dump()
if member.user
else None,
"qqguild.user": (
member.user.model_dump() if member.user else None
),
"qqguild.roles": member.roles,
"qqguild.joined_at": (
member.joined_at.timestamp() if member.joined_at else None
Expand Down
4 changes: 1 addition & 3 deletions nonebot_plugin_all4one/middlewares/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,7 @@ async def get_self_info(
}

@supported_action
async def get_user_info(
self, *, user_id: str, **kwargs: Any
) -> dict[
async def get_user_info(self, *, user_id: str, **kwargs: Any) -> dict[
Union[Literal["user_id", "user_name", "user_displayname", "user_remark"], str],
str,
]:
Expand Down
11 changes: 2 additions & 9 deletions nonebot_plugin_all4one/onebotimpl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@
import asyncio
from datetime import datetime
from functools import partial
from contextlib import asynccontextmanager
from typing import (
Any,
Union,
Literal,
TypeVar,
Optional,
cast,
)
from collections.abc import AsyncGenerator
from contextlib import asynccontextmanager
from typing import Any, Union, Literal, TypeVar, Optional, cast

import msgpack
from nonebot.log import logger
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_all4one/onebotimpl/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
import datetime
from typing import Union
from base64 import b64encode
from functools import partial
from typing import Union

import msgpack
from pydantic.json import custom_pydantic_encoder
Expand Down

0 comments on commit ccc0290

Please sign in to comment.