summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-02 23:03:47 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-02 23:03:47 -0500
commit259ebf2511f3b0f06ef30c05f6f265ea0a159128 (patch)
tree11029f8e82ceb2477d1c2e9b6a09fd769dc020e1 /coverage/control.py
parent71648ff153357e94be4c932d36a11e0b8bc5c5f5 (diff)
downloadpython-coveragepy-259ebf2511f3b0f06ef30c05f6f265ea0a159128.tar.gz
Clean up some pylint complaints
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/coverage/control.py b/coverage/control.py
index b499d45..ffed8e6 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -442,6 +442,7 @@ class Coverage(object):
disp.canonical_filename = canonical
# Try the plugins, see if they have an opinion about the file.
+ plugin = None
for plugin in self.file_tracers:
file_tracer = plugin.file_tracer(canonical)
if file_tracer is not None:
@@ -451,13 +452,15 @@ class Coverage(object):
if file_tracer.has_dynamic_source_filename():
disp.has_dynamic_filename = True
else:
- disp.source_filename = self.file_locator.canonical_filename(file_tracer.source_filename())
+ disp.source_filename = \
+ self.file_locator.canonical_filename(
+ file_tracer.source_filename()
+ )
break
else:
# No plugin wanted it: it's Python.
disp.trace = True
disp.source_filename = canonical
- file_tracer = None
if not disp.has_dynamic_filename:
if not disp.source_filename:
@@ -1124,5 +1127,6 @@ class Plugins(object):
def __iter__(self):
return iter(self.order)
- def get(self, module):
- return self.names[module]
+ def get(self, plugin_name):
+ """Return a plugin by name."""
+ return self.names[plugin_name]