[project] name = "nonebot2" version = "2.4.2" description = "An asynchronous python bot framework." authors = [{ name = "yanyongyu", email = "yyy@nonebot.dev" }] license = "MIT" readme = "README.md" keywords = ["bot", "qq", "qqbot", "mirai", "coolq"] classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: Robot Framework", "Framework :: Robot Framework :: Library", "Operating System :: OS Independent", "Programming Language :: Python :: 3", ] requires-python = ">=3.9, <4.0" dependencies = [ "yarl >=1.7.2, <2.0.0", "anyio >=4.4.0, <5.0.0", "loguru >=0.6.0, <1.0.0", "pygtrie >=2.4.1, <3.0.0", "exceptiongroup >=1.2.2, <2.0.0", "python-dotenv >=0.21.0, <2.0.0", "typing-extensions >=4.6.0, <5.0.0", "tomli >=2.0.1, <3.0.0; python_version < '3.11'", "pydantic >=1.10.0, <3.0.0, !=2.5.0, !=2.5.1, !=2.10.0, !=2.10.1", ] [project.optional-dependencies] websockets = ["websockets >=15.0"] httpx = ["httpx[http2] >=0.26.0, <1.0.0"] aiohttp = ["aiohttp[speedups] >=3.11.0, <4.0.0"] quart = ["Quart >=0.18.0, <1.0.0", "uvicorn[standard] >=0.20.0, <1.0.0"] fastapi = ["fastapi >=0.93.0, <1.0.0", "uvicorn[standard] >=0.20.0, <1.0.0"] all = [ "websockets >=15.0", "fastapi >=0.93.0, <1.0.0", "httpx[http2] >=0.26.0, <1.0.0", "aiohttp[speedups] >=3.11.0, <4.0.0", "uvicorn[standard] >=0.20.0, <1.0.0", ] [dependency-groups] dev = [ "ruff >=0.12.0, <0.13.0", "nonemoji >=0.1.2, <0.2.0", "pre-commit >=4.0.0, <5.0.0", ] test = [ "trio >=0.27.0", "nonebug >=0.4.1, <0.5.0", "wsproto >=1.2.0, <2.0.0", "werkzeug >=2.3.6, <4.0.0", "pytest-cov >=6.0.0, <7.0.0", "pytest-xdist >=3.0.2, <4.0.0", "coverage-conditional-plugin >=0.9.0, <0.10.0", ] docs = ["nb-autodoc >=1.0.0a5, <2.0.0"] pydantic-v1 = ["pydantic >=1.10.0, <2.0.0"] pydantic-v2 = ["pydantic >=2.0.0, <3.0.0"] [project.urls] Homepage = "https://nonebot.dev/" Repository = "https://github.com/nonebot/nonebot2" Documentation = "https://nonebot.dev/" "Bug Tracker" = "https://github.com/nonebot/nonebot2/issues" Changelog = "https://nonebot.dev/changelog" Funding = "https://afdian.com/@nonebot" [tool.uv] required-version = ">=0.8.0" default-groups = ["dev", "test", "docs"] conflicts = [[{ group = "pydantic-v1" }, { group = "pydantic-v2" }]] [tool.uv.build-backend] module-name = "nonebot" module-root = "" [tool.pytest.ini_options] addopts = "--cov=nonebot --cov-report=term-missing" filterwarnings = ["error", "ignore::DeprecationWarning"] [tool.ruff] line-length = 88 target-version = "py39" [tool.ruff.format] line-ending = "lf" [tool.ruff.lint] select = [ "F", # Pyflakes "W", # pycodestyle warnings "E", # pycodestyle errors "I", # isort "UP", # pyupgrade "ASYNC", # flake8-async "C4", # flake8-comprehensions "T10", # flake8-debugger "T20", # flake8-print "PYI", # flake8-pyi "PT", # flake8-pytest-style "Q", # flake8-quotes "TID", # flake8-tidy-imports "RUF", # Ruff-specific rules ] ignore = [ "E402", # module-import-not-at-top-of-file "UP037", # quoted-annotation "RUF001", # ambiguous-unicode-character-string "RUF002", # ambiguous-unicode-character-docstring "RUF003", # ambiguous-unicode-character-comment ] [tool.ruff.lint.isort] force-sort-within-sections = true known-first-party = ["nonebot", "tests/*"] extra-standard-library = ["typing_extensions"] [tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false mark-parentheses = false [tool.ruff.lint.pyupgrade] keep-runtime-typing = true [tool.pyright] pythonVersion = "3.9" pythonPlatform = "All" defineConstant = { PYDANTIC_V2 = true } executionEnvironments = [ { root = "./tests/python_3_12", pythonVersion = "3.12", extraPaths = [ "./", ] }, { root = "./tests", extraPaths = [ "./", ] }, { root = "./" }, ] typeCheckingMode = "standard" reportShadowedImports = false disableBytesTypePromotions = true [build-system] requires = ["uv_build >=0.8.3, <0.9.0"] build-backend = "uv_build"