Skip to content

Commit 5bebfb2

Browse files
committed
Simplify return statement in parent_directory for better readability
Signed-off-by: Aayush Kumar <aayush214.kumar@gmail.com>
1 parent 15296e9 commit 5bebfb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scanpipe/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2889,7 +2889,7 @@ def get_path_segments_with_subpath(self):
28892889
def parent_directory(self):
28902890
"""Return the parent path for this CodebaseResource or None."""
28912891
parent_path = parent_directory(str(self.path), with_trail=False)
2892-
return None if parent_path == "" else parent_path
2892+
return parent_path or None
28932893

28942894
def has_parent(self):
28952895
"""

0 commit comments

Comments
 (0)