Skip to content

Commit

Permalink
Fix f-string usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Oct 23, 2020
1 parent 794a659 commit dd9e11e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $(DEPENDENCIES): poetry.lock
@ touch $@

poetry.lock: pyproject.toml
poetry lock
poetry lock --no-update
@ touch $@

.cache:
Expand Down
4 changes: 2 additions & 2 deletions datafiles/converters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def map_type(cls, *, name: str = '', item_cls: Optional[type] = None):
try:
converter = map_type(item_cls or cls.__args__[0])
except TypeError as e:
assert '~T' in str(e), f'Unhandled error: ' + str(e)
assert '~T' in str(e), f'Unhandled error: {e}'
raise TypeError("Type is required with 'List' annotation") from None
else:
converter = List.of_type(converter)
Expand All @@ -74,7 +74,7 @@ def map_type(cls, *, name: str = '', item_cls: Optional[type] = None):
key = map_type(cls.__args__[0])
value = map_type(cls.__args__[1])
except TypeError as e:
assert '~' in str(e), f'Unhandled error: ' + str(e)
assert '~' in str(e), f'Unhandled error: {e}'
raise TypeError(
"Types are required with 'Dict' annotation"
) from None
Expand Down
2 changes: 1 addition & 1 deletion datafiles/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def save(self, *, include_default_values: Trilean = None, _log=True) -> None:
if _log:
log.info(f"Saving '{self.classname}' object to '{self.relpath}'")
else:
raise RuntimeError(f"'pattern' must be set to save the model")
raise RuntimeError("'pattern' must be set to save the model")

with hooks.disabled():
text = self._get_text(include_default_values=include_default_values)
Expand Down

0 comments on commit dd9e11e

Please sign in to comment.