Skip to content

Commit

Permalink
Use endswith() for more clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron authored Apr 26, 2024
1 parent c2283f6 commit 1a0ab5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def _read(self, fp: Union[BufferedReader, IO[bytes]], fpname: str) -> None:
e = None # None, or an exception.

def string_decode(v: str) -> str:
if v and v[-1] == "\\":
if v and v.endswith("\\"):
v = v[:-1]
# END cut trailing escapes to prevent decode error

Expand Down

0 comments on commit 1a0ab5b

Please sign in to comment.