Coding Style

- Use better termstr contructor.
This commit is contained in:
Andrew Hamilton 2022-10-20 16:26:09 +10:00
parent 54814ac0d3
commit 8efb2aaa69
6 changed files with 17 additions and 17 deletions

View file

@ -164,6 +164,6 @@ def path_colored(path):
dirname = dirname + os.path.sep
dir_style = _charstyle_of_path(os.path.sep)
parts = [termstr.TermStr(part, dir_style) for part in dirname.split(os.path.sep)]
path_sep = termstr.TermStr(os.path.sep).fg_color(termstr.Color.grey_100)
path_sep = termstr.TermStr(os.path.sep, fg_color=termstr.Color.grey_100)
dir_name = termstr.join(path_sep, parts)
return dir_name + termstr.TermStr(basename, char_style)