Skip to content

Commit

Permalink
fix: dictionary test issue found by ruff
Browse files Browse the repository at this point in the history
Also update the ruff config to avoid deprecated usage.
  • Loading branch information
jrs65 committed Feb 6, 2024
1 parent 85e5a2f commit bea4d36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion caput/scripts/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def queue(
if sfile != dfile:
shutil.copyfile(sfile, dfile)

if "modules" in rconf and rconf["modules"]:
if rconf.get("modules"):
modules = rconf["modules"]
modules = (modules,) if isinstance(modules, str) else modules
modstr = "module purge\nmodule load "
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ requires = [
# flake8-blind-except ('BLE')
# flake8-comprehensions ('C4')
# flake8-return ('RET')
select = ["E", "D", "F", "I", "UP", "NPY", "RUF", "BLE", "C4", "RET"]
lint.select = ["E", "D", "F", "I", "UP", "NPY", "RUF", "BLE", "C4", "RET"]

# E203, W503
ignore = [
lint.ignore = [
"E501", # E501: line length violations. Enforce these with `black`
"E741", # E741: Ambiguous variable name
"D105", # D105: Missing docstring in magic method
Expand Down

0 comments on commit bea4d36

Please sign in to comment.