diff --git a/sbol3/identified.py b/sbol3/identified.py index 9f37c3f..971a665 100644 --- a/sbol3/identified.py +++ b/sbol3/identified.py @@ -1,8 +1,9 @@ from __future__ import annotations + import math import posixpath -from typing import Callable, Any, Optional import typing +from typing import Any, Callable, Optional from urllib.parse import urlparse import rdflib @@ -124,7 +125,7 @@ def __init__(self, identity: str, type_uri: str, initial_value=[type_uri]) def __str__(self): - return '<%s %s>' % (self.__class__.__name__, self.identity) + return f'<{self.__class__.__name__} {self.identity}>' @staticmethod def _is_valid_display_id(display_id: str) -> bool: diff --git a/setup.cfg b/setup.cfg index 86dde44..d911366 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,6 @@ disable = abstract-class-instantiated, consider-using-get, disallowed-name, import-outside-toplevel, - consider-using-f-string, cyclic-import, duplicate-code, fixme, diff --git a/test/test_module.py b/test/test_module.py index d315266..acee7ef 100644 --- a/test/test_module.py +++ b/test/test_module.py @@ -100,9 +100,9 @@ def test_identified_constructors(self): try: item(*arg_list) except TypeError as e: - self.fail('Unable to construct sbol3.%s: %s' % (name, e)) + self.fail(f'Unable to construct sbol3.{name}: {e}') except sbol3.ValidationError as e: - self.fail('Constructed invalid sbol3.%s: %s' % (name, e)) + self.fail(f'Constructed invalid sbol3.{name}: {e}') if item in abstract_list: # Skip over abstract classes when checking for the # accept method