Skip to content

Commit 8b9651d

Browse files
committed
Fix condition in FileTree insert
This is a holdover from a previous implementation, where the root tree was created by a call to insert. The newest code creates the root node explicitly when the FileTree object is created, and parent can never be None. Signed-off-by: John Pennycook <[email protected]>
1 parent c23c69d commit 8b9651d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codebasin/report.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ def insert(
633633
parent.setmap[ps] += setmap[ps]
634634

635635
# If this name exists, find the node.
636-
if parent is not None and path.name in parent.children:
636+
if path.name in parent.children:
637637
node = parent.children[path.name]
638638

639639
# Otherwise, create the node.

0 commit comments

Comments
 (0)