Fixes: 1) Addressed missing or incorrect imports and type hints with `# ty:ignore` markers; 2) Fixed search queryset error handling in filters module; 3) Resolved issues in viewsets with updated `@action` method usage. Extra: Removed unused classes and dependencies (e.g., `BaseMutation`, `basedpyright`, and related packages); streamlined GraphQL mutation implementations; cleaned up unused arguments in model `save` methods.
51 lines
No EOL
882 B
YAML
51 lines
No EOL
882 B
YAML
image: ghcr.io/astral-sh/uv:python3.12-bookworm
|
|
|
|
stages:
|
|
- lint
|
|
- typecheck
|
|
- test
|
|
|
|
variables:
|
|
UV_PYTHON: "3.12"
|
|
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
PYTHONDONTWRITEBYTECODE: "1"
|
|
|
|
before_script:
|
|
- uv sync --frozen --extra linting
|
|
|
|
lint:
|
|
stage: lint
|
|
script:
|
|
- uv run ruff format --check .
|
|
- uv run ruff check --force-exclude .
|
|
rules:
|
|
- changes:
|
|
- "**/*.py"
|
|
- "pyproject.toml"
|
|
- ".pre-commit-config.yaml"
|
|
when: on_success
|
|
- when: never
|
|
|
|
typecheck:
|
|
stage: typecheck
|
|
script:
|
|
- uv run ty
|
|
rules:
|
|
- changes:
|
|
- "**/*.py"
|
|
- "pyproject.toml"
|
|
when: on_success
|
|
- when: never
|
|
|
|
test:
|
|
stage: test
|
|
script:
|
|
- uv run pytest -q
|
|
rules:
|
|
- changes:
|
|
- "**/*.py"
|
|
- "pyproject.toml"
|
|
- "pytest.ini"
|
|
- "pyproject.toml"
|
|
when: on_success
|
|
- when: never |