diff --git a/mtg_ssm/serialization/xlsx.py b/mtg_ssm/serialization/xlsx.py index 4f6ce64..b008628 100644 --- a/mtg_ssm/serialization/xlsx.py +++ b/mtg_ssm/serialization/xlsx.py @@ -137,8 +137,8 @@ def get_references( set_to_haveref, key=lambda setcode: _card_set_sort_key(index.setcode_to_set[setcode]), ): - reference = 'IF({count}>0,"{setcode}:"&{count},"")'.format( - setcode=card_set.upper(), count=set_to_haveref[card_set] + reference = ( + f'IF({set_to_haveref[card_set]}>0,"{card_set.upper()}:"&{set_to_haveref[card_set]},"")' ) references.append(reference) if not references: diff --git a/pyproject.toml b/pyproject.toml index d6ab7e2..df368b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,6 +106,8 @@ target-version = ["py38"] [tool.ruff] target-version = "py38" line-length = 99 + +[tool.ruff.lint] select = [ "F", "E", @@ -153,7 +155,7 @@ ignore = [ "T201", # `print` found; ignoring for now because I don't want to set up logging ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = [ "D104", # missing docstring in public package ] @@ -165,9 +167,9 @@ ignore = [ "S101", # tests should use assert ] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["mtg_ssm"] -[tool.ruff.pylint] +[tool.ruff.lint.pylint] max-args = 7 max-returns = 8