From f4005cbb20a428101b26c90ac707b83ab3785133 Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Wed, 7 Feb 2024 07:03:49 -0500 Subject: [PATCH] Fix ruff --- .pre-commit-config.yaml | 2 +- kadi/commands/states.py | 4 ++-- ruff.toml | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f055986a..dabf94a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.5 + rev: v0.2.1 hooks: # Run the linter. - id: ruff diff --git a/kadi/commands/states.py b/kadi/commands/states.py index ead35ce8..1ecac8e6 100644 --- a/kadi/commands/states.py +++ b/kadi/commands/states.py @@ -86,7 +86,7 @@ "WT0023A024": "HSO_0002", "WT00D06014": "HIE_0003", "WT00D0A014": "HSE_0003", - "WT00D08014": "HSO_0003" + "WT00D08014": "HSO_0003", } @@ -1544,7 +1544,6 @@ def set_transitions(cls, transitions, cmds, start, stop): # Special case for NIL SI modes elif tlmsid in NIL_SIMODES: - transitions[date].update(si_mode=NIL_SIMODES[tlmsid]) # All other SI modes: this logic uses the PBLK command to @@ -1563,6 +1562,7 @@ def set_transitions(cls, transitions, cmds, start, stop): end = "B" transitions[date].update(si_mode=f"{mode}_{digits:05X}{end}") + class ACISFP_SetPointTransition(BaseTransition): """ Implement transitions for ACIS focal plane temperature setpoint state. diff --git a/ruff.toml b/ruff.toml index 7c25e347..17dad1d9 100644 --- a/ruff.toml +++ b/ruff.toml @@ -2,9 +2,9 @@ target-version = "py310" # fix = true -unfixable = [] +lint.unfixable = [] -select = [ +lint.select = [ "I", # isort "F", # pyflakes "E", "W", # pycodestyle @@ -23,7 +23,7 @@ select = [ "PGH" # pygrep-hooks ] -ignore = [ +lint.ignore = [ "ISC001", # Disable this for compatibility with ruff format "B028", # No explicit `stacklevel` keyword argument found "B905", # `zip()` without an explicit `strict=` parameter @@ -41,14 +41,14 @@ ignore = [ ] # TODO : fix these and stop ignoring -extend-ignore = [ +lint.extend-ignore = [ "B006", # Do not use mutable data structures for argument defaults "C401", # Unnecessary generator (rewrite as a `set` comprehension) "C402", # Unnecessary generator (rewrite as a dict comprehension) "C405", # Unnecessary `list` literal (rewrite as a `set` literal) "C408", # Unnecessary `dict` call (rewrite as a literal) "C416", # Unnecessary `dict` comprehension (rewrite using `dict()`) - "PGH002", # warn is deprecated in favor of warning + "G010", # warn is deprecated in favor of warning "PGH004", # Use specific rule codes when using `noqa` "PYI056", # Calling `.append()` on `__all__` may not be supported by all type checkers ] @@ -59,7 +59,7 @@ extend-exclude = [ "validate", ] -[pycodestyle] +[lint.pycodestyle] max-line-length = 100 # E501 reports lines that exceed the length of 100. [lint.extend-per-file-ignores]