Skip to content

Commit

Permalink
Narrow PERF ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Dec 13, 2023
1 parent db0125a commit dfe4334
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ select = [
# "PTH", # flake8-use-pathlib
"TRY", # tryceratops
"FLY", # flynt
"PERF", # Perflint
"D", # pydocstyle
"PL", # pylint
"RUF", # ruff
"T100", # debugger
"I", # isort
# Other perf rules give more false positives than benefits
"PERF101", # do not cast iterable to list
]
ignore = [
"PLR0913",
Expand Down
3 changes: 1 addition & 2 deletions snakebids/core/input_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ def write_derivative_json(snakemake: Snakemake, **kwargs: dict[str, Any]) -> Non
This function requires input.json and output.json to be defined, as
it will read and write json files
"""
with open(snakemake.input.json, encoding="utf-8") as input_json:
sidecar = json.load(input_json)
sidecar = json.loads(Path(snakemake.input.json).read_text())

sidecar.update(
{
Expand Down

0 comments on commit dfe4334

Please sign in to comment.