diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-01-25 16:13:59 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-01-25 16:13:59 +0100 |
commit | df1abe8d275970dbaefd2ccc4c22ad1c83eb381c (patch) | |
tree | f2438ad494f63824ddbb1859d4c34b77e61446b4 | |
parent | 1ce9be884414be2cbaffc8b6d2ac83de86017f8c (diff) | |
download | pylint-git-df1abe8d275970dbaefd2ccc4c22ad1c83eb381c.tar.gz |
Rip some of the six imports from the codebase
-rw-r--r-- | pylint/checkers/base.py | 15 | ||||
-rw-r--r-- | pylint/checkers/classes.py | 19 | ||||
-rw-r--r-- | pylint/checkers/exceptions.py | 8 | ||||
-rw-r--r-- | pylint/checkers/format.py | 6 | ||||
-rw-r--r-- | pylint/checkers/imports.py | 16 | ||||
-rw-r--r-- | pylint/checkers/logging.py | 6 | ||||
-rw-r--r-- | pylint/checkers/misc.py | 4 | ||||
-rw-r--r-- | pylint/checkers/python3.py | 11 | ||||
-rw-r--r-- | pylint/checkers/refactoring.py | 7 | ||||
-rw-r--r-- | pylint/checkers/similar.py | 5 | ||||
-rw-r--r-- | pylint/checkers/stdlib.py | 26 | ||||
-rw-r--r-- | pylint/checkers/strings.py | 10 | ||||
-rw-r--r-- | pylint/checkers/typecheck.py | 13 | ||||
-rw-r--r-- | pylint/checkers/utils.py | 1 | ||||
-rw-r--r-- | pylint/checkers/variables.py | 12 |
15 files changed, 56 insertions, 103 deletions
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index 75ee08aff..69e8deced 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -28,14 +28,12 @@ """basic checker for Python code""" +import builtins import collections import itertools import sys import re -import six -from six.moves import zip # pylint: disable=redefined-builtin - import astroid import astroid.bases import astroid.scoped_nodes @@ -134,7 +132,7 @@ TYPECHECK_COMPARISON_OPERATORS = frozenset(('is', 'is not', '==', '!=', 'in', 'not in')) LITERAL_NODE_TYPES = (astroid.Const, astroid.Dict, astroid.List, astroid.Set) UNITTEST_CASE = 'unittest.case' -BUILTINS = six.moves.builtins.__name__ +BUILTINS = builtins.__name__ TYPE_QNAME = "%s.type" % BUILTINS PY33 = sys.version_info >= (3, 3) PY3K = sys.version_info >= (3, 0) @@ -879,8 +877,7 @@ functions, methods def visit_expr(self, node): """check for various kind of statements without effect""" expr = node.value - if isinstance(expr, astroid.Const) and isinstance(expr.value, - six.string_types): + if isinstance(expr, astroid.Const) and isinstance(expr.value, str): # treat string statement in a separated message # Handle PEP-257 attribute docstrings. # An attribute docstring is defined as being a string right after @@ -1385,12 +1382,12 @@ class NameChecker(_BasicChecker): self._bad_names = {} def leave_module(self, node): # pylint: disable=unused-argument - for all_groups in six.itervalues(self._bad_names): + for all_groups in self._bad_names.values(): if len(all_groups) < 2: continue groups = collections.defaultdict(list) min_warnings = sys.maxsize - for group in six.itervalues(all_groups): + for group in all_groups.values(): groups[len(group)].append(group) min_warnings = min(len(group), min_warnings) if len(groups[min_warnings]) > 1: @@ -1406,7 +1403,7 @@ class NameChecker(_BasicChecker): def visit_classdef(self, node): self._check_assign_to_new_keyword_violation(node.name, node) self._check_name('class', node.name, node) - for attr, anodes in six.iteritems(node.instance_attrs): + for attr, anodes in node.instance_attrs.items(): if not any(node.instance_attr_ancestors(attr)): self._check_name('attr', attr, anodes[0]) diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index 2216d703b..5cbcb63e4 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -26,10 +26,9 @@ from __future__ import generators import collections +from itertools import zip_longest import sys -import six - import astroid from astroid.bases import Generator, BUILTINS from astroid.exceptions import InconsistentMroError, DuplicateBasesError @@ -223,7 +222,7 @@ def _has_different_parameters_default_value(original, overridden): return False def _has_different_parameters(original, overridden, dummy_parameter_regex): - zipped = six.moves.zip_longest(original, overridden) + zipped = zip_longest(original, overridden) for original_param, overridden_param in zipped: params = (original_param, overridden_param) if not all(params): @@ -403,7 +402,7 @@ def _has_same_layout_slots(slots, assigned_value): if isinstance(inferred, astroid.ClassDef): other_slots = inferred.slots() if all(first_slot and second_slot and first_slot.value == second_slot.value - for (first_slot, second_slot) in six.moves.zip_longest(slots, other_slots)): + for (first_slot, second_slot) in zip_longest(slots, other_slots)): return True return False @@ -692,7 +691,7 @@ a metaclass class method.'} return defining_methods = self.config.defining_attr_methods current_module = cnode.root() - for attr, nodes in six.iteritems(cnode.instance_attrs): + for attr, nodes in cnode.instance_attrs.items(): # skip nodes which are not in the current module and it may screw up # the output, while it's not worth it nodes = [n for n in nodes if not @@ -905,7 +904,7 @@ a metaclass class method.'} if infered is astroid.Uninferable: continue if (not isinstance(infered, astroid.Const) or - not isinstance(infered.value, six.string_types)): + not isinstance(infered.value, str)): self.add_message('invalid-slots-object', args=infered.as_string(), node=elt) @@ -932,7 +931,7 @@ a metaclass class method.'} and not (node.is_abstract() or overrides_a_method(class_node, node.name) or decorated_with_property(node) or - (six.PY3 and _has_bare_super_call(node)))): + _has_bare_super_call(node))): self.add_message('no-self-use', node=node) def visit_attribute(self, node): @@ -1115,7 +1114,7 @@ a metaclass class method.'} """check that accessed members are defined""" # XXX refactor, probably much simpler now that E0201 is in type checker excs = ('AttributeError', 'Exception', 'BaseException') - for attr, nodes in six.iteritems(accessed): + for attr, nodes in accessed.items(): try: # is it a class attribute ? node.local_attr(attr) @@ -1299,7 +1298,7 @@ a metaclass class method.'} node=expr, args=klass.name) except astroid.InferenceError: continue - for klass, method in six.iteritems(not_called_yet): + for klass, method in not_called_yet.items(): cls = node_frame_class(method) if klass.name == 'object' or (cls and cls.name == 'object'): continue @@ -1493,7 +1492,7 @@ class SpecialMethodsChecker(BaseChecker): return value = inferred.value - if not isinstance(value, six.integer_types) or value < 0: + if not isinstance(value, int) or value < 0: self.add_message('invalid-length-returned', node=node) diff --git a/pylint/checkers/exceptions.py b/pylint/checkers/exceptions.py index 88d1b1a83..08fb6d8e8 100644 --- a/pylint/checkers/exceptions.py +++ b/pylint/checkers/exceptions.py @@ -18,12 +18,10 @@ # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Checks for various exception related errors.""" - +import builtins import inspect import sys -import six -from six.moves import builtins import astroid from pylint import checkers @@ -35,7 +33,7 @@ def _builtin_exceptions(): def predicate(obj): return isinstance(obj, type) and issubclass(obj, BaseException) - members = inspect.getmembers(six.moves.builtins, predicate) + members = inspect.getmembers(builtins, predicate) return {exc.__name__ for (_, exc) in members} @@ -162,7 +160,7 @@ class ExceptionRaiseRefVisitor(BaseVisitor): self.visit_name(call.func) if (len(call.args) > 1 and isinstance(call.args[0], astroid.Const) and - isinstance(call.args[0].value, six.string_types)): + isinstance(call.args[0].value, str)): msg = call.args[0].value if ('%' in msg or ('{' in msg and '}' in msg)): diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py index 2931f8eac..013ed47e3 100644 --- a/pylint/checkers/format.py +++ b/pylint/checkers/format.py @@ -39,9 +39,6 @@ import sys import tokenize from functools import reduce # pylint: disable=redefined-builtin -import six -from six.moves import zip, map, filter # pylint: disable=redefined-builtin - from astroid import nodes from pylint.interfaces import ITokenChecker, IAstroidChecker, IRawChecker @@ -894,8 +891,7 @@ class FormatChecker(BaseTokenChecker): for indent_pos, state, offsets in self._current_line.retained_warnings: block_type = offsets[tokens.start_col(indent_pos)] - hints = dict((k, v) for k, v in six.iteritems(offsets) - if v != block_type) + hints = {k: v for k, v in offsets.items() if v != block_type} if single_line_block_stmt and block_type == WITH_BODY: self._add_continuation_message(state, hints, tokens, indent_pos) elif not single_line_block_stmt and block_type == SINGLE_LINE: diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py index 630090c41..9f3776d88 100644 --- a/pylint/checkers/imports.py +++ b/pylint/checkers/imports.py @@ -32,8 +32,6 @@ import os import sys import copy -import six - import astroid from astroid import are_exclusive from astroid.modutils import (get_module_part, is_standard_module) @@ -164,14 +162,14 @@ def _dependencies_graph(filename, dep_info): done = {} printer = DotBackend(filename[:-4], rankdir='LR') printer.emit('URL="." node[shape="box"]') - for modname, dependencies in sorted(six.iteritems(dep_info)): + for modname, dependencies in sorted(dep_info.items()): done[modname] = 1 printer.emit_node(modname) for depmodname in dependencies: if depmodname not in done: done[depmodname] = 1 printer.emit_node(depmodname) - for depmodname, dependencies in sorted(six.iteritems(dep_info)): + for depmodname, dependencies in sorted(dep_info.items()): for modname in dependencies: printer.emit_edge(modname, depmodname) printer.generate(filename) @@ -261,9 +259,7 @@ class ImportsChecker(BaseChecker): msgs = MSGS priority = -2 - if six.PY2: - deprecated_modules = ('regsub', 'TERMIOS', 'Bastion', 'rexec') - elif sys.version_info < (3, 5): + if sys.version_info < (3, 5): deprecated_modules = ('optparse', ) else: deprecated_modules = ('optparse', 'tkinter.tix') @@ -739,7 +735,7 @@ class ImportsChecker(BaseChecker): def _report_external_dependencies(self, sect, _, _dummy): """return a verbatim layout for displaying dependencies""" - dep_info = _make_tree_defs(six.iteritems(self._external_dependencies_info())) + dep_info = _make_tree_defs(self._external_dependencies_info().items()) if not dep_info: raise EmptyReportError() tree_str = _repr_tree_defs(dep_info) @@ -771,7 +767,7 @@ class ImportsChecker(BaseChecker): if self.__ext_dep_info is None: package = self.linter.current_name self.__ext_dep_info = result = {} - for importee, importers in six.iteritems(self.stats['dependencies']): + for importee, importers in self.stats['dependencies'].items(): if not importee.startswith(package): result[importee] = importers return self.__ext_dep_info @@ -783,7 +779,7 @@ class ImportsChecker(BaseChecker): if self.__int_dep_info is None: package = self.linter.current_name self.__int_dep_info = result = {} - for importee, importers in six.iteritems(self.stats['dependencies']): + for importee, importers in self.stats['dependencies'].items(): if importee.startswith(package): result[importee] = importers return self.__int_dep_info diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py index 051fa7589..4cc3c30f8 100644 --- a/pylint/checkers/logging.py +++ b/pylint/checkers/logging.py @@ -17,8 +17,6 @@ """ import string -import six - import astroid from pylint import checkers @@ -226,7 +224,7 @@ class LoggingChecker(checkers.BaseChecker): # don't check any further. return format_string = node.args[format_arg].value - if not isinstance(format_string, six.string_types): + if not isinstance(format_string, str): # If the log format is constant non-string (e.g. logging.debug(5)), # ensure there are no arguments. required_num_args = 0 @@ -261,7 +259,7 @@ def is_complex_format_str(node): bool: True if inferred string uses complex formatting, False otherwise """ inferred = utils.safe_infer(node) - if inferred is None or not isinstance(inferred.value, six.string_types): + if inferred is None or not isinstance(inferred.value, str): return True for _, _, format_spec, _ in string.Formatter().parse(inferred.value): if format_spec: diff --git a/pylint/checkers/misc.py b/pylint/checkers/misc.py index 4f5407b10..c0f9ae83b 100644 --- a/pylint/checkers/misc.py +++ b/pylint/checkers/misc.py @@ -21,8 +21,6 @@ import re -import six - from pylint.interfaces import IRawChecker from pylint.checkers import BaseChecker from pylint.utils import OPTION_RGX @@ -111,7 +109,7 @@ class EncodingChecker(BaseChecker): def _check_encoding(self, lineno, line, file_encoding): try: - return six.text_type(line, file_encoding) + line.decode(file_encoding) except UnicodeDecodeError as ex: self.add_message('invalid-encoded-data', line=lineno, args=(file_encoding, ex.args[2])) diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py index 8e0da4b88..9b36d68aa 100644 --- a/pylint/checkers/python3.py +++ b/pylint/checkers/python3.py @@ -21,14 +21,11 @@ """Check Python 2 code for Python 2/3 source-compatible issues.""" from __future__ import absolute_import, print_function +from collections import namedtuple import re import sys import tokenize -from collections import namedtuple - -import six - import astroid from astroid import bases @@ -644,7 +641,7 @@ class Python3Checker(checkers.BaseChecker): self.add_message('print-statement', node=node, always_warn=True) def _warn_if_deprecated(self, node, module, attributes, report_on_modules=True): - for message, module_map in six.iteritems(self._bad_python3_module_map): + for message, module_map in self._bad_python3_module_map.items(): if module in module_map and module not in self._modules_warned_about: if isinstance(module_map, frozenset): if report_on_modules: @@ -731,7 +728,7 @@ class Python3Checker(checkers.BaseChecker): @staticmethod def _is_constant_string_or_name(node): if isinstance(node, astroid.Const): - return isinstance(node.value, six.string_types) + return isinstance(node.value, str) return isinstance(node, astroid.Name) @staticmethod @@ -749,7 +746,7 @@ class Python3Checker(checkers.BaseChecker): if inferred_type is astroid.Uninferable: confidence = INFERENCE_FAILURE elif not (isinstance(inferred_type, astroid.Const) and - isinstance(inferred_type.value, six.string_types)): + isinstance(inferred_type.value, str)): return None return confidence diff --git a/pylint/checkers/refactoring.py b/pylint/checkers/refactoring.py index 3ad179da2..1a3641ebb 100644 --- a/pylint/checkers/refactoring.py +++ b/pylint/checkers/refactoring.py @@ -15,14 +15,13 @@ # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Looks for code which can be refactored.""" - +import builtins import collections import itertools import tokenize import astroid from astroid import decorators -import six from pylint import interfaces from pylint import checkers @@ -253,7 +252,7 @@ class RefactoringChecker(checkers.BaseTokenChecker): # tokens[index][2] is the actual position and also is # reported by IronPython. self._elifs.extend([tokens[index][2], tokens[index+1][2]]) - elif six.PY3 and is_trailing_comma(tokens, index): + elif is_trailing_comma(tokens, index): if self.linter.is_message_enabled('trailing-comma-tuple'): self.add_message('trailing-comma-tuple', line=token.start[0]) @@ -728,7 +727,7 @@ class NotChecker(checkers.BaseChecker): # not equivalent to "set(LEFT_VALS) > set(RIGHT_VALS)" skipped_nodes = (astroid.Set,) # 'builtins' py3, '__builtin__' py2 - skipped_classnames = ['%s.%s' % (six.moves.builtins.__name__, qname) + skipped_classnames = ['%s.%s' % (builtins.__name__, qname) for qname in ('set', 'frozenset')] @utils.check_messages('unneeded-not') diff --git a/pylint/checkers/similar.py b/pylint/checkers/similar.py index 8fd993fb2..295a3828b 100644 --- a/pylint/checkers/similar.py +++ b/pylint/checkers/similar.py @@ -20,9 +20,6 @@ from __future__ import print_function import sys from collections import defaultdict -import six -from six.moves import zip - from pylint.utils import decoding_stream from pylint.interfaces import IRawChecker from pylint.checkers import BaseChecker, table_lines_from_stats @@ -72,7 +69,7 @@ class Similar(object): else: duplicate.append(set([(lineset1, idx1), (lineset2, idx2)])) sims = [] - for num, ensembles in six.iteritems(no_duplicates): + for num, ensembles in no_duplicates.items(): for couples in ensembles: sims.append((num, couples)) sims.sort() diff --git a/pylint/checkers/stdlib.py b/pylint/checkers/stdlib.py index 37619cbb4..c1c3217d2 100644 --- a/pylint/checkers/stdlib.py +++ b/pylint/checkers/stdlib.py @@ -20,8 +20,6 @@ import sys -import six - import astroid from astroid.bases import Instance from pylint.interfaces import IAstroidChecker @@ -42,15 +40,12 @@ else: def _check_mode_str(mode): # check type - if not isinstance(mode, six.string_types): + if not isinstance(mode, str): return False # check syntax modes = set(mode) - _mode = "rwatb+U" - creating = False - if six.PY3: - _mode += "x" - creating = "x" in modes + _mode = "rwatb+Ux" + creating = "x" in modes if modes - set(_mode) or len(mode) > len(modes): return False # check logic @@ -60,25 +55,16 @@ def _check_mode_str(mode): text = "t" in modes binary = "b" in modes if "U" in modes: - if writing or appending or creating and six.PY3: + if writing or appending or creating: return False reading = True - if not six.PY3: - binary = True if text and binary: return False - total = reading + writing + appending + (creating if six.PY3 else 0) + total = reading + writing + appending + creating if total > 1: return False - if not (reading or writing or appending or creating and six.PY3): + if not (reading or writing or appending or creating): return False - # other 2.x constraints - if not six.PY3: - if "U" in mode: - mode = mode.replace("U", "") - if "r" not in mode: - mode = "r" + mode - return mode[0] in ("r", "w", "a", "U") return True diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py index 6a0ed9657..f82048800 100644 --- a/pylint/checkers/strings.py +++ b/pylint/checkers/strings.py @@ -25,8 +25,6 @@ import tokenize import string import numbers -import six - import astroid from pylint.interfaces import ITokenChecker, IAstroidChecker, IRawChecker from pylint.checkers import BaseChecker, BaseTokenChecker @@ -252,7 +250,7 @@ class StringFormatChecker(BaseChecker): args = node.right if not (isinstance(left, astroid.Const) - and isinstance(left.value, six.string_types)): + and isinstance(left.value, str)): return format_string = left.value try: @@ -281,7 +279,7 @@ class StringFormatChecker(BaseChecker): for k, _ in args.items: if isinstance(k, astroid.Const): key = k.value - if isinstance(key, six.string_types): + if isinstance(key, str): keys.add(key) else: self.add_message('bad-format-string-key', @@ -372,7 +370,7 @@ class StringFormatChecker(BaseChecker): return if not isinstance(strnode, astroid.Const): return - if not isinstance(strnode.value, six.string_types): + if not isinstance(strnode.value, str): return if node.starargs or node.kwargs: @@ -388,7 +386,7 @@ class StringFormatChecker(BaseChecker): return named_fields = set(field[0] for field in fields - if isinstance(field[0], six.string_types)) + if isinstance(field[0], str)) if num_args and manual_pos: self.add_message('format-combined-specification', node=node) diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index bad33c667..28d374640 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -28,6 +28,7 @@ """try to find more bugs in the code using astroid inference capabilities """ +import builtins import collections import fnmatch import heapq @@ -37,8 +38,6 @@ import re import shlex import sys -import six - import astroid import astroid.context import astroid.arguments @@ -65,16 +64,14 @@ from pylint.checkers.utils import ( singledispatch) from pylint.utils import get_global_option -BUILTINS = six.moves.builtins.__name__ +BUILTINS = builtins.__name__ STR_FORMAT = {"%s.str.format" % BUILTINS} -if six.PY2: - STR_FORMAT.add("%s.unicode.format" % BUILTINS) def _unflatten(iterable): for index, elem in enumerate(iterable): if (isinstance(elem, collections.Sequence) and - not isinstance(elem, six.string_types)): + not isinstance(elem, str)): for single_elem in _unflatten(elem): yield single_elem elif elem and not index: @@ -627,7 +624,7 @@ accessed. Python regular expressions are accepted.'} # (surrounded by quote `"` and followed by a comma `,`) # REQUEST,aq_parent,"[a-zA-Z]+_set{1,2}"' => # ('REQUEST', 'aq_parent', '[a-zA-Z]+_set{1,2}') - if isinstance(self.config.generated_members, six.string_types): + if isinstance(self.config.generated_members, str): gen = shlex.shlex(self.config.generated_members) gen.whitespace += ',' gen.wordchars += r'[]-+\.*?()|' @@ -1149,7 +1146,7 @@ accessed. Python regular expressions are accepted.'} # manager and give up, otherwise emit not-context-manager. # See the test file for not_context_manager for a couple # of self explaining tests. - for path in six.moves.filter(None, _unflatten(context.path)): + for path in filter(None, _unflatten(context.path)): scope = path.scope() if not isinstance(scope, astroid.FunctionDef): continue diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py index 9d8a18ba5..dfa6ddddb 100644 --- a/pylint/checkers/utils.py +++ b/pylint/checkers/utils.py @@ -40,7 +40,6 @@ import itertools import re import sys import string -import warnings import six from six.moves import map, builtins # pylint: disable=redefined-builtin diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py index 7b66eaa1d..edaa1547b 100644 --- a/pylint/checkers/variables.py +++ b/pylint/checkers/variables.py @@ -38,8 +38,6 @@ try: except ImportError: from backports.functools_lru_cache import lru_cache -import six - import astroid from astroid import decorators from astroid import modutils @@ -181,7 +179,7 @@ def _fix_dot_imports(not_consumed): """ # TODO: this should be improved in issue astroid #46 names = {} - for name, stmts in six.iteritems(not_consumed): + for name, stmts in not_consumed.items(): if any(isinstance(stmt, astroid.AssignName) and isinstance(stmt.assign_type(), astroid.AugAssign) for stmt in stmts): @@ -499,7 +497,7 @@ class VariablesChecker(BaseChecker): checks globals doesn't overrides builtins """ self._to_consume = [NamesConsumer(node, 'module')] - for name, stmts in six.iteritems(node.locals): + for name, stmts in node.locals.items(): if utils.is_builtin(name) and not utils.is_inside_except(stmts[0]): if self._should_ignore_redefined_builtin(stmts[0]): continue @@ -542,7 +540,7 @@ class VariablesChecker(BaseChecker): continue if (not isinstance(elt_name, astroid.Const) - or not isinstance(elt_name.value, six.string_types)): + or not isinstance(elt_name.value, str)): self.add_message('invalid-all-object', args=elt.as_string(), node=elt) continue @@ -577,7 +575,7 @@ class VariablesChecker(BaseChecker): def _check_globals(self, not_consumed): if self._allow_global_unused_variables: return - for name, nodes in six.iteritems(not_consumed): + for name, nodes in not_consumed.items(): for node in nodes: self.add_message('unused-variable', args=(name,), node=node) @@ -810,7 +808,7 @@ class VariablesChecker(BaseChecker): global_names = _flattened_scope_names(node.nodes_of_class(astroid.Global)) nonlocal_names = _flattened_scope_names(node.nodes_of_class(astroid.Nonlocal)) - for name, stmts in six.iteritems(not_consumed): + for name, stmts in not_consumed.items(): self._check_is_unused(name, node, stmts[0], global_names, nonlocal_names) visit_asyncfunctiondef = visit_functiondef |