summaryrefslogtreecommitdiff
path: root/src/flake8/statistics.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/flake8/statistics.py')
-rw-r--r--src/flake8/statistics.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/flake8/statistics.py b/src/flake8/statistics.py
index 2512089..d35d4bf 100644
--- a/src/flake8/statistics.py
+++ b/src/flake8/statistics.py
@@ -9,6 +9,16 @@ class Statistics(object):
"""Initialize the underlying dictionary for our statistics."""
self._store = {}
+ def error_codes(self):
+ """Return all unique error codes stored.
+
+ :returns:
+ Sorted list of error codes.
+ :rtype:
+ list(str)
+ """
+ return list(sorted(set(key.code for key in self._store.keys())))
+
def record(self, error):
"""Add the fact that the error was seen in the file.