Closed phofl closed 6 days ago
mypy needs a fix. Can you expand that logic out to an explicit for-loop please. The comprehension is quite hard to read now.
I added type ignores, mypy should have raised earlier as well since the else clause was incorrect, but type inference was probably a bit smarter here. I really don't know enough about mypy to properly troubleshoot this
The type hints are generally incorrect in open_mfdataset (I think) since the fsspec version doesn't produce a string or os.PathLike
The type hints are generally incorrect in open_mfdataset (I think) since the fsspec version doesn't produce a string or os.PathLike
Do you know what this returns? Is it some buffered reader or similar?
No, no clue. Nothing is typed over there and there are so many subclasses out there...
The class AbstractFileSystem implements the open but again not really clear
We typed this as
ReadBuffer[bytes]
in pandas, but this is very generic. The implementation lives here: https://github.com/pandas-dev/pandas/blob/ee3c18f51b393893ed6e31214c7be2f9427ce0c9/pandas/_typing.py#L270
OK merging since this fixes a regression. We can followup with typing improvements.
cc @dcherian