Files
2026-05-24 21:53:04 +03:00

126 lines
3.0 KiB
TOML

[project]
name = "mi-fitness"
version = "0.2.0"
description = "小米运动健康亲友数据 SDK"
readme = "README.md"
requires-python = ">=3.11"
authors = [{ name = "Misty02600", email = "xiao02600@gmail.com" }]
dependencies = [
"httpx>=0.28.1",
"loguru>=0.7.3",
"pydantic>=2.12.5",
"qrcode>=8.0",
"tenacity>=9.0.0",
]
[project.urls]
Homepage = "https://github.com/MistEO/MiSDK"
Issues = "https://github.com/MistEO/MiSDK/issues"
Repository = "https://github.com/MistEO/MiSDK.git"
[project.scripts]
mi-fitness-login = "mi_fitness.cli:main"
[dependency-groups]
dev = [
"basedpyright>=1.16.0",
"commitizen>=4.1.0",
"git-cliff>=2.11.0,<3.0.0",
"prek>=0.2.0",
"ruff>=0.14.13,<1.0.0",
{ include-group = "test" },
]
test = [
"pytest>=8.0.0",
"pytest-asyncio>=1.3.0,<1.4.0",
"pytest-cov>=7.0.0",
"pytest-xdist>=3.8.0,<4.0.0",
]
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
[tool.commitizen]
name = "cz_conventional_commits"
version = "0.2.0"
tag_format = "v$version"
version_files = ["pyproject.toml:^version"]
major_version_zero = true
[tool.coverage.report]
exclude_lines = [
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@overload",
"except ImportError:",
]
[tool.pyright]
include = ["src", "tests/unit"]
pythonVersion = "3.11"
pythonPlatform = "All"
typeCheckingMode = "standard"
[[tool.pyright.executionEnvironments]]
root = "tests"
reportPrivateUsage = "none"
reportUnknownMemberType = "none"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--strict-markers",
"--tb=short",
"-ra",
]
testpaths = ["tests/unit"]
pythonpath = ["src", "tests/unit"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.ruff]
line-length = 100
src = ["src", "tests/unit"]
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"F", # Pyflakes
"W", # pycodestyle warnings
"E", # pycodestyle errors
"I", # isort
"B", # flake8-bugbear
"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
]
ignore = [
"E501", # 行长度由 formatter 控制
"E402", # 允许模块导入不在文件顶部
"UP037", # 允许引号类型注解
"RUF001", # 允许字符串中的中文字符
"RUF002", # 允许文档字符串中的中文字符
"RUF003", # 允许注释中的中文字符
"W191", # 允许制表符缩进
"TID252", # 允许相对导入
"B008", # 允许函数参数默认值中使用函数调用
]
[tool.ruff.lint.isort]
extra-standard-library = ["typing_extensions"]
[tool.ruff.lint.per-file-ignores]
"examples/*" = ["T201", "ASYNC240", "ASYNC250"]
"src/mi_fitness/cli.py" = ["T201", "ASYNC240"]
"tests/e2e/*" = ["T201", "ASYNC230", "ASYNC240", "ASYNC250", "F541"]