Skip to content

Commit

Permalink
Fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Feb 7, 2024
1 parent 7a11f17 commit f4005cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions kadi/commands/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"WT0023A024": "HSO_0002",
"WT00D06014": "HIE_0003",
"WT00D0A014": "HSE_0003",
"WT00D08014": "HSO_0003"
"WT00D08014": "HSO_0003",
}


Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
target-version = "py310"

# fix = true
unfixable = []
lint.unfixable = []

select = [
lint.select = [
"I", # isort
"F", # pyflakes
"E", "W", # pycodestyle
Expand All @@ -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
Expand All @@ -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
]
Expand All @@ -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]
Expand Down

0 comments on commit f4005cb

Please sign in to comment.