summaryrefslogtreecommitdiff
path: root/src/flake8
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-07-14 08:13:10 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2016-07-14 08:13:10 -0500
commitec678de42781309bc4fec010b81f5695e0bf6948 (patch)
tree351a0c29fb84e6611012f482a7aa7a42b52278bc /src/flake8
parent911c69f0fd36db3b2e1fb0131d443208d21991b9 (diff)
downloadflake8-ec678de42781309bc4fec010b81f5695e0bf6948.tar.gz
Document Legacy API
Diffstat (limited to 'src/flake8')
-rw-r--r--src/flake8/api/legacy.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py
index a6c3b6a..84e0b03 100644
--- a/src/flake8/api/legacy.py
+++ b/src/flake8/api/legacy.py
@@ -156,6 +156,10 @@ class Report(object):
There are important changes in how this object behaves compared to
the object provided in Flake8 2.x.
+ .. warning::
+
+ This should not be instantiated by users.
+
.. versionchanged:: 3.0.0
"""
@@ -174,7 +178,15 @@ class Report(object):
return self._application.result_count
def get_statistics(self, violation):
- """Get the number of occurences of a violation."""
+ """Get the list of occurences of a violation.
+
+ :returns:
+ List of occurrences of a violation formatted as:
+ {Count} {Error Code} {Message}, e.g.,
+ ``8 E531 Some error message about the error``
+ :rtype:
+ list
+ """
return [
'{} {} {}'.format(s.count, s.error_code, s.message)
for s in self._stats.statistics_for(violation)