Skip to content

Commit

Permalink
chore: 更新依赖并修复 Ruff 和 Pylint 错误 (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
st1020 authored Nov 3, 2024
1 parent 42e3174 commit da9d4bf
Show file tree
Hide file tree
Showing 3 changed files with 663 additions and 576 deletions.
6 changes: 3 additions & 3 deletions alicebot/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def startswith(
Returns:
检查结果。
""" # noqa: D402
"""
if isinstance(prefix, str):
return str(self).startswith(prefix, start, end)
if isinstance(prefix, self.get_segment_class()):
Expand Down Expand Up @@ -224,7 +224,7 @@ def endswith(
Returns:
检查结果。
""" # noqa: D402
"""
if isinstance(suffix, str):
return str(self).endswith(suffix, start, end)
if isinstance(suffix, self.get_segment_class()):
Expand Down Expand Up @@ -262,7 +262,7 @@ def replace(
Returns:
替换后的消息对象。
""" # noqa: D402
"""
if isinstance(old, str):
if not isinstance(new, str):
raise TypeError("when type of old is str, type of new must be str.")
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ disable = [
"too-many-branches",
"too-many-instance-attributes",
"too-many-nested-blocks",
"too-many-positional-arguments",
"too-many-public-methods",
]
load-plugins = ["pylint_pydantic"]
Expand Down
Loading

0 comments on commit da9d4bf

Please sign in to comment.