diff --git a/bioblend/galaxy/dataset_collections/__init__.py b/bioblend/galaxy/dataset_collections/__init__.py index c375201dc..69c46fa80 100644 --- a/bioblend/galaxy/dataset_collections/__init__.py +++ b/bioblend/galaxy/dataset_collections/__init__.py @@ -219,7 +219,11 @@ def wait_for_dataset_collection( return dataset_collection if time_left > 0: log.info( - f"The dataset collection {dataset_collection_id} has {len(terminal_states)} out of {len(states)} datasets in a terminal state. Will wait {time_left} more s" + "The dataset collection %s has %s out of %s datasets in a terminal state. Will wait %s more s", + dataset_collection_id, + len(terminal_states), + len(states), + time_left, ) time.sleep(min(time_left, interval)) time_left -= interval diff --git a/bioblend/galaxy/datasets/__init__.py b/bioblend/galaxy/datasets/__init__.py index 91bb4295a..6f889465c 100644 --- a/bioblend/galaxy/datasets/__init__.py +++ b/bioblend/galaxy/datasets/__init__.py @@ -435,7 +435,7 @@ def wait_for_dataset( raise Exception(f"Dataset {dataset_id} is in terminal state {state}") return dataset if time_left > 0: - log.info(f"Dataset {dataset_id} is in non-terminal state {state}. Will wait {time_left} more s") + log.info("Dataset %s is in non-terminal state %s. Will wait %s more s", dataset_id, state, time_left) time.sleep(min(time_left, interval)) time_left -= interval else: diff --git a/bioblend/galaxy/invocations/__init__.py b/bioblend/galaxy/invocations/__init__.py index fa6e023ab..7321c5c20 100644 --- a/bioblend/galaxy/invocations/__init__.py +++ b/bioblend/galaxy/invocations/__init__.py @@ -449,7 +449,9 @@ def wait_for_invocation( raise Exception(f"Invocation {invocation_id} is in terminal state {state}") return invocation if time_left > 0: - log.info(f"Invocation {invocation_id} is in non-terminal state {state}. Will wait {time_left} more s") + log.info( + "Invocation %s is in non-terminal state %s. Will wait %s more s", invocation_id, state, time_left + ) time.sleep(min(time_left, interval)) time_left -= interval else: diff --git a/bioblend/galaxy/jobs/__init__.py b/bioblend/galaxy/jobs/__init__.py index c90b04ce4..9b1c97243 100644 --- a/bioblend/galaxy/jobs/__init__.py +++ b/bioblend/galaxy/jobs/__init__.py @@ -518,7 +518,7 @@ def wait_for_job( raise Exception(f"Job {job_id} is in terminal state {state}") return job if time_left > 0: - log.info(f"Job {job_id} is in non-terminal state {state}. Will wait {time_left} more s") + log.info("Job %s is in non-terminal state %s. Will wait %s more s", job_id, state, time_left) time.sleep(min(time_left, interval)) time_left -= interval else: diff --git a/bioblend/galaxy/objects/galaxy_instance.py b/bioblend/galaxy/objects/galaxy_instance.py index d4baa81d3..470d7a11c 100644 --- a/bioblend/galaxy/objects/galaxy_instance.py +++ b/bioblend/galaxy/objects/galaxy_instance.py @@ -104,7 +104,7 @@ def poll(ds_list: Iterable[wrappers.Dataset]) -> List[wrappers.Dataset]: if not ds.state: self.log.warning("Dataset %s has an empty state", ds.id) elif ds.state not in TERMINAL_STATES: - self.log.info(f"Dataset {ds.id} is in non-terminal state {ds.state}") + self.log.info("Dataset %s is in non-terminal state %s", ds.id, ds.state) pending.append(ds) return pending diff --git a/bioblend/galaxyclient.py b/bioblend/galaxyclient.py index 6d58e0e37..559c48cb5 100644 --- a/bioblend/galaxyclient.py +++ b/bioblend/galaxyclient.py @@ -54,7 +54,7 @@ def __init__( found_scheme = None # Try to guess the scheme, starting from the more secure for scheme in ("https://", "http://"): - log.warning(f"Missing scheme in url, trying with {scheme}") + log.warning("Missing scheme in url, trying with %s", scheme) with contextlib.suppress(requests.RequestException): r = requests.get( scheme + url, diff --git a/pyproject.toml b/pyproject.toml index 239491fc4..fe855cc91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ isort = true target-version = "py38" [tool.ruff.lint] -select = ["E", "F", "B", "C4", "UP"] +select = ["E", "F", "B", "C4", "G", "ISC", "UP"] # Exceptions: # B9 flake8-bugbear opinionated warnings # E501 is line length (delegated to black)