Skip to content

Commit

Permalink
CI: Re-add django stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomka committed Dec 5, 2024
1 parent 7be4190 commit ca8b0ab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-py_${{ matrix.python-version }}-${{ hashFiles('django/requirements*.txt') }}
- run: |
pip install "$(grep -E '^flake8' django/requirements-test.txt)"
pip install "$(grep -E '^mypy' django/requirements-test.txt)"
pip install -r django/requirements-types.txt
pip install -r django/requirements-types.txt -r django/requirements.txt
name: Install lint tools
- name: Set python env
run: echo "PYTHONPATH=$GITHUB_WORKSPACE/django/projects/" >> $GITHUB_ENV
- run: flake8 --statistics --count django
- run: mypy django/

Expand Down
2 changes: 1 addition & 1 deletion django/requirements-types.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#django-stubs==5.1.1
django-stubs==5.1.1
types-python-dateutil==2.9.0.20241003
types-docutils==0.21.0.20241128
types-requests==2.32.0.20241016
Expand Down
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[mypy]
check_untyped_defs = True
ignore_missing_imports = True
disable_error_code = import-untyped
warn_incomplete_stub = False
plugins = mypy_django_plugin.main

[mypy.plugins.django-stubs]
django_settings_module = 'mysite.settings'
strict_settings = False

[mypy-applications.catmaid.migrations.*]
ignore_errors = True
Expand Down

0 comments on commit ca8b0ab

Please sign in to comment.