Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
9128305 authored Aug 15, 2024
2 parents 804824f + 3e0329d commit a2afe17
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint

on: [push, pull_request]

jobs:
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Ruff
run: |
python -m pip install ruff>=0.5
- name: Format check (Ruff)
run: |
ruff format --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pip-log.txt
.coverage
.tox
.pytest_cache/
.ruff_cache/
nosetests.xml

# Translations
Expand Down
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
repos:
- repo: https://github.com/psf/black
rev: 24.8.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
hooks:
- id: black
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down
15 changes: 4 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
[tool.black]
line-length = 110
target-version = ['py38']
exclude = '''
^/(
oauth2_provider/migrations/
| tests/migrations/
| .tox
)
'''

# Ref: https://github.com/codespell-project/codespell#using-a-config-file
[tool.codespell]
skip = '.git,package-lock.json,locale,AUTHORS,tox.ini'
check-hidden = true
ignore-regex = '.*pragma: codespell-ignore.*'
ignore-words-list = 'assertIn'

[tool.ruff]
line-length = 110
exclude = [".tox", "oauth2_provider/migrations/", "tests/migrations/", "manage.py"]
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ deps =
flake8
flake8-isort
flake8-quotes
flake8-black

[testenv:migrations]
setenv =
Expand Down

0 comments on commit a2afe17

Please sign in to comment.