|
Ran
|
Files
55
|
Run time
3s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/PyCQA/pylint/commit/<a class=hub.com/PyCQA/pylint/commit/95c14357327c66ec887d3bbf1c92905d4adbb3c0">95c143573<a href="https://github.com/PyCQA/pylint/commit/95c14357327c66ec887d3bbf1c92905d4adbb3c0">">Do not warn for locally disabled cyclic import checks Since commit </a><a class="double-link" href="https://github.com/PyCQA/pylint/commit/<a class="double-link" href="https://github.com/PyCQA/pylint/commit/7df8caaa3e1995018417ac2fd87afd89be6945ba">7df8caaa3</a>">7df8caaa3</a><a href="https://github.com/PyCQA/pylint/commit/95c14357327c66ec887d3bbf1c92905d4adbb3c0">, the "# pylint: disable=cyclic-import" statment is respected. One case which was not covered is the disabling of the check for an import from inside a method/function. Example: File test1.py > class B(object): > pass > > def function(): > from . import test2 # pylint: disable=cyclic-import > pass File test2.py > from . import test1 > > class A(object): > pass Pylint wrongly reports: Cyclic import (testfolder.test1 -> testfolder.test2) (cyclic-import) This is due to the fact that the self._excluded_edges dict was not filled with the imports that need to be excluded. Passing the line number to the self.linter.is_message_enabled() check allows to not prematurely return due to the line number being None. Also fixed (with the help of rogalski) the test setup which got confused by the second 'func' in the test function name
9378 of 10474 relevant lines covered (89.54%)
0.9 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|