MLBEDSW-3367 Add mypy to pre-commit

Add mypy to pre-commit and clean up all reported errors.

Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com>
Change-Id: If7dc869f5fecdb0e2db40f14e7d9db21aa33df71
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py
index 8a2517d..671843f 100644
--- a/ethosu/vela/nn_graph.py
+++ b/ethosu/vela/nn_graph.py
@@ -130,6 +130,7 @@
         self.predecessors = []
         self.successors = []
         self.sram_used = 0
+        self.time = 0
 
     def __str__(self):
         return "<nng.CascadedPass strategy=%s x %s '%s',  passes=%s, block_configs=%s>" % (
@@ -537,6 +538,9 @@
         self.total_npu_weights = 0
         self.total_npu_encoded_weights = 0
         self.weight_cache = None  # See CompressedWeightCache
+        self.bandwidths = 0
+        self.macs = 0
+        self.cycles = 0
 
     def get_root_subgraph(self):
         return self.subgraphs[0]