diff options
| author | Tyler Reddy <tyler.je.reddy@gmail.com> | 2020-12-29 08:36:29 -0700 |
|---|---|---|
| committer | Tyler Reddy <tyler.je.reddy@gmail.com> | 2020-12-29 08:36:29 -0700 |
| commit | 74249e3f8593df5f5af0f8c0888cbfbc9c480658 (patch) | |
| tree | 217779ff2b9c512d87c4fb40bb0128dac032174e /numpy/f2py/capi_maps.py | |
| parent | 717df4e93234a1a290aa1b472b5c1c4e600009cd (diff) | |
| download | numpy-74249e3f8593df5f5af0f8c0888cbfbc9c480658.tar.gz | |
MAINT: multiline regex class simplify
* follow up to gh-18083 covering multi-line uses
of `re.compile(..` and some cases for `re.match(..`
with single (meta)character classes
Diffstat (limited to 'numpy/f2py/capi_maps.py')
| -rw-r--r-- | numpy/f2py/capi_maps.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/f2py/capi_maps.py b/numpy/f2py/capi_maps.py index 472ddde43..fe0d4a52b 100644 --- a/numpy/f2py/capi_maps.py +++ b/numpy/f2py/capi_maps.py @@ -307,7 +307,7 @@ def getstrlength(var): len = a['*'] elif 'len' in a: len = a['len'] - if re.match(r'\(\s*([*]|[:])\s*\)', len) or re.match(r'([*]|[:])', len): + if re.match(r'\(\s*(\*|:)\s*\)', len) or re.match(r'(\*|:)', len): if isintent_hide(var): errmess('getstrlength:intent(hide): expected a string with defined length but got: %s\n' % ( repr(var))) |
