Skip to content

Commit 18d5e21

Browse files
committed
chore(internal): replace string concatenation with f-strings (#206)
1 parent f32e092 commit 18d5e21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/finch/_utils/_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def human_join(seq: Sequence[str], *, delim: str = ", ", final: str = "or") -> s
230230

231231
def quote(string: str) -> str:
232232
"""Add single quotation marks around the given string. Does *not* do any escaping."""
233-
return "'" + string + "'"
233+
return f"'{string}'"
234234

235235

236236
def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]:

tests/test_required_args.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def foo(*, a: str | None = None) -> str | None:
4343
def test_multiple_params() -> None:
4444
@required_args(["a", "b", "c"])
4545
def foo(a: str = "", *, b: str = "", c: str = "") -> str | None:
46-
return a + " " + b + " " + c
46+
return f"{a} {b} {c}"
4747

4848
assert foo(a="a", b="b", c="c") == "a b c"
4949

0 commit comments

Comments
 (0)