def sep(s: str) -> str:
    """Find the path separator used in this string, or os.sep if none."""
    if sep_match := re.search(r"[\\/]", s):
        the_sep = sep_match[0]
    else:
        the_sep = os.sep
    return the_sep
Find the path separator used in this string, or os.sep if none.
coverage/files.py