summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/plugin.py12
-rw-r--r--tests/plugin2.py5
2 files changed, 9 insertions, 8 deletions
diff --git a/coverage/plugin.py b/coverage/plugin.py
index 29e45616..60f3ea5b 100644
--- a/coverage/plugin.py
+++ b/coverage/plugin.py
@@ -36,7 +36,7 @@ class CoveragePlugin(object):
"""
self.options = options
- def file_tracer(self, filename):
+ def file_tracer(self, filename): # pylint: disable=unused-argument
"""Return a FileTracer object for a file.
Every source file is offered to the plugin to give it a chance to take
@@ -60,7 +60,7 @@ class CoveragePlugin(object):
"""
return None
- def file_reporter(self, filename):
+ def file_reporter(self, filename): # pylint: disable=unused-argument
"""Return the FileReporter class to use for filename.
This will only be invoked if `filename` returns non-None from
@@ -119,7 +119,7 @@ class FileTracer(object):
"""
return False
- def dynamic_source_filename(self, filename, frame):
+ def dynamic_source_filename(self, filename, frame): # pylint: disable=unused-argument
"""Returns a dynamically computed source filename.
Some plugins need to compute the source filename dynamically for each
@@ -163,12 +163,14 @@ class FileTracer(object):
class FileReporter(object):
"""Support needed for files during the reporting phase."""
def __init__(self, filename):
+ # TODO: document that this init happens.
self.filename = filename
def __repr__(self):
return (
- "<{this.__class__.__name__}"
- " filename={this.filename!r}>".format(this=self)
+ # pylint: disable=redundant-keyword-arg
+ "<{self.__class__.__name__}"
+ " filename={self.filename!r}>".format(self=self)
)
# Annoying comparison operators. Py3k wants __lt__ etc, and Py2k needs all
diff --git a/tests/plugin2.py b/tests/plugin2.py
index 7d2ac7cb..9d47d260 100644
--- a/tests/plugin2.py
+++ b/tests/plugin2.py
@@ -2,6 +2,8 @@
import coverage
+# pylint: disable=missing-docstring
+
class Plugin(coverage.CoveragePlugin):
def file_tracer(self, filename):
@@ -29,9 +31,6 @@ class RenderFileTracer(coverage.plugin.FileTracer):
class FileReporter(coverage.plugin.FileReporter):
- def __init__(self, filename):
- self.filename = filename
-
def statements(self):
# Goofy test arrangement: claim that the file has as many lines as the
# number in its name.