Skip to content

Commit

Permalink
remove black and isort in favour for ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
m-reuter committed Sep 2, 2024
1 parent 7ca56d4 commit 45c18fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 36 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ jobs:
python -m pip install --progress-bar off .[style]
- name: Run Ruff
run: ruff check .
- name: Run isort
uses: isort/isort-action@master
- name: Run black
uses: psf/black@stable
with:
options: "--check --verbose"
version: "23.10.1"
- name: Run codespell
uses: codespell-project/actions-codespell@master
with:
Expand Down
40 changes: 11 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ doc = [
]
style = [
'bibclean',
'black',
'codespell',
'isort',
'pydocstyle[toml]',
'ruff',
]
Expand Down Expand Up @@ -103,33 +101,6 @@ include-package-data = false
include = ['brainprint*']
exclude = ['brainprint*tests']

[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
extend-exclude = '''
(
__pycache__
| .github
| setup.py
| data/
| doc/
| examples/
)
'''

[tool.isort]
profile = 'black'
multi_line_output = 3
line_length = 88
py_version = 310
extend_skip_glob = [
'setup.py',
'data/*',
'doc/*',
'examples/*',
]

[tool.pydocstyle]
convention = 'numpy'
ignore-decorators = '(copy_doc|property|.*setter|.*getter|pyqtSlot|Slot)'
Expand All @@ -144,6 +115,17 @@ extend-exclude = [
"setup.py",
]

[tool.ruff.lint]
# https://docs.astral.sh/ruff/linter/#rule-selection
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"I", # isort
# "SIM", # flake8-simplify
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]

Expand Down

0 comments on commit 45c18fa

Please sign in to comment.