Skip to content

Commit c9a6e38

Browse files
committed
fixed docstring positions
1 parent f3d54ed commit c9a6e38

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

sysrsync/helpers/directories.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ def sanitize_trailing_slash(source_dir, target_dir, sync_sourcedir_contents=True
4545

4646

4747
def strip_trailing_slash(directory: str) -> str:
48-
return (directory[:-1]
49-
if directory.endswith('/')
50-
else directory)
5148
"""
5249
Strips the trailing slash from the directory path if it exists.
5350
@@ -59,11 +56,11 @@ def strip_trailing_slash(directory: str) -> str:
5956
returns the directory path as is.
6057
"""
6158

59+
return (directory[:-1]
60+
if directory.endswith('/')
61+
else directory)
6262

6363
def add_trailing_slash(directory: str) -> str:
64-
return (directory
65-
if directory.endswith('/')
66-
else f'{directory}/')
6764
"""
6865
Adds a trailing slash to the directory path if it doesn't already have one.
6966
@@ -74,3 +71,7 @@ def add_trailing_slash(directory: str) -> str:
7471
str: The directory path with a trailing slash, if it doesn't already have one.
7572
Otherwise, returns the directory path as is.
7673
"""
74+
75+
return (directory
76+
if directory.endswith('/')
77+
else f'{directory}/')

0 commit comments

Comments
 (0)