Open
Description
cloudpathlib: 0.19.0
Python: 3.12
mypy: 1.11.2
When doing the following:
path = cloudpathlib.S3Path("s3://somebucket") / some_string / some_path / something_else
Mypy throws the following error:
error: Unsupported operand types for / ("S3Path" and "AnyPath") [operator]
error: Unsupported operand types for / ("S3Path" and "S3Path") [operator]
note: Right operand is of type "Path | CloudPath | AnyPath | S3Path"
error: Unsupported left operand type for / ("None") [operator]
note: Left operand is of type "Path | S3Path | None"
In my opinion this is valid code. The result obviously ought to be an S3Path object merged from the original S3Path object, a string, another path-like object (could be a relative PosixPath even) and something totally different, as long as it can be interpreted as a path component.
Metadata
Metadata
Assignees
Labels
No labels