From 76246dbf8500e404eb3e0f5401150d2d5b03d698 Mon Sep 17 00:00:00 2001 From: Miauwkeru Date: Tue, 8 Oct 2024 12:55:10 +0000 Subject: [PATCH] Convert __repr__ from format strings to fstrings --- flow/record/fieldtypes/net/ip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/record/fieldtypes/net/ip.py b/flow/record/fieldtypes/net/ip.py index 1b13640..660118c 100644 --- a/flow/record/fieldtypes/net/ip.py +++ b/flow/record/fieldtypes/net/ip.py @@ -27,7 +27,7 @@ def __str__(self) -> str: return str(self.val) def __repr__(self) -> str: - return "{}({!r})".format(self._type, str(self)) + return f"{self._type}({str(self)!r})" def __format__(self, spec: str) -> str: if spec == "defang": @@ -78,7 +78,7 @@ def __str__(self) -> str: return str(self.val) def __repr__(self) -> str: - return "{}({!r})".format(self._type, str(self)) + return f"{self._type}({str(self)!r})" def _pack(self) -> str: return self.val.compressed