💥 Remove: 移除 Python 3.9 支持 (#3860)

This commit is contained in:
呵呵です
2026-02-18 00:11:36 +08:00
committed by GitHub
parent f719a6b41b
commit 63cde5da77
56 changed files with 603 additions and 1144 deletions

View File

@@ -31,7 +31,7 @@ FrontMatter:
description: nonebot.exception 模块
"""
from typing import Any, Optional
from typing import Any
from nonebot.compat import ModelField
@@ -47,7 +47,7 @@ class NoneBotException(Exception):
class ParserExit(NoneBotException):
"""{ref}`nonebot.rule.shell_command` 处理消息失败时返回的异常。"""
def __init__(self, status: int = 0, message: Optional[str] = None) -> None:
def __init__(self, status: int = 0, message: str | None = None) -> None:
self.status = status
self.message = message
@@ -232,7 +232,7 @@ class DriverException(NoneBotException):
class WebSocketClosed(DriverException):
"""WebSocket 连接已关闭。"""
def __init__(self, code: int, reason: Optional[str] = None) -> None:
def __init__(self, code: int, reason: str | None = None) -> None:
self.code = code
self.reason = reason