Skip to content

Commit 4ae4c4d

Browse files
authored
Merge branch 'main' into add-dates-to-release-notes
2 parents e426dcc + 74cffe9 commit 4ae4c4d

File tree

11 files changed

+127
-61
lines changed

11 files changed

+127
-61
lines changed

.github/workflows/smokeshow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
pyproject.toml
2828
uv.lock
2929
- run: uv sync --locked --no-dev --group github-actions
30-
- uses: actions/download-artifact@v7
30+
- uses: actions/download-artifact@v8
3131
with:
3232
name: coverage-html
3333
path: htmlcov

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
8686
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
8787
- name: Store coverage files
88-
uses: actions/upload-artifact@v6
88+
uses: actions/upload-artifact@v7
8989
with:
9090
name: coverage-${{ runner.os }}-${{ matrix.python-version }}
9191
path: coverage
@@ -111,7 +111,7 @@ jobs:
111111
pyproject.toml
112112
uv.lock
113113
- name: Get coverage files
114-
uses: actions/download-artifact@v7
114+
uses: actions/download-artifact@v8
115115
with:
116116
pattern: coverage-*
117117
path: coverage
@@ -122,7 +122,7 @@ jobs:
122122
- run: uv run coverage combine coverage
123123
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
124124
- name: Store coverage HTML
125-
uses: actions/upload-artifact@v6
125+
uses: actions/upload-artifact@v7
126126
with:
127127
name: coverage-html
128128
path: htmlcov

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ repos:
3333
require_serial: true
3434
language: unsupported
3535
pass_filenames: false
36+
37+
- id: local-ty
38+
name: ty check
39+
entry: uv run ty check src tests
40+
require_serial: true
41+
language: unsupported
42+
pass_filenames: false

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ tests = [
6969
"fastapi>=0.128.0",
7070
"mypy==1.19.1",
7171
"pytest>=7.4.0,<10.0.0",
72-
"ruff==0.15.2",
72+
"ruff==0.15.8",
7373
"uvicorn>=0.39.0",
74+
"ty>=0.0.25",
7475
]
7576

7677
[build-system]
@@ -156,3 +157,6 @@ known-third-party = ["typer", "fastapi"]
156157
[tool.ruff.lint.pyupgrade]
157158
# Preserve types, even if a file imports `from __future__ import annotations`.
158159
keep-runtime-typing = true
160+
161+
[tool.ty.terminal]
162+
error-on-warning = true

release-notes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@
44

55
### Internal
66

