签入版本

This commit is contained in:
2026-09-12 19:09:28 +08:00
commit 4eae62bc17
803 changed files with 105034 additions and 0 deletions
+72
View File
@@ -0,0 +1,72 @@
# ============================================================
# DjangoAdmin Flask 项目管理配置
# ============================================================
# 说明:
# 1. 运行依赖以 requirements.txt 为唯一事实来源(应用工程部署约定)。
# [project].dependencies 通过 [tool.setuptools.dynamic] 直接读取
# requirements.txt,二者自动保持同步、无需手工镜像。
# 2. 本文件承载各开发工具(pytest/black/isort/mypy/coverage)统一配置。
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[project]
name = "djangoadmin-flask"
version = "3.0.0"
description = "DjangoAdmin 企业数字化开发平台(后端)"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "Apache-2.0"}
authors = [
{name = "小蚂蚁云团队", email = "djangoadmin@126.com"},
]
dynamic = ["dependencies"]
# dependencies 动态读取 requirements.txt(以它为准,改动 requirements.txt 即同步)
[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
# ============================================================
# pytest
# ============================================================
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers"
python_files = ["test_*.py"]
filterwarnings = [
# 存量依赖(Flask-SQLAlchemy 3.x 等)DeprecationWarning 噪音较多,暂统一忽略
"ignore::DeprecationWarning",
]
# ============================================================
# black(代码格式化)
# ============================================================
[tool.black]
line-length = 120
target-version = ["py39", "py310", "py311", "py312"]
skip-string-normalization = false
# ============================================================
# isort(import 排序)
# ============================================================
[tool.isort]
profile = "black"
line_length = 120
skip_gitignore = true
known_first_party = ["application", "config", "extensions", "src", "utils"]
# ============================================================
# mypy(类型检查)
# ============================================================
[tool.mypy]
python_version = "3.9"
ignore_missing_imports = true
warn_unused_configs = true
exclude = ["migrations/", "ui/", "static/"]
# ============================================================
# coverage(pytest-cov)
# ============================================================
[tool.coverage.run]
omit = ["migrations/*", "ui/*", "static/*", "tests/*", "scripts/*"]