pyproject.toml
This file
Path
pyproject.toml
230 lines · 6.0 KiB · TOML
Last changed by
👷 Speed up the CI by shuffling the test matrix (#1815)Sofie Van Landeghembefore adoption2e9bf9e
History of this fileTake it
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231[build-system]requires = ["pdm-backend"]build-backend = "pdm.backend"
[project]name = "typer"license = "MIT"license-files = ["LICENSE"]dynamic = ["version"]description = "Typer, build great CLIs. Easy to code. Based on Python type hints."authors = [ {name = "Sebastián Ramírez", email = "tiangolo@gmail.com"},]requires-python = ">=3.10"classifiers = [ "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Libraries", "Topic :: Software Development", "Typing :: Typed", "Development Status :: 4 - Beta", "Intended Audience :: Developers", "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", "Programming Language :: Python :: 3.14",]dependencies = [ "shellingham >=1.3.0", "rich >=13.8.0", "annotated-doc >=0.0.2", "colorama; platform_system == 'Windows'",]readme = "README.md"
[project.urls]Homepage = "https://github.com/fastapi/typer"Documentation = "https://typer.tiangolo.com"Repository = "https://github.com/fastapi/typer"Issues = "https://github.com/fastapi/typer/issues"Changelog = "https://typer.tiangolo.com/release-notes/"
[project.scripts]typer = "typer.cli:main"
[dependency-groups]dev = [ { include-group = "tests" }, { include-group = "docs" }, "prek >=0.3.2", "zizmor >=1.23.1",]docs = [ "cairosvg >=2.8.2", "griffe-typingdoc >=0.3.0", "griffe-warnings-deprecated >=1.1.0", "markdown-include-variants >=0.0.8", "mdx-include >=1.4.1", "mkdocstrings[python] >=1.0.3", "pillow >=11.3.0", "pyyaml >=5.3.1", "zensical>=0.0.42",]github-actions = [ "httpx >=0.27.0", "pydantic >=2.5.3", "pydantic-settings >=2.1.0", "pygithub >=2.3.0", "smokeshow >=0.5.0",]tests = [ "coverage[toml] >=7.13", "mypy >=1.19.1", "ty >=0.0.25", "pytest >=9.0.0", "pytest-cov >=7.0.0", "pytest-sugar >=1.0.0", "pytest-xdist >=3.6.1", "rich >=12.3.0", "ruff >=0.15.0", "shellingham >=1.3.0",]
[tool.pdm]version = { source = "file", path = "typer/__init__.py" }distribution = true
[tool.pdm.build]source-includes = [ "tests/", "docs_src/", "scripts/",]
[tool.pytest]minversion = "9.0"addopts = [ "--strict-config", "--strict-markers",]strict_xfail = truefilterwarnings = [ "error", # For pytest-xdist 'ignore::DeprecationWarning:xdist',]
[tool.coverage.run]parallel = truedata_file = "coverage/.coverage"source = [ "docs_src", "tests", "typer"]omit = [ "typer/_typing.py",]context = '${CONTEXT}'relative_files = true
[tool.coverage.report]exclude_lines = [ "pragma: no cover", "@overload", 'if __name__ == "__main__":', "if TYPE_CHECKING:",]
[tool.mypy]strict = true
[[tool.mypy.overrides]]module = "docs_src.*"disallow_incomplete_defs = falsedisallow_untyped_defs = falsedisallow_untyped_calls = false
[[tool.mypy.overrides]]module = "shellingham"ignore_missing_imports = true
[tool.ruff.lint]select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "B", # flake8-bugbear "C4", # flake8-comprehensions "UP", # pyupgrade "TID", # flake8-tidy-imports]ignore = [ "E501", # line too long, handled by black "B008", # do not perform function calls in argument defaults "C901", # too complex "TID252", # relative imports okay]
[tool.ruff.lint.per-file-ignores]# "__init__.py" = ["F401"]# rich_utils is allowed to use rich imports"typer/rich_utils.py" = ["TID251"]# This file is more readable without yield from"docs_src/progressbar/tutorial004_py310.py" = ["UP028", "B007"]# Default mutable data structure"docs_src/options_autocompletion/tutorial006_an_py310.py" = ["B006"]"docs_src/multiple_values/multiple_options/tutorial002_an_py310.py" = ["B006"]"docs_src/options_autocompletion/tutorial007_an_py310.py" = ["B006"]"docs_src/options_autocompletion/tutorial008_an_py310.py" = ["B006"]"docs_src/options_autocompletion/tutorial009_an_py310.py" = ["B006"]"docs_src/parameter_types/enum/tutorial003_an_py310.py" = ["B006"]# Loop control variable `value` not used within loop body"docs_src/progressbar/tutorial001_py310.py" = ["B007"]"docs_src/progressbar/tutorial003_py310.py" = ["B007"]"docs_src/progressbar/tutorial005_py310.py" = ["B007"]"docs_src/progressbar/tutorial006_py310.py" = ["B007"]# Local variable `delete` is assigned to but never used"docs_src/prompt/tutorial003_py310.py" = ["F841"]# No need to worry about rich imports in docs"docs_src/*" = ["TID"]
[tool.ruff.lint.isort]known-third-party = ["typer"]# For docs_src/subcommands/tutorial003/known-first-party = ["reigns", "towns", "lands", "items", "users"]
[tool.ruff.lint.pyupgrade]# Preserve types, even if a file imports `from __future__ import annotations`.keep-runtime-typing = true
[tool.ruff.lint.flake8-tidy-imports]# Import rich_utils from within functions (lazy), not at the module level (TID253)banned-module-level-imports = ["typer.rich_utils"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]"rich".msg = "Use 'typer.rich_utils' instead of importing from 'rich' directly.""shellingham.detect_shell".msg = """\Use 'typer._completion_shared._get_shell_name' instead of using \'shellingham.detect_shell' directly."""
[tool.ty.terminal]error-on-warning = true
[tool.typos.files]extend-exclude = [ "coverage/", "dist/", "docs/img/", "docs/release-notes.md", "htmlcov/", "site/", "site_build/", "uv.lock",]
[tool.typos.default.extend-identifiers]alls = "alls"
[tool.typos.default.extend-words]Ines = "Ines"