mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Improve string formatting v5 (#33697)
* Improve string formatting v5 * Address review comments
This commit is contained in:
@ -233,9 +233,7 @@ def line_info(obj, **kwargs):
|
||||
"""Display line config source."""
|
||||
if hasattr(obj, "__config_file__"):
|
||||
return color(
|
||||
"cyan",
|
||||
"[source {}:{}]".format(obj.__config_file__, obj.__line__ or "?"),
|
||||
**kwargs,
|
||||
"cyan", f"[source {obj.__config_file__}:{obj.__line__ or '?'}]", **kwargs
|
||||
)
|
||||
return "?"
|
||||
|
||||
|
Reference in New Issue
Block a user