Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in custom pylint checkery #476

Open
jennLam opened this issue Aug 6, 2020 · 1 comment
Open

Error in custom pylint checkery #476

jennLam opened this issue Aug 6, 2020 · 1 comment
Labels

Comments

@jennLam
Copy link
Contributor

jennLam commented Aug 6, 2020

Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/campaign_management/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/__init__.py", line 23, in run_pylint
    PylintRun(sys.argv[1:])
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1731, in __init__
    linter.check(args)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1004, in check
    self._do_check(files_or_modules)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1165, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/lint.py", line 1252, in check_astroid_module
    walker.walk(ast_node)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 77, in walk
    self.walk(child)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 77, in walk
    self.walk(child)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 74, in walk
    callback(astroid)
  File "/home/vagrant/.virtualenvs/campaign_management/lib/python3.6/site-packages/baseplate/lint/db_query_string_format_plugin.py", line 53, in visit_assign
    elif not variable_is_query and node.targets[0].name in self.string_sub_queries:
AttributeError: 'AssignAttr' object has no attribute 'name'
@bradengroom
Copy link
Member

I'm able to trigger this with the following code:

class Foo:
    pass

def bar(x):
    pass

Foo.bar = bar

The error is raised by the last line there.

@spladug spladug added the bug label Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants