mathlibtools/lib.py
def escape_identifier(s : str) -> str:
    """ Helper function to wrap _pieces_ of identifiers in double french quotes
    if they need to be wrapped by lean, we use this for file paths so we also escape
    strings of the form `a.a` even though they are valid identifiers.
    By escaping strings we ensure that lean accepts them as imports"""
    if re.fullmatch(LEAN_UNESCAPED_IDENTIFIER_RE, s):
        return s
    return "«" + s + "»"
 Helper function to wrap _pieces_ of identifiers in double french quotes
    if they need to be wrapped by lean, we use this for file paths so we also escape
    strings of the form `a.a` even though they are valid identifiers.
    By escaping strings we ensure that lean accepts them as imports
Helper function to wrap _pieces_ of identifiers in double french quotes
if they need to be wrapped by lean, we use this for file paths so we also escape
strings of the form `a.a` even though they are valid identifiers.
By escaping strings we ensure that lean accepts them as imports
Helper function to wrap _pieces_ of identifiers in double french quotes if they need to be wrapped by lean we use this for file paths so we also escape strings of the form ` a . a ` even though they are valid identifiers . By escaping strings we ensure that lean accepts them as imports
def escape_identifier(s : str) -> str:
    if re.fullmatch(LEAN_UNESCAPED_IDENTIFIER_RE, s):
        return s
    return "«" + s + "»"
def escape_identifier ( s : str ) -> str : if re . fullmatch ( LEAN_UNESCAPED_IDENTIFIER_RE , s ) : return s return "«"  »"
Helper function to wrap _pieces_ of identifiers in double french quotes
if they need to be wrapped by lean, we use this for file paths so we also escape
strings of the form `a.a` even though they are valid identifiers.
Helper function to wrap _pieces_ of identifiers in double french quotes if they need to be wrapped by lean we use this for file paths so we also escape strings of the form ` a . a ` even though they are valid identifiers .
""" Helper function to wrap _pieces_ of identifiers in double french quotes
    if they need to be wrapped by lean, we use this for file paths so we also escape
    strings of the form `a.a` even though they are valid identifiers.
    By escaping strings we ensure that lean accepts them as imports"""
s
str