| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| if not proposed_type_ranges: | ||
| # This is the case for `if isinstance(x, ())` which always returns False. | ||
| return UninhabitedType(), default |
There was a problem hiding this comment.
This test is actually redundant, it works just as well if we comment it out since make_simplified_union([]) returns UninhabitedType().
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: spark (https://github.com/apache/spark)
- python/pyspark/ml/connect/readwrite.py:100: error: Redundant cast to "JavaEstimator[Any]" [redundant-cast]
- python/pyspark/ml/connect/readwrite.py:103: error: Redundant cast to "JavaEvaluator" [redundant-cast]
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/tasks.py:559: error: Incompatible types in assignment (expression has type "Union[int, float, list[float], None]", variable has type "list[float]") [assignment]
+ src/prefect/tasks.py:559: error: Incompatible types in assignment (expression has type "Union[float, int, list[float], None]", variable has type "list[float]") [assignment]
starlette (https://github.com/encode/starlette)
+ starlette/middleware/errors.py:176: error: Incompatible types in assignment (expression has type "Any | None", variable has type "Response") [assignment]
+ starlette/middleware/errors.py:176: error: Argument 1 has incompatible type "Request"; expected "WebSocket" [arg-type]
+ starlette/_exception_handler.py:59: error: Argument 1 has incompatible type "Request | WebSocket"; expected "WebSocket" [arg-type]
- starlette/_exception_handler.py:61: error: Argument 1 to "run_in_threadpool" has incompatible type "Callable[[Request, Exception], Response | Awaitable[Response]] | Callable[[WebSocket, Exception], Awaitable[None]]"; expected "Callable[[Request | WebSocket, Exception], Any]" [arg-type]
+ starlette/_exception_handler.py:61: error: Argument 1 to "run_in_threadpool" has incompatible type "Callable[[Request, Exception], Response | Awaitable[Response]] | Callable[[WebSocket, Exception], Awaitable[None]]"; expected "Callable[[Request | WebSocket, Exception], Any | None]" [arg-type]
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/wrapper/_implementations.py:933: error: Incompatible return value type (got "type[object]", expected "DataClass_ | type[DataClass_] | ListConfig | DictConfig") [return-value]
urllib3 (https://github.com/urllib3/urllib3)
+ src/urllib3/_collections.py:359: error: Redundant cast to "Iterable[tuple[str, str]]" [redundant-cast]
websockets (https://github.com/aaugustin/websockets)
+ src/websockets/legacy/protocol.py:641: error: Redundant cast to "Iterable[str | bytes | bytearray | memoryview[int]]" [redundant-cast]
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #19468
Based on earlier PR #19473
Modified tests
New Tests