mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-31 23:51:28 +08:00
🎨 remove linter error
This commit is contained in:
parent
d8e29a81aa
commit
0c5bbdaabe
@ -269,10 +269,10 @@ class MessageSegment(Mapping, abc.ABC, Generic[TM]):
|
|||||||
return not self == other
|
return not self == other
|
||||||
|
|
||||||
def __add__(self, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
def __add__(self, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
||||||
return self.get_message_class()(self) + other
|
return self.get_message_class()(self) + other # type: ignore
|
||||||
|
|
||||||
def __radd__(self, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
def __radd__(self, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
||||||
return self.get_message_class()(other) + self
|
return self.get_message_class()(other) + self # type: ignore
|
||||||
|
|
||||||
def __getitem__(self, key: str):
|
def __getitem__(self, key: str):
|
||||||
return self.data[key]
|
return self.data[key]
|
||||||
@ -357,7 +357,7 @@ class Message(List[TMS], abc.ABC):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def __radd__(self: TM, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
def __radd__(self: TM, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
||||||
result = self.__class__(other)
|
result = self.__class__(other) # type: ignore
|
||||||
return result + self
|
return result + self
|
||||||
|
|
||||||
def __iadd__(self: TM, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
def __iadd__(self: TM, other: Union[str, Mapping, Iterable[Mapping]]) -> TM:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user