Skip to content

Commit

Permalink
STY: apply unsafe fixes from ruff 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jul 1, 2024
1 parent aa77a71 commit 4996508
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/idefix_cli/_backports.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __new__(cls, *values):
if len(values) == 3:
# check that errors argument is a string
if not isinstance(values[2], str):
raise TypeError("errors must be a string, not %r" % (values[2]))
raise TypeError(f"errors must be a string, not {values[2]!r}")
value = str(*values)
member = str.__new__(cls, value)
member._value_ = value
Expand Down
2 changes: 1 addition & 1 deletion src/idefix_cli/_commands/digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _log_to_data(log: list[str]):


def _data_to_json(header: str, data: dict[str, list[str]]) -> str:
res: list[str] = ['"%s": {' % header]
res: list[str] = [f'"{header}": {{']
ncolumns = len(data)
for icol, (name, record) in enumerate(data.items()):
if icol < ncolumns - 1:
Expand Down

0 comments on commit 4996508

Please sign in to comment.