Skip to content

Commit

Permalink
⚡ Change ruff conf
Browse files Browse the repository at this point in the history
We added ruff but missed some configuration. Added a more to make it
pick up problems similarly to the alternative
  • Loading branch information
sakarias88 committed Feb 12, 2024
1 parent 88a7171 commit f06f1cc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Ruff default configuration. Now picks upp issues similar to to the
alternative (isort, black, flake etc).

## [3.1.0] - 2024-02-08

### Added
Expand Down
41 changes: 40 additions & 1 deletion python/hooks/config/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,41 @@
[tool.ruff]
select=[ "E4", "E7", "E9", "F", "PLE", "PLW" ]
select=[
"A",
"ARG",
"BLE",
"C4",
"E",
"E4",
"E7",
"E9",
"EXE",
"F",
"ISC",
"PLC",
"PLE",
"PLW",
"RSE",
"RET",
"S",
"SLF",
"SIM",
"TID",
"UP",
"W",
]

[tool.ruff.lint]
ignore = [
"ISC001" # The following rules may cause conflicts when used with the formatter
]

[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"SLF001", # Common to access private members in order to mock things.
"S101", # Allowed to use asserts in tests
]
"test_*" = [
"SLF001", # Common to access private members in order to mock things.
"S101", # Allowed to use asserts in tests
]

0 comments on commit f06f1cc

Please sign in to comment.