Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pylint, black and isort with ruff #1059

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ default_language_version:
python: python3

repos:
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- id: ruff
args:
- --exclude=.+/migrations/
- --max-line-length=88
- --ignore=E501,W503,E203
- --fix
- id: ruff-format



18 changes: 6 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
[tool.black]
[tool.ruff]
select = [
"I001",
"YTT",
]
exclude = ["migrations"]
line-length = 88
target-version = ['py311']
include = '\.pyi?$' # all files that end with .py or .pyi

[tool.pylint.master]
load-plugins = 'pylint_django'
django-settings-module = 'ownphotos.settings'
disable = 'E029,C0111,C0301'

[tool.pylint.format]
max-line-length = 88

[tool.isort]
profile = "black"
6 changes: 1 addition & 5 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ ipython-genutils==0.2.0
Pygments==2.15.0
prompt-toolkit==3.0.38
nose==1.3.7
pylint==2.17.2
pylint-django==2.5.3
flake8==6.0.0
pre-commit==2.14.0
coverage==7.1.0
Faker==17.6.0
isort==5.12.0
setuptools==67.6.1
black==23.3.0
pyfakefs==5.2.0
pytest==7.3.1
ruff==0.1.3
Loading