piwebasync/api/models.py
def normalize_root(cls, root: str) -> str:
        """Add leading and trailing slash to root"""
        try:
            if root[0] != "/":
                root = '/' + root
            if root[-1] != "/":
                root = root + '/'
        except IndexError:
            root = '/'
        return root
Add leading and trailing slash to root
Add leading and trailing slash to root
Add leading and trailing slash to root
def normalize_root(cls, root: str) -> str:
        try:
            if root[0] != "/":
                root = '/' + root
            if root[-1] != "/":
                root = root + '/'
        except IndexError:
            root = '/'
        return root
def normalize_root ( cls , root : str ) -> str : try : if root [ 0 ] != "/" : root = '/' + root if root [ - 1 ] != "/" : root = root + '/' except IndexError : root = '/' return root
Add leading and trailing slash to root
Add leading and trailing slash to root
"""Add leading and trailing slash to root"""
cls
root
str