Add pyright type checking to ci #879
test-python.yml
on: pull_request
Run pre-commit on Python code
10s
Matrix: Build and test Python
Annotations
10 errors and 2 warnings
Build and test Python (3.11):
examples/fastapi/main.py#L2
"FastAPI" is unknown import symbol (reportAttributeAccessIssue)
|
Build and test Python (3.11):
examples/fastapi/main.py#L3
Import "fastapi.responses" could not be resolved (reportMissingImports)
|
Build and test Python (3.11):
obstore/python/obstore/_store/__init__.pyi#L68
Overload 4 for "from_url" will never be used because its parameters overlap overload 1 (reportOverlappingOverload)
|
Build and test Python (3.11):
obstore/python/obstore/auth/planetary_computer.py#L451
Import "dotenv" could not be resolved (reportMissingImports)
|
Build and test Python (3.11):
obstore/python/obstore/fsspec.py#L358
Method "_cat" overrides class "AsyncFileSystem" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, dict[Unknown, None] | None]", override returns type "CoroutineType[Any, Any, bytes | dict[str, bytes]]"
"CoroutineType[Any, Any, bytes | dict[str, bytes]]" is not assignable to "CoroutineType[Any, Any, dict[Unknown, None] | None]"
Type parameter "_ReturnT_co@CoroutineType" is covariant, but "bytes | dict[str, bytes]" is not a subtype of "dict[Unknown, None] | None"
Type "bytes | dict[str, bytes]" is not assignable to type "dict[Unknown, None] | None"
Type "bytes" is not assignable to type "dict[Unknown, None] | None" (reportIncompatibleMethodOverride)
|
Build and test Python (3.11):
obstore/python/obstore/fsspec.py#L376
Type "dict[Unknown, None] | None" is not assignable to return type "bytes | dict[str, bytes]"
Type "dict[Unknown, None] | None" is not assignable to type "bytes | dict[str, bytes]"
Type "dict[Unknown, None]" is not assignable to type "bytes | dict[str, bytes]"
"dict[Unknown, None]" is not assignable to "bytes"
"dict[Unknown, None]" is not assignable to "dict[str, bytes]"
Type parameter "_VT@dict" is invariant, but "None" is not the same as "bytes"
Consider switching from "dict" to "Mapping" which is covariant in the value type (reportReturnType)
|
Build and test Python (3.11):
obstore/python/obstore/fsspec.py#L384
Method "_cat_ranges" overrides class "AsyncFileSystem" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, list[None]]", override returns type "CoroutineType[Any, Any, list[bytes]]"
"CoroutineType[Any, Any, list[bytes]]" is not assignable to "CoroutineType[Any, Any, list[None]]"
Type parameter "_ReturnT_co@CoroutineType" is covariant, but "list[bytes]" is not a subtype of "list[None]"
"list[bytes]" is not assignable to "list[None]"
Type parameter "_T@list" is invariant, but "bytes" is not the same as "None"
Consider switching from "list" to "Sequence" which is covariant (reportIncompatibleMethodOverride)
|
Build and test Python (3.11):
pyo3-object_store/type-hints/__init__.pyi#L68
Overload 4 for "from_url" will never be used because its parameters overlap overload 1 (reportOverlappingOverload)
|
Build and test Python (3.11):
tests/conftest.py#L30
"server_address" is not a known attribute of "None" (reportOptionalMemberAccess)
|
Build and test Python (3.11):
tests/store/test_azure.py#L9
No parameter named "azure_container_name" (reportCallIssue)
|
Run pre-commit on Python code
Could not parse version from /home/runner/work/obstore/obstore/pyproject.toml. Using latest version.
|
Build and test Python (3.11):
examples/progress-bar/main.py#L6
Import "tqdm" could not be resolved from source (reportMissingModuleSource)
|