From 8b9651d023f869cbfd5c0f633ea25a3edeb93935 Mon Sep 17 00:00:00 2001 From: John Pennycook Date: Fri, 4 Apr 2025 15:06:17 +0100 Subject: [PATCH] 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 --- codebasin/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebasin/report.py b/codebasin/report.py index fb7638f..1ac2dbc 100644 --- a/codebasin/report.py +++ b/codebasin/report.py @@ -633,7 +633,7 @@ def insert( parent.setmap[ps] += setmap[ps] # If this name exists, find the node. - if parent is not None and path.name in parent.children: + if path.name in parent.children: node = parent.children[path.name] # Otherwise, create the node.