# ============================================================ # DjangoAdmin Flask+EleVue 项目管理配置 # ============================================================ # 说明: # 1. 本项目为应用工程(非库),运行依赖由 requirements.txt 管理, # 此处不重复声明(与既有部署约定保持一致)。 # 2. 本文件承载各开发工具(pytest/black/isort/mypy)统一配置。 [project] name = "djangoadmin-flask-elevue" version = "3.0.0" description = "DjangoAdmin Flask+EleVue 企业数字化开发平台(后端)" readme = "README.md" requires-python = ">=3.9" license = {text = "Apache-2.0"} authors = [ {name = "一米阳光团队", email = "djangoadmin@126.com"}, ] dependencies = [] # ============================================================ # 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/*"]