Skip to content

Commit d78ab63

Browse files
committed
fix: lint
1 parent f4ad581 commit d78ab63

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
- id: isort
2121
name: isort (python)
2222
- repo: https://github.com/psf/black
23-
rev: 24.1.0
23+
rev: 25.1.0
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/PyCQA/flake8

bigtree/tree/construct/strings.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,29 +75,29 @@ def add_path_to_tree(
7575
)
7676

7777
# Grow tree
78-
node = root_node
78+
_node = root_node
7979
parent_node = root_node
8080
for idx in range(1, len(branch)):
8181
node_name = branch[idx]
8282
node_path = tree_sep.join(branch[: idx + 1])
8383
if not duplicate_name_allowed:
84-
node = search.find_name(root_node, node_name)
85-
if node and not node.path_name.endswith(node_path):
84+
_node = search.find_name(root_node, node_name)
85+
if _node and not _node.path_name.endswith(node_path):
8686
raise exceptions.DuplicatedNodeError(
8787
f"Node {node_name} already exists, try setting `duplicate_name_allowed` to True "
8888
f"to allow `Node` with same node name"
8989
)
9090
else:
91-
node = search.find_child_by_name(parent_node, node_name)
92-
if not node:
91+
_node = search.find_child_by_name(parent_node, node_name)
92+
if not _node:
9393
if idx == len(branch) - 1:
94-
node = node_type(node_name, **node_attrs)
94+
_node = node_type(node_name, **node_attrs)
9595
else:
96-
node = node_type(node_name)
97-
node.parent = parent_node
98-
parent_node = node
99-
node.set_attrs(node_attrs)
100-
return node
96+
_node = node_type(node_name)
97+
_node.parent = parent_node
98+
parent_node = _node
99+
_node.set_attrs(node_attrs)
100+
return _node
101101

102102

103103
def str_to_tree(

bigtree/utils/constants.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ class ExportConstants:
1212
VERTICAL = "\u2502"
1313
HORIZONTAL = "\u2500"
1414

15-
DOWN_RIGHT_ROUNDED = "\u256D"
15+
DOWN_RIGHT_ROUNDED = "\u256d"
1616
UP_RIGHT_ROUNDED = "\u2570"
1717

18-
DOWN_RIGHT_BOLD = "\u250F"
18+
DOWN_RIGHT_BOLD = "\u250f"
1919
VERTICAL_RIGHT_BOLD = "\u2523"
20-
VERTICAL_LEFT_BOLD = "\u252B"
21-
VERTICAL_HORIZONTAL_BOLD = "\u254B"
20+
VERTICAL_LEFT_BOLD = "\u252b"
21+
VERTICAL_HORIZONTAL_BOLD = "\u254b"
2222
UP_RIGHT_BOLD = "\u2517"
2323
VERTICAL_BOLD = "\u2503"
2424
HORIZONTAL_BOLD = "\u2501"
2525

2626
DOWN_RIGHT_DOUBLE = "\u2554"
2727
VERTICAL_RIGHT_DOUBLE = "\u2560"
2828
VERTICAL_LEFT_DOUBLE = "\u2563"
29-
VERTICAL_HORIZONTAL_DOUBLE = "\u256C"
29+
VERTICAL_HORIZONTAL_DOUBLE = "\u256c"
3030
UP_RIGHT_DOUBLE = "\u255a"
3131
VERTICAL_DOUBLE = "\u2551"
3232
HORIZONTAL_DOUBLE = "\u2550"

bigtree/utils/exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def wrapper(*args: Any, **kwargs: Any) -> T:
7171

7272

7373
def optional_dependencies_pandas(
74-
func: Callable[..., T]
74+
func: Callable[..., T],
7575
) -> Callable[..., T]: # pragma: no cover
7676
"""
7777
This is a decorator which can be used to import optional pandas dependency.
@@ -93,7 +93,7 @@ def wrapper(*args: Any, **kwargs: Any) -> T:
9393

9494

9595
def optional_dependencies_polars(
96-
func: Callable[..., T]
96+
func: Callable[..., T],
9797
) -> Callable[..., T]: # pragma: no cover
9898
"""
9999
This is a decorator which can be used to import optional polars dependency.
@@ -115,7 +115,7 @@ def wrapper(*args: Any, **kwargs: Any) -> T:
115115

116116

117117
def optional_dependencies_matplotlib(
118-
func: Callable[..., T]
118+
func: Callable[..., T],
119119
) -> Callable[..., T]: # pragma: no cover
120120
"""
121121
This is a decorator which can be used to import optional matplotlib dependency.

0 commit comments

Comments
 (0)