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

AttributeError: 'BoolOp' object has no attribute 'targets' #109

Closed
moylop260 opened this issue Jan 30, 2017 · 1 comment
Closed

AttributeError: 'BoolOp' object has no attribute 'targets' #109

moylop260 opened this issue Jan 30, 2017 · 1 comment

Comments

@moylop260
Copy link
Collaborator

moylop260 commented Jan 30, 2017

Steps:

  1. Download the code from [9.0][ADD] l10n_es_aeat_mod390 l10n-spain#434
  2. Run the pylint checks

Saw:
https://travis-ci.org/OCA/l10n-spain/jobs/196441078#L569

Traceback (most recent call last):
  File "/home/travis/maintainer-quality-tools/travis/test_pylint", line 201, in <module>
    ] + modules_changed_cmd + extra_params_cmd, standalone_mode=False)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/travis/maintainer-quality-tools/travis/run_pylint.py", line 105, in main
    extra_params=extra_params)
  File "/home/travis/maintainer-quality-tools/travis/run_pylint.py", line 75, in run_pylint
    pylint_res = pylint.lint.Run(cmd, exit=False)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/lint.py", line 1310, in __init__
    linter.check(args)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/lint.py", line 732, in check
    self._do_check(files_or_modules)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/lint.py", line 863, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/lint.py", line 944, in check_astroid_module
    walker.walk(ast_node)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint/utils.py", line 941, in walk
    cb(astroid)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pylint_odoo/checkers/no_modules.py", line 384, in visit_call
    field_name = (argument.parent.parent.targets[0].name
AttributeError: 'BoolOp' object has no attribute 'targets'

Thanks @pedrobaeza for reporting

@moylop260
Copy link
Collaborator Author

@JesusZapata
Could you help us to fix it?

JesusZapata pushed a commit to vauxoo-dev/pylint-odoo that referenced this issue Jan 30, 2017
JesusZapata pushed a commit to vauxoo-dev/pylint-odoo that referenced this issue Jan 30, 2017
JesusZapata pushed a commit to vauxoo-dev/pylint-odoo that referenced this issue Jan 31, 2017
[FIX] pylint-odoo: Best use of if clause

[FIX] pylint-odoo: Validate the body contain only one line

[FIX] pylint-odoo: Avoid use \ better use (

[REF] incoherent-interpreter-exec-perm: Better message (Vauxoo#106)

[ADD] xml-attribute-translatable: Check XML attribute without translation parameter (Vauxoo#105)

Close OCA#104

[REF] javascript-lint: Use eslint instead of jshint (Vauxoo#97)

[ADD] renamed-field-parameter: Detect deprecated field values (digits_compute, select) (Vauxoo#99)

[FIX] Pep8 check and bad index for ODOO_MSGS

[ADD] attribute-string-redundant: Check if "string" parameter is equal to variable name (Vauxoo#100)

[FIX] attribute-string-redundant: Add "isinstance" validation for nodes

Fix OCA#109

[IMP] Exclude exception when use as assignation

[FIX] Pep8 check local variable 'exception'

[FIX] Pep8 blank line at end of file

[FIX] Adding more cases of test

[REF] Supporting more cases of exception

[FIX] Modify file main.py for adding new case of except-pass

[IMP] Adding another tests case

[FIX] Adding another test case and better validation

[FIX] Delete unnecessary condition of if

[FIX] Fix comment line
JesusZapata pushed a commit to vauxoo-dev/pylint-odoo that referenced this issue Jan 31, 2017
[FIX] pylint-odoo: Best use of if clause

[FIX] pylint-odoo: Validate the body contain only one line

[FIX] pylint-odoo: Avoid use \ better use (

[REF] incoherent-interpreter-exec-perm: Better message (Vauxoo#106)

[ADD] xml-attribute-translatable: Check XML attribute without translation parameter (Vauxoo#105)

Close OCA#104

[REF] javascript-lint: Use eslint instead of jshint (Vauxoo#97)

[ADD] renamed-field-parameter: Detect deprecated field values (digits_compute, select) (Vauxoo#99)

[FIX] Pep8 check and bad index for ODOO_MSGS

[ADD] attribute-string-redundant: Check if "string" parameter is equal to variable name (Vauxoo#100)

[FIX] attribute-string-redundant: Add "isinstance" validation for nodes

Fix OCA#109

[IMP] Exclude exception when use as assignation

[FIX] Pep8 check local variable 'exception'

[FIX] Pep8 blank line at end of file

[FIX] Adding more cases of test

[REF] Supporting more cases of exception

[FIX] Modify file main.py for adding new case of except-pass

[IMP] Adding another tests case

[FIX] Adding another test case and better validation

[FIX] Delete unnecessary condition of if

[FIX] Fix comment line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant