Reviewer · CI/CD
Align CI tool dependencies
Static-analysis and type-checking jobs (e.g. Pyre) must be configured with the same dependencies as the code they scan. When these jobs run against `tests/`, they need dev-only packages like `pytest` installed, or imports will be flagged as "Undefined import" even though the package is correctly declared as a dev dependency in `pyproject.toml`. Do not fix...
Static-analysis and type-checking jobs (e.g. Pyre) must be configured with the same dependencies as the code they scan. When these jobs run against tests/, they need dev-only packages like pytest installed, or imports will be flagged as “Undefined import” even though the package is correctly declared as a dev dependency in pyproject.toml. Do not fix this by adding test-only dependencies to the production requirements.txt — that leaks dev tooling into runtime installs and only masks the real misconfiguration.
Fix this at the workflow level instead: either install the dev dependency group before running the analysis step, or point the tool’s dependency/requirements path at a file that includes dev dependencies, or explicitly configure the tool to ignore known dev-only imports in test directories. For example, in .github/workflows/pyre.yml, if requirements-path: 'requirements.txt' is used but pytest only lives in pyproject.toml’s dev group, either:
- name: Install dev dependencies
run: pip install -r requirements.txt -r requirements-dev.txt
or point requirements-path at a combined/dev requirements file that includes pytest.
Before merging a workflow or dependency change, verify it doesn’t produce new false positives across the entire test suite (grep for import pytest or similar across tests/ to confirm the fix applies repo-wide, not just to the file you touched).</description>
</invoke>