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/mlw_codec/test/test_mlw_codec.py b/ethosu/mlw_codec/test/test_mlw_codec.py
index 18c828a..3ff26e5 100644
--- a/ethosu/mlw_codec/test/test_mlw_codec.py
+++ b/ethosu/mlw_codec/test/test_mlw_codec.py
@@ -15,6 +15,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Simple example of the usage of mlw_codec.
+from typing import Any
+from typing import List
+
import pytest
from ethosu import mlw_codec
@@ -68,7 +71,7 @@
with pytest.raises(Exception):
mlw_codec.encode(input)
- invalid_decode_test_data = [None, 3, []]
+ invalid_decode_test_data: List[Any] = [None, 3, []]
@pytest.mark.parametrize("input", invalid_decode_test_data)
def test_decode_invalid_input(self, input):