Skip to content

Commit 46cb583

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)