pylint/checkers/stdlib.py
def visit_call(self, node):
        """Visit a Call node."""
        try:
            for inferred in node.func.infer():
                if inferred is astroid.Uninferable:
                    continue
                elif inferred.root().name == OPEN_MODULE:
                    if getattr(node.func, "name", None) in OPEN_FILES:
                        self._check_open_mode(node)
                elif inferred.root().name == UNITTEST_CASE:
                    self._check_redundant_assert(node, inferred)
                elif isinstance(inferred, astroid.ClassDef):
                    if inferred.qname() == THREADING_THREAD:
                        self._check_bad_thread_instantiation(node)
                    elif inferred.qname() == SUBPROCESS_POPEN:
                        self._check_for_preexec_fn_in_popen(node)
                elif isinstance(inferred, astroid.FunctionDef):
                    name = inferred.qname()
                    if name == COPY_COPY:
                        self._check_shallow_copy_environ(node)
                    elif name in ENV_GETTERS:
                        self._check_env_function(node, inferred)
                    elif name == SUBPROCESS_RUN and PY35:
                        self._check_for_check_kw_in_run(node)
                self._check_deprecated_method(node, inferred)
        except astroid.InferenceError:
            return
def visit_call(self, node):
        try:
            for inferred in node.func.infer():
                if inferred is astroid.Uninferable:
                    continue
                elif inferred.root().name == OPEN_MODULE:
                    if getattr(node.func, "name", None) in OPEN_FILES:
                        self._check_open_mode(node)
                elif inferred.root().name == UNITTEST_CASE:
                    self._check_redundant_assert(node, inferred)
                elif isinstance(inferred, astroid.ClassDef):
                    if inferred.qname() == THREADING_THREAD:
                        self._check_bad_thread_instantiation(node)
                    elif inferred.qname() == SUBPROCESS_POPEN:
                        self._check_for_preexec_fn_in_popen(node)
                elif isinstance(inferred, astroid.FunctionDef):
                    name = inferred.qname()
                    if name == COPY_COPY:
                        self._check_shallow_copy_environ(node)
                    elif name in ENV_GETTERS:
                        self._check_env_function(node, inferred)
                    elif name == SUBPROCESS_RUN and PY35:
                        self._check_for_check_kw_in_run(node)
                self._check_deprecated_method(node, inferred)
        except astroid.InferenceError:
            return
def visit_call ( self , node ) : try : for inferred in node . func . infer ( ) : if inferred is astroid . Uninferable : continue elif inferred . root ( ) . name == OPEN_MODULE : if getattr ( node . func , "name" , None ) in OPEN_FILES : self . _check_open_mode ( node ) elif inferred . root ( ) . name == UNITTEST_CASE : self . _check_redundant_assert ( node , inferred ) elif isinstance ( inferred , astroid . ClassDef ) : if inferred . qname ( ) == THREADING_THREAD : self . _check_bad_thread_instantiation ( node ) elif inferred . qname ( ) == SUBPROCESS_POPEN : self . _check_for_preexec_fn_in_popen ( node ) elif isinstance ( inferred , astroid . FunctionDef ) : name = inferred . qname ( ) if name == COPY_COPY : self . _check_shallow_copy_environ ( node ) elif name in ENV_GETTERS : self . _check_env_function ( node , inferred ) elif name == SUBPROCESS_RUN and PY35 : self . _check_for_check_kw_in_run ( node ) self . _check_deprecated_method ( node , inferred ) except astroid . InferenceError : return
Visit a Call node.
Visit a Call node .