Skip to content

Commit f4f9d13

Browse files
committed
🔁 Merge branch 'master' into pr/svlandeg/1504
2 parents 0e57ee9 + ffae793 commit f4f9d13

20 files changed

Lines changed: 951 additions & 575 deletions

File tree

.github/workflows/build-docs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ jobs:
6464
with:
6565
key: mkdocs-cards-${{ github.ref }}-v1
6666
path: .cache
67-
- name: Verify README
68-
run: uv run ./scripts/docs.py verify-readme
6967
- name: Build Docs
7068
run: uv run ./scripts/docs.py build
7169
- uses: actions/upload-artifact@v6

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ jobs:
5555
uv.lock
5656
- name: Install Dependencies
5757
run: uv sync --locked --no-dev --group tests
58-
- name: Lint
59-
if: matrix.python-version != '3.9'
60-
run: uv run bash scripts/lint.sh
6158
- run: mkdir coverage
6259
- run: uv run bash scripts/test-files.sh
6360
- name: Test

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,24 @@ repos:
2727
require_serial: true
2828
language: unsupported
2929
types: [python]
30+
31+
- id: local-mypy
32+
name: mypy check
33+
entry: uv run mypy typer
34+
require_serial: true
35+
language: unsupported
36+
pass_filenames: false
37+
38+
# - id: local-ty
39+
# name: ty
40+
# entry: uv run ty check typer
41+
# require_serial: true
42+
# language: unsupported
43+
# pass_filenames: false
44+
45+
- id: generate-readme
46+
language: unsupported
47+
name: generate README.md from index.md
48+
entry: uv run ./scripts/docs.py generate-readme
49+
files: ^docs/index\.md|scripts/docs\.py$
50+
pass_filenames: false

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ The key features are:
4040
* **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments.
4141
* **Run scripts**: Typer includes a `typer` command/program that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.
4242

43+
## 2026 February - Typer developer survey
44+
45+
Help us define Typer's future by filling the <a href="https://forms.gle/nYvutPrVkmBQZLas7" class="external-link" target="_blank">Typer developer survey</a>. ✨
46+
4347
## FastAPI of CLIs
4448

4549
**Typer** is <a href="https://fastapi.tiangolo.com" class="external-link" target="_blank">FastAPI</a>'s little sibling, it's the FastAPI of CLIs.

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ The key features are:
4646
* **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments.
4747
* **Run scripts**: Typer includes a `typer` command/program that you can use to run scripts, automatically converting them to CLIs, even if they don't use Typer internally.
4848

49+
## 2026 February - Typer developer survey
50+
51+
Help us define Typer's future by filling the <a href="https://forms.gle/nYvutPrVkmBQZLas7" class="external-link" target="_blank">Typer developer survey</a>. ✨
52+
4953
## FastAPI of CLIs
5054

5155
**Typer** is <a href="https://fastapi.tiangolo.com" class="external-link" target="_blank">FastAPI</a>'s little sibling, it's the FastAPI of CLIs.

docs/management-tasks.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Make sure you use a supported label from the <a href="https://github.com/tiangol
6868
* `refactor`: Refactors
6969
* This is normally for changes to the internal code that don't change the behavior. Normally it improves maintainability, or enables future features, etc.
7070
* `upgrade`: Upgrades
71-
* This is for upgrades to direct dependencies from the project, or extra optional dependencies, normally in `pyproject.toml`. So, things that would affect final users, they would end up receiving the upgrade in their code base once they update. But this is not for upgrades to internal dependencies used for development, testing, docs, etc. Those internal dependencies, normally in `requirements.txt` files or GitHub Action versions should be marked as `internal`, not `upgrade`.
71+
* This is for upgrades to direct dependencies from the project, or extra optional dependencies, normally in `pyproject.toml`. So, things that would affect final users, they would end up receiving the upgrade in their code base once they update. But this is not for upgrades to internal dependencies used for development, testing, docs, etc. Those internal dependencies or GitHub Action versions should be marked as `internal`, not `upgrade`.
7272
* `docs`: Docs
7373
* Changes in docs. This includes updating the docs, fixing typos. But it doesn't include changes to translations.
7474
* You can normally quickly detect it by going to the "Files changed" tab in the PR and checking if the updated file(s) starts with `docs/en/docs`. The original version of the docs is always in English, so in `docs/en/docs`.
@@ -83,14 +83,18 @@ Some tools like Dependabot, will add some labels, like `dependencies`, but have
8383

