Skip to content
This repository was archived by the owner on Oct 30, 2026. It is now read-only.
This repository was archived by the owner on Oct 30, 2026. It is now read-only.

Exception with pylint 1.7.1 #68

Closed
Closed

Description

@JasonMWhite

Apparently one of our rules (not sure which) doesn't work well with syntax like:

from builtins import *

We have disabled most rule for this line, but the rule checker is actually throwing an exception.

Activity

  1. JasonMWhite commented on May 23, 2017

    @JasonMWhite
    Author

    Correction: the error occurs here:
    https://github.com/Shopify/shopify_python/blob/master/shopify_python/google_styleguide.py#L187

    Stacktrace:

    Traceback (most recent call last):
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/bin/pylint", line 11, in <module>
        sys.exit(run_pylint())
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/pylint/__init__.py", line 13, in run_pylint
        Run(sys.argv[1:])
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/pylint/lint.py", line 1300, in __init__
        linter.check(args)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/pylint/lint.py", line 726, in check
        self._do_check(files_or_modules)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/pylint/lint.py", line 855, in _do_check
        self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/pylint/lint.py", line 934, in check_astroid_module
        walker.walk(ast_node)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/pylint/utils.py", line 973, in walk
        self.walk(child)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/pylint/utils.py", line 970, in walk
        cb(astroid)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/shopify_python/google_styleguide.py", line 128, in visit_importfrom
        self.__import_modules_only(node)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/shopify_python/google_styleguide.py", line 158, in __import_modules_only
        parent.import_module(child_module)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/astroid/scoped_nodes.py", line 415, in import_module
        return MANAGER.ast_from_module_name(modname)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/astroid/manager.py", line 161, in ast_from_module_name
        raise e
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/astroid/manager.py", line 114, in ast_from_module_name
        found_spec = self.file_from_module_name(modname, context_file)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/astroid/manager.py", line 204, in file_from_module_name
        value, traceback)
      File "/Users/jasonwhite/.pyenv/virtualenvs/data-bang/3.5.2/lib/python3.5/site-packages/six.py", line 685, in reraise
        raise value.with_traceback(tb)
    astroid.exceptions.AstroidImportError: Failed to import module builtins.* with error:
    No module named builtins.*.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions