Skip to content

Commit

Permalink
Fix 'UP031 Use format specifiers instead of percent format'
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo-rodrigues committed Jun 4, 2024
1 parent 14ea21d commit 52e28da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/skhep_testdata/remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_config_for_file(cls, filename: str) -> dict[str, str]:
config = cls._all_files.get(filename, None)

if not config:
raise RuntimeError("Unknown remote file: %s" % filename)
raise RuntimeError(f"Unknown remote file: {filename}")

return config.copy()

Expand Down Expand Up @@ -110,7 +110,7 @@ def remote_file(
) -> str:
config = RemoteDatasetList.get_config_for_file(filename)
if not config and raise_missing:
raise RuntimeError("Unknown %s cannot be found" % filename)
raise RuntimeError(f"Unknown {filename} cannot be found")
return None

path = os.path.join(data_dir, filename)
Expand All @@ -119,6 +119,6 @@ def remote_file(
fetch_remote_dataset(**config) # type: ignore[arg-type]

if not os.path.isfile(path) and raise_missing:
raise RuntimeError("%s cannot be found" % filename)
raise RuntimeError(f"{filename} cannot be found")

return path

0 comments on commit 52e28da

Please sign in to comment.