diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-02 23:03:47 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-02 23:03:47 -0500 |
commit | 8ac9625989712dce9a3a7bcde255d8043c48ac0c (patch) | |
tree | bd844cd7b4dc5ea04e84daad5a7244e03d40493f /coverage/control.py | |
parent | f59f32f8a0d058f521787defa3ee398cfb3a4d9b (diff) | |
download | python-coveragepy-git-8ac9625989712dce9a3a7bcde255d8043c48ac0c.tar.gz |
Clean up some pylint complaints
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/coverage/control.py b/coverage/control.py index b499d456..ffed8e68 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] |