🧑‍💻 使用 uv 管理项目 (#502)

* 🧑‍💻 使用 uv 管理项目

* 📝 更新 CONTRIBUTING.md

* 🔥 移除 Dependabot

*  修改默认安装的依赖组

* 💚 使用 uv 运行 CI

*  将特殊适配的适配器移动到 dev 依赖组

* 🚨 make mypy happy
This commit is contained in:
呵呵です
2024-10-27 18:46:46 +08:00
committed by GitHub
parent b2d5a1e729
commit 1d33872c9b
10 changed files with 3222 additions and 4520 deletions

View File

@@ -1,145 +1,153 @@
[tool.poetry]
name = 'nonebot-plugin-tetris-stats'
[project]
name = "nonebot-plugin-tetris-stats"
version = "1.5.5"
description = '一款基于 NoneBot2 的用于查询 Tetris 相关游戏数据的插件'
authors = ['scdhh <wallfjjd@gmail.com>']
readme = 'README.md'
homepage = 'https://github.com/shoucandanghehe/nonebot-plugin-tetris-stats'
repository = 'https://github.com/shoucandanghehe/nonebot-plugin-tetris-stats'
license = 'AGPL-3.0'
description = "一款基于 NoneBot2 的用于查询 Tetris 相关游戏数据的插件"
readme = "README.md"
authors = [{ name = "shoucandanghehe", email = "wallfjjd@gmail.com" }]
requires-python = ">=3.10"
dependencies = [
"aiocache>=0.12.3",
"aiofiles>=24.1.0",
"arclet-alconna<2",
"async-lru>=2.0.4",
"httpx>=0.27.2",
"jinja2>=3.1.4",
"lxml>=5.3.0",
"msgspec>=0.18.6",
"nonebot-plugin-alconna>=0.53.1",
"nonebot-plugin-apscheduler>=0.5.0",
"nonebot-plugin-localstore>=0.7.1",
"nonebot-plugin-orm>=0.7.6",
"nonebot-plugin-session>=0.3.2",
"nonebot-plugin-session-orm>=0.2.0",
"nonebot-plugin-user>=0.4.4",
"nonebot-plugin-userinfo>=0.2.6",
"nonebot2[fastapi]>=2.3.3",
"pandas>=2.2.3",
"pillow>=11.0.0",
"playwright>=1.48.0",
"rich>=13.9.3",
"yarl>=1.16.0",
]
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
keywords = ["nonebot2"]
[tool.poetry.dependencies]
python = '^3.10'
nonebot2 = { extras = ['fastapi'], version = '^2.3.0' }
nonebot-plugin-alconna = '>=0.48.0'
nonebot-plugin-apscheduler = '>=0.4,<0.6'
nonebot-plugin-localstore = '>=0.6,<0.8'
nonebot-plugin-orm = '>=0.1.1,<0.8.0'
nonebot-plugin-session = '^0.3.1'
nonebot-plugin-session-orm = '^0.2.0'
nonebot-plugin-user = '>=0.2,<0.5'
nonebot-plugin-userinfo = '^0.2.4'
aiocache = '^0.12.2'
aiofiles = '>=23.2.1,<25.0.0'
arclet-alconna = '<2.0.0'
async-lru = '^2.0.4'
httpx = '^0.27.0'
jinja2 = '^3.1.3'
lxml = '^5.1.0'
msgspec = '^0.18.6'
pandas = '>=1.4.3,<3.0.0'
pillow = '>=10.3,<12.0'
playwright = '^1.41.2'
rich = '^13.7.1'
yarl = '^1.9.4'
[tool.poetry.group.dev.dependencies]
basedpyright = '^1.17.0'
mypy = '>=1.9'
pandas-stubs = '>=1.5.2,<3.0.0'
ruff = '>=0.3.0'
types-aiofiles = '>=23.2.0.20240106,<25.0.0.0'
types-lxml = '^2024.2.9'
types-pillow = '^10.2.0.20240423'
types-ujson = '^5.9.0'
nonebot2 = { extras = ['all'], version = '^2.3.0' }
nonebot-adapter-discord = '^0.1.3'
nonebot-adapter-kaiheila = '^0.3.4'
nonebot-adapter-onebot = '^2.4.1'
nonebot-adapter-qq = '^1.4.4'
nonebot-adapter-satori = '>=0.11.4,<0.13.0'
nonebot-plugin-orm = { extras = ['default'], version = '>=0.3,<0.8' }
[tool.poetry.group.debug.dependencies]
matplotlib = '^3.9.2'
memory-profiler = '^0.61.0'
objprint = '^0.2.2'
pyqt6 = '^6.7.1'
viztracer = '>=0.16.2,<0.18.0'
[project.urls]
Homepage = "https://github.com/A-Minos/nonebot-plugin-tetris-stats"
Repository = "https://github.com/A-Minos/nonebot-plugin-tetris-stats"
Issues = "https://github.com/A-Minos/nonebot-plugin-tetris-stats/issues"
[build-system]
requires = ['poetry-core>=1.0.0']
build-backend = 'poetry.core.masonry.api'
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"basedpyright>=1.19.1",
"mypy>=1.13.0",
"nonebot-adapter-discord>=0.1.8",
"nonebot-adapter-kaiheila>=0.3.4",
"nonebot-adapter-onebot>=2.4.6",
"nonebot-adapter-qq>=1.5.3",
"ruff>=0.7.1",
]
typecheck = [
"pandas-stubs>=2.2.3.241009",
"types-aiofiles>=24.1.0.20240626",
"types-lxml>=2024.9.16",
"types-pillow>=10.2.0.20240822",
]
test = ["nonebot-adapter-satori>=0.12.6", "nonebot-plugin-orm[default]>=0.7.6", "nonebot2[aiohttp,fastapi]>=2.3.3"]
debug = ["matplotlib>=3.9.2", "memory-profiler>=0.61.0", "objprint>=0.2.3", "pyqt6>=6.7.1", "viztracer>=0.17.0"]
[tool.uv]
default-groups = ["dev", "typecheck"]
[tool.ruff]
line-length = 120
target-version = 'py310'
target-version = "py310"
[tool.ruff.lint]
select = [
'F', # pyflakes
'E', # pycodestyle errors
'W', # pycodestyle warnings
'C90', # mccabe
'I', # isort
'N', # PEP8-naming
'UP', # pyupgrade
'YTT', # flake8-2020
'ANN', # flake8-annotations
'ASYNC', # flake8-async
'S', # flake8-bandit
'BLE', # flake8-blind-except
'FBT', # flake8-boolean-trap
'B', # flake8-bugbear
'A', # flake8-builtins
'COM', # flake8-commas
'C4', # flake8-comprehensions
'DTZ', # flake8-datetimez
'T10', # flake8-debugger
'EM', # flake8-errmsg
'FA', # flake8-future-annotations
'ISC', # flake8-implicit-str-concat
'ICN', # flake8-import-conventions
'PIE', # flake8-pie
'T20', # flake8-print
'PYI', # flake8-pyi
'Q', # flake8-quotes
'RSE', # flake8-raise
'RET', # flake8-return
'SLF', # flake8-self
'SLOT', # flake8-slots
'SIM', # flake8-simplify
'TID', # flake8-tidy-imports
'TCH', # flake8-type-checking
'ARG', # flake8-unused-arguments
'PTH', # flake8-use-pathlib
'ERA', # eradicate
'PD', # pandas-vet
'PGH', # pygrep-hooks
'PL', # pylint
'TRY', # tryceratops
'FLY', # flynt
'FAST', # FastAPI
'PERF', # Perflint
'FURB', # refurb
'RUF', # Ruff-specific rules
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"C90", # mccabe
"I", # isort
"N", # PEP8-naming
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"FLY", # flynt
"FAST", # FastAPI
"PERF", # Perflint
"FURB", # refurb
"RUF", # Ruff-specific rules
]
ignore = [
'E501', # 过长的行由 ruff format 处理, 剩余的都是字符串
'ANN101', # 由 type checker 自动推断
'ANN102', # 由 type checker 自动推断
'ANN202', # 向 NoneBot 注册的函数
'TRY003',
'COM812', # 强制尾随逗号
'TID252', # 相对导入
'ISC001', # format warning
"E501", # 过长的行由 ruff format 处理, 剩余的都是字符串
"ANN101", # 由 type checker 自动推断
"ANN102", # 由 type checker 自动推断
"ANN202", # 向 NoneBot 注册的函数
"TRY003",
"COM812", # 强制尾随逗号
"TID252", # 相对导入
"ISC001", # format warning
]
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
flake8-quotes = { inline-quotes = "single", multiline-quotes = "double" }
[tool.ruff.lint.flake8-annotations]
mypy-init-return = true
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ['id']
builtins-ignorelist = ["id"]
[tool.ruff.format]
quote-style = 'single'
quote-style = "single"
[tool.basedpyright]
pythonVersion = '3.10'
pythonPlatform = 'All'
pythonVersion = "3.10"
pythonPlatform = "All"
defineConstant = { PYDANTIC_V2 = true }
typeCheckingMode = 'standard'
typeCheckingMode = "standard"
[tool.nonebot]
plugins = ['nonebot_plugin_tetris_stats']
plugins = ["nonebot_plugin_tetris_stats"]