Skip to content

Commit

Permalink
Merge pull request #18356 from charris/backport-18072
Browse files Browse the repository at this point in the history
MAINT: crackfortran regex simplify
  • Loading branch information
charris committed Feb 7, 2021
2 parents 224a34b + c181a40 commit 284387a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numpy/f2py/crackfortran.py
Expand Up @@ -636,7 +636,7 @@ def _simplifyargs(argsline):
a.append(n)
return ','.join(a)

crackline_re_1 = re.compile(r'\s*(?P<result>\b[a-z]+[\w]*\b)\s*[=].*', re.I)
crackline_re_1 = re.compile(r'\s*(?P<result>\b[a-z]+\w*\b)\s*=.*', re.I)


def crackline(line, reset=0):
Expand Down Expand Up @@ -2605,7 +2605,7 @@ def analyzevars(block):
params = get_parameters(vars, get_useparameters(block))

dep_matches = {}
name_match = re.compile(r'\w[\w\d_$]*').match
name_match = re.compile(r'[A-Za-z][\w$]*').match
for v in list(vars.keys()):
m = name_match(v)
if m:
Expand Down

0 comments on commit 284387a

Please sign in to comment.