Skip to content

Commit

Permalink
COMP: Modernize .ruff.toml settings based on ruff v0.3.3
Browse files Browse the repository at this point in the history
Fixes the following warnings:

```
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `.ruff.toml`:
  - 'per-file-ignores' -> 'lint.per-file-ignores'
warning: `PGH001` has been remapped to `S307`.
warning: `PGH002` has been remapped to `G010`.
```

Since the "S" rules are disabled, simply remove the reference to `PGH001`
instead of adding an exception for `S307`.
  • Loading branch information
jcfr committed Mar 18, 2024
1 parent 07fde71 commit afe4051
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ extend-ignore = [
"F841", # Local variable is assigned to but never used

"G002", # Logging statement uses `%`
"G010", # `warn` is deprecated in favor of `warning`

"ICN001", # `numpy` should be imported as `np`
"ISC002", # Implicitly concatenated string literals over multiple lines
"ISC003", # Explicitly concatenated string should be implicitly concatenated

"PGH001", # No builtin `eval()` allowed
"PGH002", # `warn` is deprecated in favor of `warning`

"PLR0912", # Too many branche
"PLR0913", # Too many arguments in function definition
"PLR0911", # Too many return statements
Expand Down Expand Up @@ -119,7 +117,7 @@ extend-ignore = [
[lint.pydocstyle]
convention = "pep257"

[per-file-ignores]
[lint.per-file-ignores]
# Module imported but unused
"Base/Python/mrml.py" = ["F401"]
"Base/Python/slicer/logic.py" = ["F401"]
Expand Down

0 comments on commit afe4051

Please sign in to comment.