Closed kbsriram closed 8 months ago
The issue concerns the documentation and not the code directly, right?
It's indeed just the type annotation in the documentation, not the implementation.
OK. Then it's not a bug.
I think circuitpython
have a clean-up of the documentation on their milestone.
E.g., https://github.com/adafruit/circuitpython/issues/8715 mentions a similar issue. I wonder, whether we should collect all these. And it would be appreciated, if you could contribute in any way.
Describe the bug Ulab version:
6.5.1-2D-c
Type annotations on some functions don't appear to include scalars.
To Reproduce
For instance, this code:
when used with the current type annotation extracted by circuitpython produces this error with
mypy
.Expected behavior The code accepts both scalars and
_ArrayLike
- so I was expecting type-checking to work.Additional context Would one option be to add a TypeAlias that unions scalars with _ArrayLike, and use that for methods that accept or produce both scalars and arrays?