Skip to content

Commit

Permalink
Using f-string instead of .format
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-jh committed Feb 2, 2023
1 parent e4bc36f commit 3f7c2cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def chr_decode(text: bytes) -> Optional[bytes]:
for fullc, c in regex.findall(rb'(chr[bw]?\(([0-9]{1,3})\))', output, regex.I):
# noinspection PyBroadException
try:
output = regex.sub(regex.escape(fullc), '"{}"'.format(chr(int(c))).encode('utf-8'), output)
output = regex.sub(regex.escape(fullc), f'"{chr(int(c))}"'.encode('utf-8'), output)
except Exception:
continue
if output == text:
Expand Down

0 comments on commit 3f7c2cc

Please sign in to comment.