Skip to content

Commit ed0403e

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

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
@@ -2870,7 +2870,7 @@ def get_path_segments_with_subpath(self):
28702870
def parent_directory(self):
28712871
"""Return the parent path for this CodebaseResource or None."""
28722872
parent_path = parent_directory(str(self.path), with_trail=False)
2873-
return None if parent_path == "" else parent_path
2873+
return parent_path or None
28742874

28752875
def has_parent(self):
28762876
"""

0 commit comments

Comments
 (0)