don't use a regex to find exposed functions

This commit is contained in:
Leonel Câmara
2019-03-12 11:33:41 +00:00
parent aff4f98fe1
commit cc235d3142
2 changed files with 4 additions and 10 deletions
+1 -7
View File
@@ -18,13 +18,7 @@ regex_tables = re.compile(
"""^[\w]+\.define_table\(\s*[\'\"](?P<name>\w+)[\'\"]""",
flags=re.M)
# pattern to find exposed functions in controller
regex_expose = re.compile(
'^def\s+(?P<name>_?[a-zA-Z0-9]\w*)\( *\)\s*:',
flags=re.M)
regex_longcomments = re.compile('(""".*?"""|'+"'''.*?''')", re.DOTALL)
# patterns to find includes and extends in views
regex_include = re.compile(
'(?P<all>\{\{\s*include\s+[\'"](?P<name>[^\'"]*)[\'"]\s*\}\})')