Skip to content

Commit

Permalink
inline the .flake8 config file into setup.cfg and make cooresponding …
Browse files Browse the repository at this point in the history
…changes in tox and github actions commands
  • Loading branch information
dpgraham4401 committed Dec 1, 2024
1 parent 9515634 commit 0d360eb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r dj_rest_auth/tests/requirements.txt
- name: Lint
run: flake8 dj_rest_auth/ --append-config ./.flake8
run: flake8 dj_rest_auth/
build:
runs-on: ubuntu-latest
name: Build
needs: [lint]
needs: [ lint ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -48,11 +48,11 @@ jobs:
test:
runs-on: ubuntu-20.04
name: Test Python ${{ matrix.python-version }} + Django ~= ${{ matrix.django-version }}
needs: [build]
needs: [ build ]
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
django-version: ['4.2', '5.0']
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
django-version: [ '4.2', '5.0' ]
exclude:
- python-version: '3.8'
django-version: '5.0'
Expand Down
15 changes: 9 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,29 @@ license_file = LICENSE
max-line-length = 120
exclude = docs/*,demo/*
ignore = F403

per-file-ignores =
dj_rest_auth/tests/test_serializers.py:E501,F401
dj_rest_auth/serializers.py:E501
dj_rest_auth/jwt_auth.py:E501

[coverage:run]
omit=*site-packages*,*distutils*,*migrations*
omit = *site-packages*,*distutils*,*migrations*

[coverage:report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ deps =

[testenv:flake8]
commands =
flake8 {toxinidir}/dj_rest_auth --append-config={toxinidir}/.flake8
flake8 {toxinidir}/dj_rest_auth
deps =
flake8==7.1.1

0 comments on commit 0d360eb

Please sign in to comment.