diff --git a/pandas/tests/extension/list/array.py b/pandas/tests/extension/list/array.py index 0ca9fadb68829..6dd00ad3b06ba 100644 --- a/pandas/tests/extension/list/array.py +++ b/pandas/tests/extension/list/array.py @@ -36,7 +36,7 @@ def construct_from_string(cls, string): if string == cls.name: return cls() else: - raise TypeError("Cannot construct a '{}' from '{}'".format(cls, string)) + raise TypeError(f"Cannot construct a '{cls}' from '{string}'") class ListArray(ExtensionArray):