Skip to content

Commit 8627d06

Browse files
committed
lint fixes
1 parent 8c7c8dc commit 8627d06

4 files changed

Lines changed: 8 additions & 11 deletions

File tree

src/xulbux/xx_console.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ def log(
224224
)
225225
else:
226226
FormatCodes.print(
227-
f'{start} [bold][{title_color}]{f"[BG:{title_bg_color}]" if title_bg_color else ""} {title} [_]'
228-
+ f'\t{f"[{default_color}]" if default_color else ""}{prompt}[_]',
227+
f'{start} [bold][{title_color}]{f"[BG:{title_bg_color}]" if title_bg_color else ""} {title} [_]' +
228+
f'\t{f"[{default_color}]" if default_color else ""}{prompt}[_]',
229229
default_color=default_color,
230230
end=end,
231231
)
@@ -389,14 +389,14 @@ def log_box(
389389
max_line_len = max(len(line) for line in unfmt_lines)
390390
pad_w_full = (Console.w - (max_line_len + (2 * w_padding))) if w_full else 0
391391
lines = [
392-
f"[bg:{box_bg_color}]{' ' * w_padding}{line}" + " " *
393-
((w_padding + max_line_len - len(unfmt)) + pad_w_full) + "[_bg]" for line, unfmt in zip(lines, unfmt_lines)
392+
f"[bg:{box_bg_color}]{' ' * w_padding}{line}" + " " * ((w_padding + max_line_len - len(unfmt)) + pad_w_full) +
393+
"[_bg]" for line, unfmt in zip(lines, unfmt_lines)
394394
]
395395
pady = " " * (Console.w if w_full else max_line_len + (2 * w_padding))
396396
FormatCodes.print(
397-
f"{start}[bg:{box_bg_color}]{pady}[_bg]\n"
398-
+ _COMPILED["formatting"].sub(lambda m: f"{m.group(0)}[bg:{box_bg_color}]", "\n".join(lines))
399-
+ f"\n[bg:{box_bg_color}]{pady}[_bg]",
397+
f"{start}[bg:{box_bg_color}]{pady}[_bg]\n" +
398+
_COMPILED["formatting"].sub(lambda m: f"{m.group(0)}[bg:{box_bg_color}]", "\n".join(lines)) +
399+
f"\n[bg:{box_bg_color}]{pady}[_bg]",
400400
default_color=default_color,
401401
sep="\n",
402402
end=end,

src/xulbux/xx_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def set_value_by_path_id(data: DataStructure, update_values: dict[str, Any]) ->
346346
"""Updates the value/s from `update_values` in the `data`.\n
347347
--------------------------------------------------------------------------------
348348
Input a list, tuple or dict as `data`, along with `update_values`, which is a
349-
dictionary where keys are path IDs and values are the new values to insert:
349+
dictionary where keys are path IDs and values are the new values to insert:
350350
{ "1>": "new value", "path_id2": ["new value 1", "new value 2"], ... }
351351
The path IDs should have been created using `Data.get_path_id()`.\n
352352
--------------------------------------------------------------------------------

src/xulbux/xx_file.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .xx_string import String
2-
from .xx_path import Path
32

43
import os as _os
54

src/xulbux/xx_path.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import sys as _sys
66
import os as _os
77

8-
from regex import P
9-
108

119
# YAPF: disable
1210
class PathNotFoundError(FileNotFoundError): ...

0 commit comments

Comments
 (0)