8484
## Review PRs
8585

86-
If a PR doesn't explain what it does or why, ask for more information.
86+
* If a PR doesn't explain what it does or why, if it seems like it could be useful, ask for more information. Otherwise, feel free to close it.
8787

88-
A PR should have a specific use case that it is solving.
88+
* If a PR seems to be spam, meaningless, only to change statistics (to appear as "contributor") or similar, you can simply mark it as `invalid`, and it will be automatically closed.
89+
90+
* If a PR seems to be AI generated, and seems like reviewing it would take more time from you than the time it took to write the prompt, mark it as `maybe-ai`, and it will be automatically closed.
91+
92+
* A PR should have a specific use case that it is solving.
8993

9094
* If the PR is for a feature, it should have docs.
9195
* Unless it's a feature we want to discourage, like support for a corner case that we don't want users to use.
9296
* The docs should include a source example file, not write Python directly in Markdown.
93-
* If the source example(s) file can have different syntax for Python different Python versions, there should be different versions of the file, and they should be shown in tabs in the docs.
97+
* If the source example(s) file can have different syntax for different Python versions, there should be different versions of the file, and they should be shown in tabs in the docs.
9498
* There should be tests testing the source example.
9599
* Before the PR is applied, the new tests should fail.
96100
* After applying the PR, the new tests should pass.
@@ -103,13 +107,11 @@ A PR should have a specific use case that it is solving.
103107

104108
Dependabot will create PRs to update dependencies for several things, and those PRs all look similar, but some are way more delicate than others.
105109

106-
* If the PR is for a direct dependency, so, Dependabot is modifying `pyproject.toml`, **don't merge it**. 😱 Let me check it first. There's a good chance that some additional tweaks or updates are needed.
107-
* If the PR updates one of the internal dependencies, for example it's modifying `requirements.txt` files, or GitHub Action versions, if the tests are passing, the release notes (shown in a summary in the PR) don't show any obvious potential breaking change, you can merge it. 😎
110+
* If the PR is for a direct dependency, so, Dependabot is modifying `pyproject.toml` in the main dependencies, **don't merge it**. 😱 Let me check it first. There's a good chance that some additional tweaks or updates are needed.
111+
* If the PR updates one of the internal dependencies, for example the group `dev` in `pyproject.toml`, or GitHub Action versions, if the tests are passing, the release notes (shown in a summary in the PR) don't show any obvious potential breaking change, you can merge it. 😎
108112

109113
## Mark GitHub Discussions Answers
110114

111115
When a question in GitHub Discussions has been answered, mark the answer by clicking "Mark as answer".
112116

113-
Many of the current Discussion Questions were migrated from old issues. Many have the label `answered`, that means they were answered when they were issues, but now in GitHub Discussions, it's not known what is the actual response from the messages.
114-
115117
You can filter discussions by <a href="https://github.com/fastapi/typer/discussions/categories/questions?discussions_q=category:Questions+is:open+is:unanswered" class="external-link" target="_blank">`Questions` that are `Unanswered`</a>.

docs/release-notes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,39 @@
22

33
## Latest Changes
44

