Skip to content

Commit

Permalink
Clarified stage_subpath behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bdufour committed May 8, 2024
1 parent 90d8c95 commit 3472fe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/snowflake/cli/plugins/stage/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def compute_stage_diff(

def get_stage_subpath(stage_path: StagePath) -> str:
"""
Returns the parent stage path (i.e. prefix or folder) for a given stage file path.
Returns the parent portion of a stage path, as a string, for inclusion in the fully qualified stage path. Note that
'.' treated specially here, and so the return value of this call is not a `StagePath` instance.
"""
parent = str(stage_path.parent)
return "" if parent == "." else parent
Expand Down

0 comments on commit 3472fe2

Please sign in to comment.