Skip to content

Commit

Permalink
Switch to ruff formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Nov 7, 2023
1 parent 8dc4d95 commit ba6ae32
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ repos:
- id: ruff
args: ["--fix", "--show-fixes"]
exclude: "scripts/strun"

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
hooks:
- id: black
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ testpaths = [
filterwarnings = [
"error::ResourceWarning",
]
markers = [
"soctests",
]

[tool.ruff]
src = [
Expand Down Expand Up @@ -133,6 +136,9 @@ extend-select = [
'PERF', # Perflint (performance linting)
'RUF', # ruff specific checks
]
ignore = [
"ISC001", # conflicts with ruff formatter
]

[tool.ruff.lint.extend-per-file-ignores]
"tests/*.py" = ["S101", "S603", "S607", "INP001", "ARG001"]
Expand Down
6 changes: 5 additions & 1 deletion src/stpipe/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ def from_cmdline(args):

@classmethod
def _parse_class_and_name(
cls, config, parent=None, name=None, config_file=None # noqa: ARG003
cls,
config,
parent=None, # noqa: ARG003
name=None,
config_file=None,
):
if "class" in config:
step_class = utilities.import_class(
Expand Down

0 comments on commit ba6ae32

Please sign in to comment.