Error in custom pylint checkery
Opened this issue · 1 comments
jennLam commented
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 commented
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.