7+
* ⬆ Bump fastapi from 0.135.2 to 0.135.3. PR [#353](https://github.com/fastapi/fastapi-cli/pull/353) by [@dependabot[bot]](https://github.com/apps/dependabot).
8+
* ⬆ Bump ty from 0.0.26 to 0.0.27. PR [#352](https://github.com/fastapi/fastapi-cli/pull/352) by [@dependabot[bot]](https://github.com/apps/dependabot).
9+
* ⬆ Bump ruff from 0.15.7 to 0.15.8. PR [#347](https://github.com/fastapi/fastapi-cli/pull/347) by [@dependabot[bot]](https://github.com/apps/dependabot).
10+
* ⬆ Bump fastapi from 0.135.1 to 0.135.2. PR [#345](https://github.com/fastapi/fastapi-cli/pull/345) by [@dependabot[bot]](https://github.com/apps/dependabot).
11+
* ⬆ Bump ty from 0.0.25 to 0.0.26. PR [#348](https://github.com/fastapi/fastapi-cli/pull/348) by [@dependabot[bot]](https://github.com/apps/dependabot).
12+
* ⬆ Bump fastapi-cloud-cli from 0.15.0 to 0.15.1. PR [#349](https://github.com/fastapi/fastapi-cli/pull/349) by [@dependabot[bot]](https://github.com/apps/dependabot).
13+
* ⬆ Bump prek from 0.3.6 to 0.3.8. PR [#344](https://github.com/fastapi/fastapi-cli/pull/344) by [@dependabot[bot]](https://github.com/apps/dependabot).
14+
* ⬆ Bump ty from 0.0.24 to 0.0.25. PR [#346](https://github.com/fastapi/fastapi-cli/pull/346) by [@dependabot[bot]](https://github.com/apps/dependabot).
15+
* ⬆ Bump ruff from 0.15.6 to 0.15.7. PR [#342](https://github.com/fastapi/fastapi-cli/pull/342) by [@dependabot[bot]](https://github.com/apps/dependabot).
16+
* ⬆ Bump ty from 0.0.23 to 0.0.24. PR [#343](https://github.com/fastapi/fastapi-cli/pull/343) by [@dependabot[bot]](https://github.com/apps/dependabot).
17+
* ⬆ Bump uvicorn from 0.41.0 to 0.42.0. PR [#340](https://github.com/fastapi/fastapi-cli/pull/340) by [@dependabot[bot]](https://github.com/apps/dependabot).
18+
* ⬆ Bump prek from 0.3.5 to 0.3.6. PR [#339](https://github.com/fastapi/fastapi-cli/pull/339) by [@dependabot[bot]](https://github.com/apps/dependabot).
19+
* ⬆ Bump ty from 0.0.21 to 0.0.23. PR [#338](https://github.com/fastapi/fastapi-cli/pull/338) by [@dependabot[bot]](https://github.com/apps/dependabot).
20+
* 👷 Add `ty` to precommit. PR [#335](https://github.com/fastapi/fastapi-cli/pull/335) by [@svlandeg](https://github.com/svlandeg).
21+
* ⬆ Bump ruff from 0.15.5 to 0.15.6. PR [#337](https://github.com/fastapi/fastapi-cli/pull/337) by [@dependabot[bot]](https://github.com/apps/dependabot).
22+
* ⬆ Bump fastapi-cloud-cli from 0.14.1 to 0.15.0. PR [#336](https://github.com/fastapi/fastapi-cli/pull/336) by [@dependabot[bot]](https://github.com/apps/dependabot).
23+
* ⬆ Bump prek from 0.3.4 to 0.3.5. PR [#334](https://github.com/fastapi/fastapi-cli/pull/334) by [@dependabot[bot]](https://github.com/apps/dependabot).
24+
* ⬆ Bump fastapi-cloud-cli from 0.14.0 to 0.14.1. PR [#333](https://github.com/fastapi/fastapi-cli/pull/333) by [@dependabot[bot]](https://github.com/apps/dependabot).
25+
* ⬆ Bump ruff from 0.15.4 to 0.15.5. PR [#331](https://github.com/fastapi/fastapi-cli/pull/331) by [@dependabot[bot]](https://github.com/apps/dependabot).
26+
* ⬆ Bump fastapi from 0.133.1 to 0.135.1. PR [#329](https://github.com/fastapi/fastapi-cli/pull/329) by [@dependabot[bot]](https://github.com/apps/dependabot).
27+
* ⬆ Bump prek from 0.3.3 to 0.3.4. PR [#330](https://github.com/fastapi/fastapi-cli/pull/330) by [@dependabot[bot]](https://github.com/apps/dependabot).
28+
* ⬆ Bump ruff from 0.15.2 to 0.15.4. PR [#328](https://github.com/fastapi/fastapi-cli/pull/328) by [@dependabot[bot]](https://github.com/apps/dependabot).
29+
* ⬆ Bump fastapi from 0.133.0 to 0.133.1. PR [#325](https://github.com/fastapi/fastapi-cli/pull/325) by [@dependabot[bot]](https://github.com/apps/dependabot).
30+
* ⬆ Bump actions/download-artifact from 7 to 8. PR [#327](https://github.com/fastapi/fastapi-cli/pull/327) by [@dependabot[bot]](https://github.com/apps/dependabot).
31+
* ⬆ Bump actions/upload-artifact from 6 to 7. PR [#326](https://github.com/fastapi/fastapi-cli/pull/326) by [@dependabot[bot]](https://github.com/apps/dependabot).
32+
* ⬆ Bump fastapi-cloud-cli from 0.13.0 to 0.14.0. PR [#324](https://github.com/fastapi/fastapi-cli/pull/324) by [@dependabot[bot]](https://github.com/apps/dependabot).
733
* ⬆ Bump fastapi from 0.132.0 to 0.133.0. PR [#321](https://github.com/fastapi/fastapi-cli/pull/321) by [@dependabot[bot]](https://github.com/apps/dependabot).
834
* ⬆ Bump rich-toolkit from 0.19.4 to 0.19.7. PR [#322](https://github.com/fastapi/fastapi-cli/pull/322) by [@dependabot[bot]](https://github.com/apps/dependabot).
935

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 src tests
7+
ty check src tests
78
ruff check src tests scripts
89
ruff format src tests --check

src/fastapi_cli/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
try:
2626
import uvicorn
2727
except ImportError: # pragma: no cover
28-
uvicorn = None # type: ignore[assignment]
28+
uvicorn = None # type: ignore[assignment] # ty: ignore[invalid-assignment]
2929

3030

3131
try:
@@ -39,7 +39,7 @@
3939

4040

4141
try:
42-
from fastapi_new.cli import ( # type: ignore[import-not-found]
42+
from fastapi_new.cli import ( # type: ignore[import-not-found] # ty: ignore[unresolved-import]
4343
app as fastapi_new_cli,
4444
)
4545

src/fastapi_cli/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _read_pyproject_toml(cls) -> dict[str, Any]:
1919
return {}
2020

2121
try:
22-
import tomllib # type: ignore[import-not-found, unused-ignore]
22+
import tomllib # type: ignore[import-not-found, unused-ignore] # ty: ignore[unresolved-import]
2323
except ImportError:
2424
try:
2525
import tomli as tomllib # type: ignore[no-redef, import-not-found, unused-ignore]
@@ -30,7 +30,7 @@ def _read_pyproject_toml(cls) -> dict[str, Any]:
3030
with open(pyproject_path, "rb") as f:
3131
data = tomllib.load(f)
3232

33-
return data.get("tool", {}).get("fastapi", {}) # type: ignore
33+
return data.get("tool", {}).get("fastapi", {}) # type: ignore[no-any-return]
3434

3535
@classmethod
3636
def resolve(cls, entrypoint: str | None = None) -> "FastAPIConfig":

src/fastapi_cli/discover.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
try:
1212
from fastapi import FastAPI
1313
except ImportError: # pragma: no cover
14-
FastAPI = None # type: ignore[misc, assignment]
14+
FastAPI = None # type: ignore[misc, assignment] # ty: ignore[invalid-assignment]
1515

1616

1717
def get_default_path() -> Path:

tests/test_requirements.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_no_uvicorn() -> None:
1818

1919
import fastapi_cli.cli
2020

21-
fastapi_cli.cli.uvicorn = None # type: ignore[attr-defined, assignment]
21+
fastapi_cli.cli.uvicorn = None # type: ignore[attr-defined, assignment] # ty: ignore[invalid-assignment]
2222

2323
with changing_dir(assets_path):
2424
result = runner.invoke(fastapi_cli.cli.app, ["dev", "single_file_app.py"])
@@ -29,15 +29,15 @@ def test_no_uvicorn() -> None:
2929
in result.exception.args[0]
3030
)
3131

32-
fastapi_cli.cli.uvicorn = uvicorn # type: ignore[attr-defined]
32+
fastapi_cli.cli.uvicorn = uvicorn # type: ignore[attr-defined] # ty: ignore[invalid-assignment]
3333

3434

3535
def test_no_fastapi() -> None:
3636
from fastapi import FastAPI
3737

3838
import fastapi_cli.discover
3939

40-
fastapi_cli.discover.FastAPI = None # type: ignore[attr-defined, assignment]
40+
fastapi_cli.discover.FastAPI = None # type: ignore[attr-defined, assignment] # ty: ignore[invalid-assignment]
4141
with changing_dir(assets_path):
4242
with pytest.raises(FastAPICLIException) as exc_info:
4343
get_import_data(path=Path("single_file_app.py"))

0 commit comments

Comments
 (0)