From 71b3ba15af48f2c9332d4f257a35157d8e9de953 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 16 Dec 2021 21:39:20 -0600 Subject: [PATCH] Change how we alias the float and bool types for mypy mypy 0.920 started giving an error stating ``` ulab/numpy/__init__.pyi:51: error: Cannot assign multiple types to name "_float" without an explicit "Type[...]" annotation ulab/numpy/__init__.pyi:54: error: Cannot assign multiple types to name "_bool" without an explicit "Type[...]" annotation ``` this quiets the error, and is also compatible with the previous version (0.910). --- code/numpy/numerical.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/numpy/numerical.c b/code/numpy/numerical.c index 9dae02f5..04dee2b6 100644 --- a/code/numpy/numerical.c +++ b/code/numpy/numerical.c @@ -48,11 +48,8 @@ enum NUMERICAL_FUNCTION_TYPE { //| _DType = int //| """`ulab.numpy.int8`, `ulab.numpy.uint8`, `ulab.numpy.int16`, `ulab.numpy.uint16`, `ulab.numpy.float` or `ulab.numpy.bool`""" //| -//| _float = float -//| """Type alias of the bulitin float""" -//| -//| _bool = bool -//| """Type alias of the bulitin bool""" +//| from builtins import float as _float +//| from builtins import bool as _bool //| //| int8: _DType //| """Type code for signed integers in the range -128 .. 127 inclusive, like the 'b' typecode of `array.array`"""