Update dependency ruff to v0.0.287 (#1778)

* Update dependency ruff to v0.0.287

* add ruff target version to tailor linting to our required python versions

* fix linting issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
This commit is contained in:
renovate[bot] 2023-09-09 15:44:46 -07:00 committed by GitHub
parent 9533b55d8f
commit 6962c399ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 24 deletions

View file

@ -106,7 +106,7 @@ def scope_config(config: dict, journal_name: str) -> dict:
return config
config = config.copy()
journal_conf = config["journals"].get(journal_name)
if type(journal_conf) is dict:
if isinstance(journal_conf, dict):
# We can override the default config on a by-journal basis
logging.debug(
"Updating configuration with specific journal overrides:\n%s",
@ -181,7 +181,7 @@ def update_config(
"""Updates a config dict with new values - either global if scope is None
or config['journals'][scope] is just a string pointing to a journal file,
or within the scope"""
if scope and type(config["journals"][scope]) is dict: # Update to journal specific
if scope and isinstance(config["journals"][scope], dict):
config["journals"][scope].update(new_config)
elif scope and force_local: # Convert to dict
config["journals"][scope] = {"journal": config["journals"][scope]}