Skip to content

Commit

Permalink
Update ruff use it for formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
153957 committed Nov 19, 2023
1 parent 25d804d commit 87a5d15
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -13,7 +13,8 @@ test: rufftest typingtest unittests

.PHONY: rufftest
rufftest:
ruff .
ruff check .
ruff format --check .

.PHONY: typingtest
typingtest:
Expand Down
22 changes: 11 additions & 11 deletions pyproject.toml
Expand Up @@ -39,7 +39,6 @@ graph = [
'graphviz',
]
dev = [
'black==23.9.1',
'coverage==7.3.2',
'mypy==1.7.0',
]
Expand All @@ -63,15 +62,14 @@ strict = true
warn_return_any = true
warn_unused_configs = true

[tool.black]
target-version = ['py311']
line-length = 120
skip-string-normalization = true

[tool.ruff]
target-version = 'py311'
line-length = 120
preview = true
target-version = 'py311'

[tool.ruff.format]
quote-style = 'single' # Prefer single quotes, except for triple quotes strings

[tool.ruff.lint]
select = ['ALL'] # https://docs.astral.sh/ruff/rules/
ignore = [
'ANN101', # No need to add type to self
Expand All @@ -83,14 +81,16 @@ ignore = [
'PD', # Not using pandas
'PLR0913', # Allow functions with many arguments
'PT', # Not using pytest
'Q000', # Use single quotes
'RET504', # Allow variable assignment before return
'SIM108', # Allow if-else block instead of ternary
'T201', # Allow using print
'TRY003', # Specific messages for common exception classes
]

[tool.ruff.isort]
[tool.ruff.lint.flake8-quotes]
inline-quotes = 'single'

[tool.ruff.lint.isort]
lines-between-types = 1
section-order = [
'future',
Expand All @@ -101,7 +101,7 @@ section-order = [
'local-folder',
]

[tool.ruff.isort.sections]
[tool.ruff.lint.isort.sections]
ffmpeg = ['ffmpeg']

[tool.coverage.run]
Expand Down
2 changes: 1 addition & 1 deletion requirements-ruff.txt
@@ -1 +1 @@
ruff==0.0.290
ruff==0.1.6

0 comments on commit 87a5d15

Please sign in to comment.