Improve string formatting v6 (#33698)

This commit is contained in:
springstan authored and GitHub committed 2020-04-07 23:14:28 +02:00
1 parent d7e3b0b755
commit eae21be5b9
43 files changed
+81 -87

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ def repr_helper(inp: Any) -> str:
"""Help creating a more readable string representation of objects."""
if isinstance(inp, (dict, MappingProxyType)):
return ", ".join(
repr_helper(key) + "=" + repr_helper(item) for key, item in inp.items()
f"{repr_helper(key)}={repr_helper(item)}" for key, item in inp.items()
)
if isinstance(inp, datetime):
return as_local(inp).isoformat()