From 738d9852f84946afa4b1821e12aaf570e6cce07d Mon Sep 17 00:00:00 2001 From: Melissa Weber Mendonca Date: Wed, 4 Mar 2020 12:44:16 -0300 Subject: [PATCH] Fixing typos in f2py comments and code. --- numpy/f2py/capi_maps.py | 2 +- numpy/f2py/crackfortran.py | 12 ++++++------ numpy/f2py/f90mod_rules.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/numpy/f2py/capi_maps.py b/numpy/f2py/capi_maps.py index c362fb008449..cf61e18f6071 100644 --- a/numpy/f2py/capi_maps.py +++ b/numpy/f2py/capi_maps.py @@ -22,7 +22,7 @@ from .crackfortran import markoutercomma from . import cb_rules -# The eviroment provided by auxfuncs.py is needed for some calls to eval. +# The environment provided by auxfuncs.py is needed for some calls to eval. # As the needed functions cannot be determined by static inspection of the # code, it is safest to use import * pending a major refactoring of f2py. from .auxfuncs import * diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py index 09bab11bd4ca..2a2bc96cfd80 100755 --- a/numpy/f2py/crackfortran.py +++ b/numpy/f2py/crackfortran.py @@ -148,7 +148,7 @@ from . import __version__ -# The eviroment provided by auxfuncs.py is needed for some calls to eval. +# The environment provided by auxfuncs.py is needed for some calls to eval. # As the needed functions cannot be determined by static inspection of the # code, it is safest to use import * pending a major refactoring of f2py. from .auxfuncs import * @@ -579,8 +579,8 @@ def readfortrancode(ffile, dowithline=show, istop=1): beforethisafter % ('', 'public', 'public', '.*'), re.I), 'public' privatepattern = re.compile( beforethisafter % ('', 'private', 'private', '.*'), re.I), 'private' -intrisicpattern = re.compile( - beforethisafter % ('', 'intrisic', 'intrisic', '.*'), re.I), 'intrisic' +intrinsicpattern = re.compile( + beforethisafter % ('', 'intrinsic', 'intrinsic', '.*'), re.I), 'intrinsic' intentpattern = re.compile(beforethisafter % ( '', 'intent|depend|note|check', 'intent|depend|note|check', r'\s*\(.*?\).*'), re.I), 'intent' parameterpattern = re.compile( @@ -705,7 +705,7 @@ def crackline(line, reset=0): for pat in [dimensionpattern, externalpattern, intentpattern, optionalpattern, requiredpattern, parameterpattern, datapattern, publicpattern, privatepattern, - intrisicpattern, + intrinsicpattern, endifpattern, endpattern, formatpattern, beginpattern, functionpattern, subroutinepattern, @@ -1097,7 +1097,7 @@ def analyzeline(m, case, line): last_name = updatevars(typespec, selector, attr, edecl) if last_name is not None: previous_context = ('variable', last_name, groupcounter) - elif case in ['dimension', 'intent', 'optional', 'required', 'external', 'public', 'private', 'intrisic']: + elif case in ['dimension', 'intent', 'optional', 'required', 'external', 'public', 'private', 'intrinsic']: edecl = groupcache[groupcounter]['vars'] ll = m.group('after').strip() i = ll.find('::') @@ -1157,7 +1157,7 @@ def analyzeline(m, case, line): else: errmess('analyzeline: intent(callback) %s is already' ' in argument list' % (k)) - if case in ['optional', 'required', 'public', 'external', 'private', 'intrisic']: + if case in ['optional', 'required', 'public', 'external', 'private', 'intrinsic']: ap = case if 'attrspec' in edecl[k]: edecl[k]['attrspec'].append(ap) diff --git a/numpy/f2py/f90mod_rules.py b/numpy/f2py/f90mod_rules.py index f4f1bf1a9ead..1642c060eb1d 100644 --- a/numpy/f2py/f90mod_rules.py +++ b/numpy/f2py/f90mod_rules.py @@ -23,7 +23,7 @@ from . import func2subr from .crackfortran import undo_rmbadname, undo_rmbadname1 -# The eviroment provided by auxfuncs.py is needed for some calls to eval. +# The environment provided by auxfuncs.py is needed for some calls to eval. # As the needed functions cannot be determined by static inspection of the # code, it is safest to use import * pending a major refactoring of f2py. from .auxfuncs import *