Skip to content
Myr

pyproject.toml

This file

Path

pyproject.toml

248 lines · 8.6 KiB · TOML

Last changed by

➖ Drop support for Python 3.8 (#1464)Sebastián Ramírezbefore adoptionfbff83e

History of this file

Take it

The walk stopped after 200 commits: lines older than 0b8fa09 point at it.

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 1–6why, one step back
1[build-system]
2requires = ["pdm-backend"]3build-backend = "pdm.backend"45[project]6name = "typer"

🔧 Add PEP-639 license metadata (#1387)Sofie Van Landeghembefore adoption53e9b3c

lines 7–8why, one step back
7license = "MIT"
8license-files = ["LICENSE"]

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 9–13why, one step back
9dynamic = ["version"]
10description = "Typer, build great CLIs. Easy to code. Based on Python type hints."11authors = [12 {name = "Sebastián Ramírez", email = "tiangolo@gmail.com"},13]

➖ Drop support for Python 3.8 (#1464)Sebastián Ramírezbefore adoptionfbff83e

line 14why, one step back
14requires-python = ">=3.9"

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 15–33why, one step back
15classifiers = [
16 "Intended Audience :: Information Technology",17 "Intended Audience :: System Administrators",18 "Operating System :: OS Independent",19 "Programming Language :: Python :: 3",20 "Programming Language :: Python",21 "Topic :: Software Development :: Libraries :: Application Frameworks",22 "Topic :: Software Development :: Libraries :: Python Modules",23 "Topic :: Software Development :: Libraries",24 "Topic :: Software Development",25 "Typing :: Typed",26 "Development Status :: 4 - Beta",27 "Intended Audience :: Developers",28 "Programming Language :: Python :: 3 :: Only",29 "Programming Language :: Python :: 3.9",30 "Programming Language :: Python :: 3.10",31 "Programming Language :: Python :: 3.11",32 "Programming Language :: Python :: 3.12",33 "Programming Language :: Python :: 3.13",

⬆️ Add support for Python 3.14 (#1372)Sofie Van Landeghembefore adoption9e4764d

line 34why, one step back
34 "Programming Language :: Python :: 3.14",

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 35–36why, one step back
35]
36dependencies = [

📌 Remove pin for Click < 8.3.0 now that there's a fix for the changes (#1346)Sebastián Ramírezbefore adoptiond0406c6

line 37why, one step back
37 "click >= 8.0.0",

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 38–131why, one step back
38 "typing-extensions >= 3.7.4.3",
39]40readme = "README.md"41[project.urls]42Homepage = "https://github.com/fastapi/typer"43Documentation = "https://typer.tiangolo.com"44Repository = "https://github.com/fastapi/typer"45Issues = "https://github.com/fastapi/typer/issues"46Changelog = "https://typer.tiangolo.com/release-notes/"4748[project.optional-dependencies]49standard = [50 "shellingham >=1.3.0",51 "rich >=10.11.0",52]5354[tool.pdm]55version = { source = "file", path = "typer/__init__.py" }56distribution = true5758[tool.pdm.build]59source-includes = [60 "tests/",61 "docs_src/",62 "requirements*.txt",63 "scripts/",64 ]6566[tool.tiangolo._internal-slim-build]67sync-dependencies = [68 "typer-slim[standard]",69 "typer-cli",70 "typer"71]7273[tool.tiangolo._internal-slim-build.packages.typer-slim.project]74name = "typer-slim"7576[tool.tiangolo._internal-slim-build.packages.typer]77include-optional-dependencies = ["standard"]7879[tool.tiangolo._internal-slim-build.packages.typer.project]80optional-dependencies = {}8182[tool.tiangolo._internal-slim-build.packages.typer.project.scripts]83typer = "typer.cli:main"8485[tool.tiangolo._internal-slim-build.packages.typer-cli.project]86name = "typer-cli"87readme = "typer-cli/README.md"88dependencies = [89 "typer",90]91optional-dependencies = {}9293[tool.tiangolo._internal-slim-build.packages.typer-cli.tool.pdm.build]94# excludes needs to explicitly exclude the top level python packages,95# otherwise PDM includes them by default96# A "*" glob pattern can't be used here because in PDM internals, the patterns are put97# in a set (unordered, order varies) and each excluded file is assigned one of the98# glob patterns that matches, as the set is unordered, the matched pattern could be "*"99# independent of the order here. And then the internal code would give it a lower score100# than the one for a default included file.101# By not using "*" and explicitly excluding the top level packages, they get a higher102# score than the default inclusion103excludes = ["typer", "tests", "pdm_build.py"]104# source-includes needs to explicitly define some value because PDM will check the105# truthy value of the list, and if empty, will include some defaults, including "tests",106# an empty string doesn't match anything, but makes the list truthy, so that PDM107# doesn't override it during the build.108source-includes = [""]109110[tool.pytest.ini_options]111addopts = [112 "--strict-config",113 "--strict-markers",114]115xfail_strict = true116junit_family = "xunit2"117filterwarnings = [118 "error",119 # For pytest-xdist120 'ignore::DeprecationWarning:xdist',121]122123[tool.coverage.run]124parallel = true125data_file = "coverage/.coverage"126source = [127 "docs_src",128 "tests",129 "typer"130]131omit = [

📝 Update code examples to Python 3.9 (#1459)Motov Yuriibefore adoption51e48d2

lines 132–160why, one step back
132 "typer/_typing.py",
133 "docs_src/app_dir/tutorial001_py39.py", # ToDo: add test134 "docs_src/arguments/optional/tutorial000_py39.py", # ToDo: add test135 "docs_src/launch/tutorial001_py39.py", # ToDo: add test136 "docs_src/launch/tutorial002_py39.py", # ToDo: add test137 "docs_src/options/callback/tutorial002_*.py", # ToDo: add test138 "docs_src/options/help/tutorial004_*.py", # ToDo: add test139 "docs_src/options/password/tutorial001_*.py", # ToDo: add test140 "docs_src/options/password/tutorial002_*.py", # ToDo: add test141 "docs_src/options/version/tutorial001_*.py", # ToDo: add test142 "docs_src/options/version/tutorial002_*.py", # ToDo: add test143 "docs_src/options_autocompletion/tutorial001_*.py", # ToDo: add test144 "docs_src/options_autocompletion/tutorial005_*.py", # ToDo: add test145 "docs_src/options_autocompletion/tutorial006_*.py", # ToDo: add test146 "docs_src/printing/tutorial001_py39.py", # ToDo: add test147 "docs_src/printing/tutorial002_py39.py", # ToDo: add test148 "docs_src/printing/tutorial003_py39.py", # ToDo: add test149 "docs_src/printing/tutorial004_py39.py", # ToDo: add test150 "docs_src/printing/tutorial005_py39.py", # ToDo: add test151 "docs_src/printing/tutorial006_py39.py", # ToDo: add test152 "docs_src/progressbar/tutorial001_py39.py", # ToDo: add test153 "docs_src/progressbar/tutorial002_py39.py", # ToDo: add test154 "docs_src/progressbar/tutorial003_py39.py", # ToDo: add test155 "docs_src/progressbar/tutorial004_py39.py", # ToDo: add test156 "docs_src/progressbar/tutorial005_py39.py", # ToDo: add test157 "docs_src/progressbar/tutorial006_py39.py", # ToDo: add test158 "docs_src/prompt/tutorial004_py39.py", # ToDo: add test159 "docs_src/using_click/tutorial001_py39.py", # ToDo: add test160 "docs_src/using_click/tutorial002_py39.py", # ToDo: add test

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 161–194why, one step back
161]
162context = '${CONTEXT}'163relative_files = true164165[tool.coverage.report]166exclude_lines = [167 "pragma: no cover",168 "@overload",169 'if __name__ == "__main__":',170 "if TYPE_CHECKING:",171]172173[tool.mypy]174strict = true175176[[tool.mypy.overrides]]177module = "docs_src.*"178disallow_incomplete_defs = false179disallow_untyped_defs = false180disallow_untyped_calls = false181182[[tool.mypy.overrides]]183module = "shellingham"184ignore_missing_imports = true185186[tool.ruff.lint]187select = [188 "E", # pycodestyle errors189 "W", # pycodestyle warnings190 "F", # pyflakes191 "I", # isort192 "B", # flake8-bugbear193 "C4", # flake8-comprehensions194 "UP", # pyupgrade

✅ Use Ruff rules to ensure safe lazy-loading of `rich` (#1297)Nathan McDougallbefore adoption661b49e

line 195why, one step back
195 "TID", # flake8-tidy-imports

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 196–201why, one step back
196]
197ignore = [198 "E501", # line too long, handled by black199 "B008", # do not perform function calls in argument defaults200 "C901", # too complex201 "W191", # indentation contains tabs

✅ Use Ruff rules to ensure safe lazy-loading of `rich` (#1297)Nathan McDougallbefore adoption661b49e

line 202why, one step back
202 "TID252", # relative imports okay

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 203–206why, one step back
203]
204205[tool.ruff.lint.per-file-ignores]206# "__init__.py" = ["F401"]

✅ Use Ruff rules to ensure safe lazy-loading of `rich` (#1297)Nathan McDougallbefore adoption661b49e

lines 207–208why, one step back
207# rich_utils is allowed to use rich imports
208"typer/rich_utils.py" = ["TID251"]

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

line 209why, one step back
209# This file is more readable without yield from

📝 Update code examples to Python 3.9 (#1459)Motov Yuriibefore adoption51e48d2

line 210why, one step back
210"docs_src/progressbar/tutorial004_py39.py" = ["UP028", "B007"]

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

line 211why, one step back
211# Default mutable data structure

📝 Update code examples to Python 3.9 (#1459)Motov Yuriibefore adoption51e48d2

lines 212–217why, one step back
212"docs_src/options_autocompletion/tutorial006_an_py39.py" = ["B006"]
213"docs_src/multiple_values/multiple_options/tutorial002_an_py39.py" = ["B006"]214"docs_src/options_autocompletion/tutorial007_an_py39.py" = ["B006"]215"docs_src/options_autocompletion/tutorial008_an_py39.py" = ["B006"]216"docs_src/options_autocompletion/tutorial009_an_py39.py" = ["B006"]217"docs_src/parameter_types/enum/tutorial003_an_py39.py" = ["B006"]

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

line 218why, one step back
218# Loop control variable `value` not used within loop body

📝 Update code examples to Python 3.9 (#1459)Motov Yuriibefore adoption51e48d2

lines 219–222why, one step back
219"docs_src/progressbar/tutorial001_py39.py" = ["B007"]
220"docs_src/progressbar/tutorial003_py39.py" = ["B007"]221"docs_src/progressbar/tutorial005_py39.py" = ["B007"]222"docs_src/progressbar/tutorial006_py39.py" = ["B007"]

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

line 223why, one step back
223# Local variable `delete` is assigned to but never used

📝 Update code examples to Python 3.9 (#1459)Motov Yuriibefore adoption51e48d2

line 224why, one step back
224"docs_src/prompt/tutorial003_py39.py" = ["F841"]

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

line 225why, one step back
225# Loop control variable `x` not used within loop body

📝 Update code examples to Python 3.9 (#1459)Motov Yuriibefore adoption51e48d2

line 226why, one step back
226"docs_src/using_click/tutorial001_py39.py" = ["B007"]

✅ Use Ruff rules to ensure safe lazy-loading of `rich` (#1297)Nathan McDougallbefore adoption661b49e

lines 227–228why, one step back
227# No need to worry about rich imports in docs
228"docs_src/*" = ["TID"]

✨ Allow annotated parsing with a subclass of `Path` (#1183)David Stuebebefore adoption0b8fa09

lines 229–237why, one step back
229
230[tool.ruff.lint.isort]231known-third-party = ["typer", "click"]232# For docs_src/subcommands/tutorial003/233known-first-party = ["reigns", "towns", "lands", "items", "users"]234235[tool.ruff.lint.pyupgrade]236# Preserve types, even if a file imports `from __future__ import annotations`.237keep-runtime-typing = true

✅ Use Ruff rules to ensure safe lazy-loading of `rich` (#1297)Nathan McDougallbefore adoption661b49e

lines 238–244why, one step back
238
239[tool.ruff.lint.flake8-tidy-imports]240# Import rich_utils from within functions (lazy), not at the module level (TID253)241banned-module-level-imports = ["typer.rich_utils"]242243[tool.ruff.lint.flake8-tidy-imports.banned-api]244"rich".msg = "Use 'typer.rich_utils' instead of importing from 'rich' directly."

♻️ Refactor the handling of `shellingham` (#1347)Nathan McDougallbefore adoptionfd4241f

lines 245–248why, one step back
245"shellingham.detect_shell".msg = """\
246Use 'typer._completion_shared._get_shell_name' instead of using \247'shellingham.detect_shell' directly.248"""