(project) C:\Git\project>python bug.py
Traceback (most recent call last):
File "C:\Git\project\bug.py", line 11, in <module>
function_of_dtype(np.uint32)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "C:\Git\project\bug.py", line 9, in function_of_dtype
def function_of_dtype(dtype: type[Integer]) -> None: ...
File "C:\Git\project\.venv\Lib\site-packages\typeguard\_functions.py", line 137, in check_argument_types
check_type_internal(value, annotation, memo)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Git\project\.venv\Lib\site-packages\typeguard\_checkers.py", line 951, in check_type_internal
checker(value, origin_type, args, memo)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Git\project\.venv\Lib\site-packages\typeguard\_checkers.py", line 503, in check_class
elif not issubclass(value, expected_class): # type: ignore[arg-type]
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() arg 2 must be a class, a tuple of classes, or a union
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Typeguard version
4.4.2
Python version
3.13.2
What happened?
I'd expect
python bug.pyto pass. Instead:How can we reproduce the bug?
bug.py: