Skip to content

Commit

Permalink
util.xdg_base_dirs: Refactor __repr__() to use f"" strings
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitronx committed Aug 10, 2023
1 parent b3c4782 commit d205d4e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/waybar_check_gmail/util/xdg_base_dirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ def __exit__(self, exc_type, exc_val, exc_tb):

def __repr__(self):
return (
"%s(xdg_config_home=%s, xdg_data_home=%s, xdg_cache_home=%s,"
"xdg_state_home=%s, xdg_runtime_dir=%s)" % self.__class__.__name__,
self.xdg_config_home,
self.xdg_data_home,
self.xdg_cache_home,
self.xdg_state_home,
self.xdg_runtime_dir,
f"{self.__class__.__name__}(xdg_config_home={self.xdg_config_home}, "
f"xdg_data_home={self.xdg_data_home}, xdg_cache_home={self.xdg_cache_home}, "
f"xdg_state_home={self.xdg_state_home}, "
f"xdg_runtime_dir={self.xdg_runtime_dir})"
)

0 comments on commit d205d4e

Please sign in to comment.