aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-07 01:29:39 +0100
committerSam James <sam@gentoo.org>2023-08-07 01:32:33 +0100
commit1a2c70dd32ab335b38fa6da8a625ff47a3467dfa (patch)
treeb280481bd8f8642dbc86b10e8726677bbdd28a24 /pym/gentoolkit/cpv.py
parentequery: reformat with black (diff)
downloadgentoolkit-1a2c70dd32ab335b38fa6da8a625ff47a3467dfa.tar.gz
gentoolkit-1a2c70dd32ab335b38fa6da8a625ff47a3467dfa.tar.bz2
gentoolkit-1a2c70dd32ab335b38fa6da8a625ff47a3467dfa.zip
Run `pyupgrade --py39-plus`
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'pym/gentoolkit/cpv.py')
-rw-r--r--pym/gentoolkit/cpv.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/gentoolkit/cpv.py b/pym/gentoolkit/cpv.py
index 6b2a533..c58243e 100644
--- a/pym/gentoolkit/cpv.py
+++ b/pym/gentoolkit/cpv.py
@@ -124,7 +124,7 @@ class CPV:
def __lt__(self, other):
if not isinstance(other, self.__class__):
raise TypeError(
- "other isn't of %s type, is %s" % (self.__class__, other.__class__)
+ f"other isn't of {self.__class__} type, is {other.__class__}"
)
if self.category != other.category:
@@ -140,26 +140,26 @@ class CPV:
def __gt__(self, other):
if not isinstance(other, self.__class__):
raise TypeError(
- "other isn't of %s type, is %s" % (self.__class__, other.__class__)
+ f"other isn't of {self.__class__} type, is {other.__class__}"
)
return not self <= other
def __le__(self, other):
if not isinstance(other, self.__class__):
raise TypeError(
- "other isn't of %s type, is %s" % (self.__class__, other.__class__)
+ f"other isn't of {self.__class__} type, is {other.__class__}"
)
return self < other or self == other
def __ge__(self, other):
if not isinstance(other, self.__class__):
raise TypeError(
- "other isn't of %s type, is %s" % (self.__class__, other.__class__)
+ f"other isn't of {self.__class__} type, is {other.__class__}"
)
return self > other or self == other
def __repr__(self):
- return "<%s %r>" % (self.__class__.__name__, str(self))
+ return f"<{self.__class__.__name__} {str(self)!r}>"
def __str__(self):
return self.cpv