-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Python documentation says:
https://docs.python.org/3/library/ctypes.html#ctypes.c_bool
class ctypes.c_bool
Represent the C bool datatype (more accurately, _Bool from C99). Its value can be True or False,
and the constructor accepts any object that has a truth value.
Following code is not accepted by mypy 1.18.2:
import ctypes
flag = ctypes.c_bool(0)
Output is:
/tmp/test.py:3: error: Argument 1 to "c_bool" has incompatible type "int"; expected "bool" [arg-type]
Since this is valid Python code, I feel that mypy should accept it.
Metadata
Metadata
Assignees
Labels
No labels