← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1503212] [NEW] pylint fails when signature changed by decorator

 

Public bug reported:

Pylint is not able to recognize mocked method's argument, when there are
normal arguments already present.

reproduction steps
--------------------------
1) Change whatever in neutron.tests.unit.agent.l3.test_agent.py
2) run pylint

visible consequence
---------------------------
Running pylint...
You can speed this up by running it on 'HEAD~[0-9]' (e.g. HEAD~1, this change only)...
************* Module neutron.tests.unit.agent.l3.test_agent
E:1033, 8: No value for argument 'IPDevice' in method call (no-value-for-parameter)
ERROR: InvocationError: '/usr/bin/sh ./tools/coding-checks.sh --pylint HEAD~1'
ERROR:   pep8: commands failed

It will cause Jenkins gate fail, thus preventing merge

** Affects: neutron
     Importance: Undecided
     Assignee: Bogdan Tabor (bogdan-tabor)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Bogdan Tabor (bogdan-tabor)

** Description changed:

  Pylint is not able to recognize mocked method's argument, when there are
- normal agruments already present.
+ normal arguments already present.
  
  reproduction steps
  --------------------------
  1) Change whatever in neutron.tests.unit.agent.l3.test_agent.py
  2) run pylint
  
  visible consequence
  ---------------------------
  Running pylint...
  You can speed this up by running it on 'HEAD~[0-9]' (e.g. HEAD~1, this change only)...
  ************* Module neutron.tests.unit.agent.l3.test_agent
  E:1033, 8: No value for argument 'IPDevice' in method call (no-value-for-parameter)
  ERROR: InvocationError: '/usr/bin/sh ./tools/coding-checks.sh --pylint HEAD~1'
  ERROR:   pep8: commands failed
  
  It will case Jenkins gate fail, thus preventing merge

** Description changed:

  Pylint is not able to recognize mocked method's argument, when there are
  normal arguments already present.
  
  reproduction steps
  --------------------------
  1) Change whatever in neutron.tests.unit.agent.l3.test_agent.py
  2) run pylint
  
  visible consequence
  ---------------------------
  Running pylint...
  You can speed this up by running it on 'HEAD~[0-9]' (e.g. HEAD~1, this change only)...
  ************* Module neutron.tests.unit.agent.l3.test_agent
  E:1033, 8: No value for argument 'IPDevice' in method call (no-value-for-parameter)
  ERROR: InvocationError: '/usr/bin/sh ./tools/coding-checks.sh --pylint HEAD~1'
  ERROR:   pep8: commands failed
  
- It will case Jenkins gate fail, thus preventing merge
+ It will cause Jenkins gate fail, thus preventing merge

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1503212

Title:
  pylint fails when signature changed by decorator

Status in neutron:
  New

Bug description:
  Pylint is not able to recognize mocked method's argument, when there
  are normal arguments already present.

  reproduction steps
  --------------------------
  1) Change whatever in neutron.tests.unit.agent.l3.test_agent.py
  2) run pylint

  visible consequence
  ---------------------------
  Running pylint...
  You can speed this up by running it on 'HEAD~[0-9]' (e.g. HEAD~1, this change only)...
  ************* Module neutron.tests.unit.agent.l3.test_agent
  E:1033, 8: No value for argument 'IPDevice' in method call (no-value-for-parameter)
  ERROR: InvocationError: '/usr/bin/sh ./tools/coding-checks.sh --pylint HEAD~1'
  ERROR:   pep8: commands failed

  It will cause Jenkins gate fail, thus preventing merge

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1503212/+subscriptions


Follow ups