src/url_checks/checks.py
def _check_path(path, namespace):
    """Verify that a single path ends with a slash"""
    pattern = str(path.pattern)
    if len(pattern) > 0 and not pattern.endswith(("/", "/$")):
        name = f"{namespace}:{path.name}" if namespace else path.name
        return MESSAGES.NO_SLASH_PATTERN(
            hint=f'Add slash to end of path "{pattern}", named "{name}"'
        )
Verify that a single path ends with a slash
Verify that a single path ends with a slash
Verify that a single path ends with a slash
def _check_path(path, namespace):
    pattern = str(path.pattern)
    if len(pattern) > 0 and not pattern.endswith(("/", "/$")):
        name = f"{namespace}:{path.name}" if namespace else path.name
        return MESSAGES.NO_SLASH_PATTERN(
            hint=f'Add slash to end of path "{pattern}", named "{name}"'
        )
def _check_path ( path , namespace ) : pattern = str ( path . pattern ) if len ( pattern ) > 0 and not pattern . endswith ( ( "/" , "/$" ) ) : name = f"{namespace}:{path.name}" if namespace else path . name return MESSAGES . NO_SLASH_PATTERN ( hint = f'Add slash to end of path "{pattern}", named "{name}"' )
Verify that a single path ends with a slash
Verify that a single path ends with a slash
"""Verify that a single path ends with a slash"""
path
namespace