Skip to content

Commit dc2f529

Browse files
committed
Fix ci failures, mostly allow-listing pyrefly
Also: - Add examples deps to root as optional to help check those. - Upgrade pyrefly to 0.49
1 parent b49f1bb commit dc2f529

5 files changed

Lines changed: 181 additions & 15 deletions

File tree

.github/workflows/python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
echo "CC=sccache clang" >> $GITHUB_ENV
9898
echo "CXX=sccache clang++" >> $GITHUB_ENV
9999
- name: Install dependencies
100-
run: uv sync --extra dev --extra test
100+
run: uv sync --extra dev --extra test --extra examples
101101
- name: Check formatting
102102
run: make format-check
103103
- name: Run linting

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ bin/
1212
# Rust
1313
target/
1414
*.so
15+
target/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ clean:
8888
lint: | $(STUBS_DIR)
8989
@echo "Linting Python code..."
9090
uv run --extra dev ruff check .
91-
uv run --extra dev --extra test pyrefly check .
91+
uv run --extra dev --extra test pyrefly check
9292
@echo "Linting Rust code..."
9393
cd crates/fastly-compute-py && cargo clippy -- -D warnings
9494

pyproject.toml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ test = [
1616
dev = [
1717
"componentize-py (>=0.19.3,<0.20)",
1818
"ruff (>=0.12.11,<0.13.0)",
19-
"pyrefly (>=0.45.1,<0.46.0)",
19+
"pyrefly (>=0.49.0,<0.50)",
20+
]
21+
# Example dependencies - needed for type-checking examples in CI
22+
examples = [
23+
"flask (>=3.1.2,<4.0)",
24+
"bottle (>=0.12.25)",
2025
]
2126

2227
[tool.pytest.ini_options]
@@ -88,3 +93,14 @@ py-modules = ["app"]
8893
[tool.pyrefly]
8994
python-version = "3.12"
9095
search-path = ["stubs"]
96+
use-ignore-files = true
97+
# Type-check source code, tests, and examples
98+
project-includes = [
99+
"fastly_compute/**/*.py",
100+
"tests/**/*.py",
101+
"examples/**/*.py",
102+
]
103+
project-excludes = [
104+
# CLI wrapper imports from native extension that doesn't exist until built
105+
"fastly_compute/fastly_compute_py.py",
106+
]

0 commit comments

Comments
 (0)