Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ jobs:
- name: mypy
run: uv run mypy src/myinvois

# Pyright is what Pylance runs in the editor, and it catches things mypy
# does not: it found a module-level `del` that would have raised
# NameError at import time if a constant tuple were ever emptied, while
# mypy was green. Scope comes from pyrightconfig.json (src, tests,
# scripts) so CI and the IDE cannot drift apart.
#
# The version is pinned through uv.lock, deliberately: Pyright ships new
# checks frequently, and an unpinned upgrade would fail unrelated PRs
# with findings nobody introduced.
- name: pyright
run: uv run pyright
Comment thread
coderabbitai[bot] marked this conversation as resolved.

test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dev = [
"ruff>=0.7",
"mypy>=1.13",
"lxml-stubs>=0.5.1",
"pyright[nodejs]>=1.1.400",
]

[tool.ruff]
Expand Down
12 changes: 7 additions & 5 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"//": "Pyright/Pylance config. Without this, a fresh clone reports ~78 phantom",
"//2": "'could not be resolved' errors for httpx/pydantic/lxml/cryptography,",
"//3": "because Pyright does not find .venv on its own. Checked in so the IDE",
"//4": "and the command line agree for everyone.",
// Pyright/Pylance config. Without venvPath/venv, a fresh clone reports ~78
// phantom "could not be resolved" errors for httpx, pydantic, lxml and
// cryptography, because Pyright does not find .venv on its own. Checked in
// so the IDE, the command line and CI all agree.
"venvPath": ".",
"venv": ".venv",
"include": ["src", "tests", "scripts"],
"exclude": ["**/__pycache__", ".venv", "dist"],
// Specifying `exclude` replaces Pyright's defaults, so the usual ones are
// repeated here rather than silently dropped.
"exclude": ["**/node_modules", "**/.*", "**/__pycache__", ".venv", "dist"],
"pythonVersion": "3.11",
"typeCheckingMode": "standard",
"reportMissingTypeStubs": false
Expand Down
45 changes: 45 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading