added strict mypy checks

This commit is contained in:
Brian Bjarke Jensen
2025-08-28 20:56:28 +02:00
parent cb036da997
commit 5e610dd469
6 changed files with 46 additions and 23 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
"""Unittests for the readable function."""
import pytest
from typing import Any
from python_utils import readable_unit
@@ -31,7 +32,11 @@ TEST_CASES = [
@pytest.mark.parametrize("value, unit, expected", TEST_CASES)
def test_readable_unit(value, unit, expected):
def test_readable_unit(
value: Any, # Allow invalid types for testing
unit: Any, # Allow invalid types for testing
expected: Any, # Allow invalid types for testing
) -> None:
"""Test readable_unit function with valid inputs."""
if isinstance(expected, type) and issubclass(expected, Exception):
with pytest.raises(expected):