Repository: Memrise/mypy-json-report (language: python)

Issue:
Add totals report
This adds:
- ~New isort and flake8 configs.~
- ~Very basic arg parsing. (More on this below.)~
- ~A `help` command.~
- A `totals` command. This produces a basic summary of a previously created JSON report file.

This lacks (todo):
- [ ] Docstrings
- [ ] A command to print the summary of a report file over time.
- [x] isort in pre-commit. (see https://github.com/Memrise/mypy-json-report/pull/24)

**Question:** Is it time to break this into modules?
**Question:** Would it be better to use Typer (or similar) instead?


Discussion / hints:

Fix patch:
diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000..88d64c7
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,13 @@
+# This file is not used by anything in the repo.
+# It is here as a convenience to developers who use flake8 locally.
+
+[flake8]
+ignore =
+    # whitespace before ':' - conflicts with black
+    E203
+
+    # line too long - black takes care of this for us
+    E501
+
+    # line break before binary operator - this is what black does
+    W503
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1426a36..9f82370 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -13,7 +13,7 @@ repos:
       - id: black
 
   - repo: https://github.com/PyCQA/isort
-    rev: 5.10.1
+    rev: 5.12.0
     hooks:
       - id: isort
 
diff --git a/mypy_json_report.py b/mypy_json_report.py
index ed7ed41..1509526 100644
--- a/mypy_json_report.py
+++ b/mypy_json_report.py
@@ -16,8 +16,7 @@
 import sys
 from collections import Counter, defaultdict
 from dataclasses import dataclass
-from typing import Counter as CounterType
-from typing import Dict, Iterator
+from typing import Counter as CounterType, Dict, Iterator
 
 
 def main() -> None:
diff --git a/pyproject.toml b/pyproject.toml
index 082f37c..685ab09 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -38,3 +38,9 @@ mypy-json-report = "mypy_json_report:main"
 [build-system]
 requires = ["poetry-core>=1.0.0"]
 build-backend = "poetry.core.masonry.api"
+
+[tool.isort]
+combine_as_imports = true
+known_first_party = ["mypy_json_report"]
+lines_after_imports = 2
+profile = "black"


Test patch:
diff --git a/tests/test_mypy_json_report.py b/tests/test_mypy_json_report.py
index d530684..99f3dbf 100644
--- a/tests/test_mypy_json_report.py
+++ b/tests/test_mypy_json_report.py
@@ -3,6 +3,7 @@
 
 from mypy_json_report import produce_errors_report
 
+
 EXAMPLE_MYPY_STDOUT = """\
 mypy_json_report.py:8: error: Function is missing a return type annotation
 mypy_json_report.py:8: note: Use "-> None" if function does not return a value