File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2854,7 +2854,7 @@ def get_path_segments_with_subpath(self):
2854
2854
2855
2855
return part_and_subpath
2856
2856
2857
- def parent_path (self ):
2857
+ def parent_directory (self ):
2858
2858
"""Return the parent path for this CodebaseResource or None."""
2859
2859
return parent_directory (self .path , with_trail = False )
2860
2860
@@ -2863,7 +2863,7 @@ def has_parent(self):
2863
2863
Return True if this CodebaseResource has a parent CodebaseResource or
2864
2864
False otherwise.
2865
2865
"""
2866
- parent_path = self .parent_path ()
2866
+ parent_path = self .parent_directory ()
2867
2867
if not parent_path :
2868
2868
return False
2869
2869
if self .project .codebaseresources .filter (path = parent_path ).exists ():
@@ -2878,7 +2878,7 @@ def parent(self, codebase=None):
2878
2878
`codebase` is not used in this context but required for compatibility
2879
2879
with the commoncode.resource.Codebase class API.
2880
2880
"""
2881
- parent_path = self .parent_path ()
2881
+ parent_path = self .parent_directory ()
2882
2882
return parent_path and self .project .codebaseresources .get (path = parent_path )
2883
2883
2884
2884
def siblings (self , codebase = None ):
Original file line number Diff line number Diff line change @@ -2059,7 +2059,7 @@ def test_scanpipe_codebase_resource_model_walk_method(self):
2059
2059
path = "asgiref-3.3.0.whl-extract/asgiref/compatibility.py"
2060
2060
)
2061
2061
expected_parent_path = "asgiref-3.3.0.whl-extract/asgiref"
2062
- self .assertEqual (expected_parent_path , asgiref_resource .parent_path ())
2062
+ self .assertEqual (expected_parent_path , asgiref_resource .parent_directory ())
2063
2063
self .assertTrue (asgiref_resource .has_parent ())
2064
2064
expected_parent = self .project_asgiref .codebaseresources .get (
2065
2065
path = "asgiref-3.3.0.whl-extract/asgiref"
You can’t perform that action at this time.
0 commit comments