Skip to content

Commit

Permalink
⬆️ pre-commit.ci autoupdate (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
shnizzedy authored Jan 14, 2025
2 parents a0ac90f + bb7986d commit 307bcb3
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fail_fast: false

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -39,7 +39,7 @@ repos:
- --no-sort

- repo: https://github.com/python-poetry/poetry
rev: 2.0.0
rev: 2.0.1
hooks:
- id: poetry-check
- id: poetry-lock
Expand Down
7 changes: 3 additions & 4 deletions src/cpac/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,9 @@ def main(args):
)
except Exception: # pragma: no cover
raise ValueError(
f"""Something about {[
arg for arg in args.extra_args if
'--data_config_file' in arg
]} is confusing."""
f"""Something about {
[arg for arg in args.extra_args if "--data_config_file" in arg]
} is confusing."""
)
else:
args.data_config_file = (
Expand Down
2 changes: 1 addition & 1 deletion src/cpac/backends/apptainer/apptainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from spython import main as spython_main
from spython.main.base import command

from cpac.backends.platform import PlatformMeta
from cpac.backends.container_platform import PlatformMeta
from cpac.backends.singularity import Singularity
from .spython import get_client, init_command

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,7 @@ def _load_logging(self):
" ",
)
)
print(
f"Logging messages will refer to the {self.platform.name} " "paths.\n"
)
print(f"Logging messages will refer to the {self.platform.name} paths.\n")

@property
def platform(self):
Expand Down Expand Up @@ -462,7 +460,7 @@ def _set_bindings(self, **kwargs):
self._bind_volume(Volume(bind_parts[0]))
else:
raise SyntaxError(
"I don't know what to do with custom " "binding {}".format(d)
"I don't know what to do with custom binding {}".format(d)
)
for d in ["bids_dir", "output_dir"]: # pylint: disable=invalid-name
if d in kwargs and isinstance(kwargs[d], str) and os.path.exists(kwargs[d]):
Expand Down
4 changes: 2 additions & 2 deletions src/cpac/backends/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from docker.errors import ImageNotFound
import dockerpty

from cpac.backends.platform import Backend, PlatformMeta
from cpac.backends.container_platform import Backend, PlatformMeta


class Docker(Backend):
Expand All @@ -25,7 +25,7 @@ def __init__(self, **kwargs):
self.client.ping()
except (docker.errors.APIError, ConnectionError): # pragma: no cover
raise OSError(
f"Could not connect to {self.platform.name}. " "Is Docker running?"
f"Could not connect to {self.platform.name}. Is Docker running?"
)

image = kwargs["image"] if kwargs.get("image") is not None else "fcpindi/c-pac"
Expand Down
2 changes: 1 addition & 1 deletion src/cpac/backends/singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from spython.image import Image
from spython.main import Client

from cpac.backends.platform import Backend, PlatformMeta
from cpac.backends.container_platform import Backend, PlatformMeta

BINDING_MODES = {"ro": "ro", "w": "rw", "rw": "rw"}

Expand Down
2 changes: 1 addition & 1 deletion src/cpac/utils/bare_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def helpstring(self):
"""Get the helpstring."""
if self._helpstring is None:
if not self.supported_python:
self._helpstring = f"Extra command '{self.name}' not supported on Python {f'{version_info.major}.{version_info.minor}.{ version_info.micro}'}; supported Python versions range is {self.supported_python_range}.\n\nSee {self.url} for more information and system requirements."
self._helpstring = f"Extra command '{self.name}' not supported on Python {f'{version_info.major}.{version_info.minor}.{version_info.micro}'}; supported Python versions range is {self.supported_python_range}.\n\nSee {self.url} for more information and system requirements."
else:
self._helpstring = f"Extra package {self.package} not found. See {self.url} for more information and system requirements, or run `pip install cpac[{self.name}]` to try to install it."
return self._helpstring.replace(f"usage: {self.command}", f"cpac {self.name}")
Expand Down
6 changes: 3 additions & 3 deletions src/cpac/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ def _warn_if_undefined(self):
warn(
f"'{self.mode}' is not a fully-configured permission "
f"level in {DIST_NAME}. Configured permission levels are "
f"""{", ".join([
f"'{mode}'" for mode in PermissionMode.defined_modes
])}""",
f"""{
", ".join([f"'{mode}'" for mode in PermissionMode.defined_modes])
}""",
UserWarning,
)
return True
Expand Down

0 comments on commit 307bcb3

Please sign in to comment.