5+
### Fixes
6+
7+
* 🐛 Fix highlighting of optional variadic argument metavars. PR [#1508](https://github.com/fastapi/typer/pull/1508) by [@BenjyWiener](https://github.com/BenjyWiener).
8+
* 🐛 Fix `--help` text alignment when using `typer.style()` in option descriptions. PR [#1356](https://github.com/fastapi/typer/pull/1356) by [@mahimairaja](https://github.com/mahimairaja).
9+
10+
### Refactors
11+
12+
* 🎨 Update types and errors, comment ty for now. PR [#1531](https://github.com/fastapi/typer/pull/1531) by [@tiangolo](https://github.com/tiangolo).
13+
14+
### Upgrades
15+
16+
* ➖ Drop `typing-extensions` as external dependency. PR [#1467](https://github.com/fastapi/typer/pull/1467) by [@svlandeg](https://github.com/svlandeg).
17+
518
### Docs
619

20+
* 📝 Update `management-tasks.md` to be in line with `management-tasks.md` in FastAPI repo. PR [#1519](https://github.com/fastapi/typer/pull/1519) by [@YuriiMotov](https://github.com/YuriiMotov).
21+
* 📝 Add link to Typer developer survey. PR [#1514](https://github.com/fastapi/typer/pull/1514) by [@tiangolo](https://github.com/tiangolo).
722
* 📝 Add contribution instructions about LLM generated code and comments and automated tools for PRs. PR [#1489](https://github.com/fastapi/typer/pull/1489) by [@alejsdev](https://github.com/alejsdev).
823
* 🐛 Fix copy button in `custom.js`. PR [#1488](https://github.com/fastapi/typer/pull/1488) by [@alejsdev](https://github.com/alejsdev).
924

1025
### Internal
1126

27+
* 🔧 Remove no longer used requirements.txt file. PR [#1528](https://github.com/fastapi/typer/pull/1528) by [@tiangolo](https://github.com/tiangolo).
28+
* 📌 Update internal dependency limits. PR [#1529](https://github.com/fastapi/typer/pull/1529) by [@tiangolo](https://github.com/tiangolo).
29+
* 🔧 Add ty to pre-commit. PR [#1527](https://github.com/fastapi/typer/pull/1527) by [@tiangolo](https://github.com/tiangolo).
30+
* 👷 Add `ty` to the CI `lint` check. PR [#1477](https://github.com/fastapi/typer/pull/1477) by [@svlandeg](https://github.com/svlandeg).
31+
* ⬆ Bump prek from 0.3.1 to 0.3.2. PR [#1524](https://github.com/fastapi/typer/pull/1524) by [@dependabot[bot]](https://github.com/apps/dependabot).
32+
* ⬆ Bump ruff from 0.14.14 to 0.15.0. PR [#1516](https://github.com/fastapi/typer/pull/1516) by [@dependabot[bot]](https://github.com/apps/dependabot).
33+
* 🔧 Add generate-readme to pre-commit. PR [#1515](https://github.com/fastapi/typer/pull/1515) by [@tiangolo](https://github.com/tiangolo).
34+
* 👷 Run mypy in pre-commit instead of `Lint` step in `test.yml` workflow. PR [#1511](https://github.com/fastapi/typer/pull/1511) by [@YuriiMotov](https://github.com/YuriiMotov).
35+
* ⬆ Bump prek from 0.3.0 to 0.3.1. PR [#1510](https://github.com/fastapi/typer/pull/1510) by [@dependabot[bot]](https://github.com/apps/dependabot).
36+
* ⬆ Bump rich from 14.3.1 to 14.3.2. PR [#1509](https://github.com/fastapi/typer/pull/1509) by [@dependabot[bot]](https://github.com/apps/dependabot).
37+
* ✅ Update test to use `mod` fixture. PR [#1506](https://github.com/fastapi/typer/pull/1506) by [@svlandeg](https://github.com/svlandeg).
1238
* ⬆ Bump rich from 14.2.0 to 14.3.1. PR [#1502](https://github.com/fastapi/typer/pull/1502) by [@dependabot[bot]](https://github.com/apps/dependabot).
1339
* ⬆ Bump ruff from 0.14.13 to 0.14.14. PR [#1499](https://github.com/fastapi/typer/pull/1499) by [@dependabot[bot]](https://github.com/apps/dependabot).
1440
* 🔧 Ensure that an edit to `uv.lock` gets the `internal` label. PR [#1497](https://github.com/fastapi/typer/pull/1497) by [@svlandeg](https://github.com/svlandeg).

pyproject.toml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ classifiers = [
3535
]
3636
dependencies = [
3737
"click >= 8.0.0",
38-
"typing-extensions >= 3.7.4.3",
39-
"annotated-doc>=0.0.2",
38+
"annotated-doc >=0.0.2",
4039
]
4140
readme = "README.md"
4241

@@ -57,38 +56,39 @@ standard = [
5756
dev = [
5857
{ include-group = "tests" },
5958
{ include-group = "docs" },
60-
"prek==0.3.0",
59+
"prek >=0.3.2",
6160
]
6261
docs = [
63-
"cairosvg==2.8.2",
64-
"griffe-typingdoc==0.3.0",
65-
"griffe-warnings-deprecated==1.1.0",
66-
"markdown-include-variants==0.0.8",
67-
"mdx-include>=1.4.1,<2.0.0",
68-
"mkdocs-macros-plugin==1.5.0",
69-
"mkdocs-material==9.7.1",
70-
"mkdocs-redirects>=1.2.1,<1.3.0",
71-
"mkdocstrings[python]==0.30.1",
72-
"pillow==11.3.0",
73-
"pyyaml>=5.3.1,<7.0.0",
62+
"cairosvg >=2.8.2",
63+
"griffe-typingdoc >=0.3.0",
64+
"griffe-warnings-deprecated >=1.1.0",
65+
"markdown-include-variants >=0.0.8",
66+
"mdx-include >=1.4.1",
67+
"mkdocs-macros-plugin >=1.5.0",
68+
"mkdocs-material >=9.7.1",
69+
"mkdocs-redirects >=1.2.1",
70+
"mkdocstrings[python] >=0.30.1",
71+
"pillow >=11.3.0",
72+
"pyyaml >=5.3.1",
7473
]
7574
github-actions = [
76-
"httpx>=0.27.0,<0.29.0",
77-
"pydantic>=2.5.3,<3.0.0",
78-
"pydantic-settings>=2.1.0,<3.0.0",
79-
"pygithub>=2.3.0,<3.0.0",
80-
"smokeshow>=0.5.0",
75+
"httpx >=0.27.0",
76+
"pydantic >=2.5.3",
77+
"pydantic-settings >=2.1.0",
78+
"pygithub >=2.3.0",
79+
"smokeshow >=0.5.0",
8180
]
8281
tests = [
83-
"coverage[toml]>=6.2,<8.0",
84-
"mypy==1.19.1",
85-
"pytest>=4.4.0,<9.0.0",
86-
"pytest-cov>=2.10.0,<8.0.0",
87-
"pytest-sugar>=0.9.4,<1.2.0",
88-
"pytest-xdist>=1.32.0,<4.0.0",
89-
"rich>=10.11.0",
90-
"ruff==0.14.14",
91-
"shellingham>=1.3.0",
82+
"coverage[toml] >=6.2",
83+
"mypy >=1.19.1",
84+
"ty >=0.0.9",
85+
"pytest >=4.4.0",
86+
"pytest-cov >=2.10.0",
87+
"pytest-sugar >=0.9.4",
88+
"pytest-xdist >=1.32.0",
89+
"rich >=10.11.0",
90+
"ruff >=0.15.0",
91+
"shellingham >=1.3.0",
9292
]
9393

9494
[tool.pdm]

requirements-docs-tests.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/lint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ set -e
44
set -x
55

66
mypy typer
7+
ty check typer
78
ruff check typer tests docs_src scripts
89
ruff format typer tests docs_src scripts --check

0 commit comments

Comments
 (0)