GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — Ignore promotions when simplifying unions by ilevkivskyi · Pull Request #13781 · python/mypy Conversation
|
|
Diff from mypy_primer, showing the effect of this PR on open source code: operator (https://github.com/canonical/operator) - ops/model.py:2198: error: Incompatible types in assignment (expression has type "Iterable[str]", variable has type "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] + ops/model.py:2198: error: Incompatible types in assignment (expression has type "Iterable[str]", variable has type "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] + ops/model.py:2199: error: Item "int" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2199: error: Item "float" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2199: error: Item "float" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2199: error: Item "Dict[str, JsonObject]" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2199: error: Item "Dict[str, JsonObject]" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2199: error: Item "List[JsonObject]" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2199: error: Item "List[JsonObject]" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2199: error: Item "Tuple[JsonObject, ...]" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2199: error: Item "Tuple[JsonObject, ...]" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2199: error: Item "int" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] - ops/model.py:2199: error: Item "float" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] + ops/model.py:2199: error: Item "float" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] - ops/model.py:2199: error: Item "None" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] + ops/model.py:2199: error: Item "None" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] - ops/model.py:2354: error: Incompatible types in assignment (expression has type "Dict[str, Dict[str, str]]", variable has type "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] + ops/model.py:2354: error: Incompatible types in assignment (expression has type "Dict[str, Dict[str, str]]", variable has type "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] - ops/model.py:2355: error: Value of type "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" is not indexable [index] + ops/model.py:2355: error: Value of type "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" is not indexable [index] - ops/model.py:2355: error: Invalid index type "str" for "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]"; expected type "Union[SupportsIndex, slice]" [index] + ops/model.py:2355: error: Invalid index type "str" for "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]"; expected type "Union[SupportsIndex, slice]" [index] - ops/model.py:2356: error: Value of type "Union[str, Any, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" is not indexable [index] + ops/model.py:2356: error: Value of type "Union[str, Any, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" is not indexable [index] - ops/model.py:2356: error: Incompatible types (expression has type "Union[str, Any, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]", TypedDict item "status" has type "str") [typeddict-item] + ops/model.py:2356: error: Incompatible types (expression has type "Union[str, Any, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]", TypedDict item "status" has type "str") [typeddict-item] - ops/model.py:2356: error: Invalid index type "str" for "Union[str, Any, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]"; expected type "Union[SupportsIndex, slice]" [index] + ops/model.py:2356: error: Invalid index type "str" for "Union[str, Any, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]"; expected type "Union[SupportsIndex, slice]" [index] - ops/model.py:2357: error: Value of type "Union[str, Any, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" is not indexable [index] + ops/model.py:2357: error: Value of type "Union[str, Any, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" is not indexable [index] - ops/model.py:2357: error: Incompatible types (expression has type "Union[str, Any, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]", TypedDict item "message" has type "str") [typeddict-item] + ops/model.py:2357: error: Incompatible types (expression has type "Union[str, Any, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]", TypedDict item "message" has type "str") [typeddict-item] - ops/model.py:2357: error: Invalid index type "str" for "Union[str, Any, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]"; expected type "Union[SupportsIndex, slice]" [index] + ops/model.py:2357: error: Invalid index type "str" for "Union[str, Any, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]"; expected type "Union[SupportsIndex, slice]" [index] - ops/model.py:2376: error: Incompatible types in assignment (expression has type "List[str]", variable has type "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] + ops/model.py:2376: error: Incompatible types in assignment (expression has type "List[str]", variable has type "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] + ops/model.py:2377: error: Item "int" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2377: error: Item "float" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2377: error: Item "float" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2377: error: Item "Dict[str, JsonObject]" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2377: error: Item "Dict[str, JsonObject]" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2377: error: Item "List[JsonObject]" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2377: error: Item "List[JsonObject]" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] - ops/model.py:2377: error: Item "Tuple[JsonObject, ...]" of "Union[Any, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2377: error: Item "Tuple[JsonObject, ...]" of "Union[Any, int, float, str, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...]]" has no attribute "split" [union-attr] + ops/model.py:2377: error: Item "int" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] - ops/model.py:2377: error: Item "float" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] + ops/model.py:2377: error: Item "float" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] - ops/model.py:2377: error: Item "None" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] + ops/model.py:2377: error: Item "None" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "__iter__" (not iterable) [union-attr] - ops/model.py:2491: error: Incompatible types in assignment (expression has type "Dict[str, List[str]]", variable has type "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] + ops/model.py:2491: error: Incompatible types in assignment (expression has type "Dict[str, List[str]]", variable has type "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]") [assignment] - ops/model.py:2493: error: Item "str" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] + ops/model.py:2493: error: Item "str" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] + ops/model.py:2493: error: Item "int" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] - ops/model.py:2493: error: Item "float" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] + ops/model.py:2493: error: Item "float" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] - ops/model.py:2493: error: Item "List[JsonObject]" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] + ops/model.py:2493: error: Item "List[JsonObject]" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] - ops/model.py:2493: error: Item "Tuple[JsonObject, ...]" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] + ops/model.py:2493: error: Item "Tuple[JsonObject, ...]" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] - ops/model.py:2493: error: Item "None" of "Union[str, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] + ops/model.py:2493: error: Item "None" of "Union[str, int, float, Dict[str, JsonObject], List[JsonObject], Tuple[JsonObject, ...], None]" has no attribute "get" [union-attr] - ops/model.py:2493: error: Argument 1 to "len" has incompatible type "Union[Any, float, Sized]"; expected "Sized" [arg-type] + ops/model.py:2493: error: Argument 1 to "len" has incompatible type "Union[Any, int, float, Sized]"; expected "Sized" [arg-type] pandas-stubs (https://github.com/pandas-dev/pandas-stubs) - tests/test_resampler.py:277: error: Expression is of type "Union[str, bytes, date, timedelta, complex]", not "Union[str, bytes, date, datetime, timedelta, bool, int, float, complex, Timestamp, Timedelta]" [assert-type] psycopg (https://github.com/psycopg/psycopg) + psycopg/psycopg/types/enum.py:40: error: Unused "type: ignore" comment discord.py (https://github.com/Rapptz/discord.py) - discord/backoff.py:75: error: Incompatible types in assignment (expression has type "function", variable has type "Callable[..., float]") [assignment] + discord/backoff.py:75: error: Incompatible types in assignment (expression has type "function", variable has type "Callable[..., Union[int, float]]") [assignment] - discord/scheduled_event.py:160: note: def __new__(cls, Union[str, bytes, array[Any], mmap, _CData, PickleBuffer, SupportsInt, SupportsIndex, SupportsTrunc] = ..., /) -> int + discord/scheduled_event.py:160: note: def __new__(cls, Union[str, bytes, bytearray, memoryview, array[Any], mmap, _CData, PickleBuffer, SupportsInt, SupportsIndex, SupportsTrunc] = ..., /) -> int - discord/scheduled_event.py:160: note: def __new__(cls, Union[str, bytes], /, base: SupportsIndex) -> int + discord/scheduled_event.py:160: note: def __new__(cls, Union[str, bytes, bytearray], /, base: SupportsIndex) -> int - discord/app_commands/models.py:205: note: def __new__(cls, Union[str, bytes, array[Any], mmap, _CData, PickleBuffer, SupportsInt, SupportsIndex, SupportsTrunc] = ..., /) -> int + discord/app_commands/models.py:205: note: def __new__(cls, Union[str, bytes, bytearray, memoryview, array[Any], mmap, _CData, PickleBuffer, SupportsInt, SupportsIndex, SupportsTrunc] = ..., /) -> int - discord/app_commands/models.py:205: note: def __new__(cls, Union[str, bytes], /, base: SupportsIndex) -> int + discord/app_commands/models.py:205: note: def __new__(cls, Union[str, bytes, bytearray], /, base: SupportsIndex) -> int - discord/app_commands/models.py:448: error: Incompatible types in assignment (expression has type "Union[str, float]", variable has type "str") [assignment] + discord/app_commands/models.py:448: error: Incompatible types in assignment (expression has type "Union[str, int, float]", variable has type "str") [assignment] - discord/app_commands/models.py:448: error: Incompatible types in assignment (expression has type "Union[str, float]", variable has type "int") [assignment] + discord/app_commands/models.py:448: error: Incompatible types in assignment (expression has type "Union[str, int, float]", variable has type "int") [assignment] - discord/app_commands/models.py:448: error: Incompatible types in assignment (expression has type "Union[str, float]", variable has type "float") [assignment] + discord/app_commands/models.py:448: error: Incompatible types in assignment (expression has type "Union[str, int, float]", variable has type "float") [assignment] - discord/app_commands/models.py:505: error: Incompatible types in assignment (expression has type "Dict[str, str]", target has type "Union[str, float]") [assignment] + discord/app_commands/models.py:505: error: Incompatible types in assignment (expression has type "Dict[str, str]", target has type "Union[str, int, float]") [assignment] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "str" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "str" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Iterable[str]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Iterable[str]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "float" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "float" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Optional[float]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Optional[float]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "bool" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "bool" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Optional[BasicAuth]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Optional[BasicAuth]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Optional[str]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Optional[str]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Optional[Mapping[str, str]]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Optional[Mapping[str, str]]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Union[str, URL, None]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Union[str, URL, None]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Union[SSLContext, bool, None, Fingerprint]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Union[SSLContext, bool, None, Fingerprint]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Optional[bool]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Optional[bool]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Optional[bytes]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Optional[bytes]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "Optional[SSLContext]" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "Optional[SSLContext]" [arg-type] - discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, BasicAuth, None, str]]"; expected "int" [arg-type] + discord/http.py:536: error: Argument 2 to "ws_connect" of "ClientSession" has incompatible type "**Dict[str, Union[Dict[str, str], float, int, BasicAuth, None, str]]"; expected "int" [arg-type] - discord/app_commands/transformers.py:147: error: Incompatible types in assignment (expression has type "float", target has type "Union[str, int]") [assignment] + discord/app_commands/transformers.py:147: error: Incompatible types in assignment (expression has type "Union[int, float]", target has type "Union[str, int]") [assignment] - discord/app_commands/transformers.py:149: error: Incompatible types in assignment (expression has type "float", target has type "Union[str, int]") [assignment] + discord/app_commands/transformers.py:149: error: Incompatible types in assignment (expression has type "Union[int, float]", target has type "Union[str, int]") [assignment] streamlit (https://github.com/streamlit/streamlit) + lib/streamlit/elements/metric.py: note: In member "parse_delta" of class "MetricMixin": + lib/streamlit/elements/metric.py:163:25: error: Subclass of "float" and "int" cannot exist: would have incompatible method signatures [unreachable] pylint (https://github.com/pycqa/pylint) + pylint/checkers/__init__.py:130: error: Argument 1 to "extend" of "list" has incompatible type "Tuple[str, str, str, Union[str, int]]"; expected "Iterable[str]" [arg-type] aioredis (https://github.com/aio-libs/aioredis) + aioredis/connection.py:933: error: Unsupported right operand type for in ("Union[bytes, memoryview, int]") [operator] + aioredis/connection.py:934: error: Item "memoryview" of "Union[bytes, memoryview, int]" has no attribute "split" [union-attr] + aioredis/connection.py:934: error: Item "int" of "Union[bytes, memoryview, int]" has no attribute "split" [union-attr] - aioredis/client.py:4114: error: Incompatible types in assignment (expression has type "Dict[Union[bytes, str], Optional[Any]]", variable has type "Dict[Union[bytes, str, memoryview], Callable[[Dict[str, str]], Awaitable[None]]]") [assignment] + aioredis/client.py:4114: error: Incompatible types in assignment (expression has type "Dict[Union[bytes, str, memoryview], Optional[Any]]", variable has type "Dict[Union[bytes, str, memoryview], Callable[[Dict[str, str]], Awaitable[None]]]") [assignment] - aioredis/client.py:4158: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[Union[bytes, str], Optional[Any]]"; expected "SupportsKeysAndGetItem[Union[bytes, str, memoryview], Callable[[Dict[str, str]], Awaitable[None]]]" [arg-type] + aioredis/client.py:4158: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[Union[bytes, str, memoryview], Optional[Any]]"; expected "SupportsKeysAndGetItem[Union[bytes, str, memoryview], Callable[[Dict[str, str]], Awaitable[None]]]" [arg-type] core (https://github.com/home-assistant/core) - homeassistant/components/deconz/sensor.py:110: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:110: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:117: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:117: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:128: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:128: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:137: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:137: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:145: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:145: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:151: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:151: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:160: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:160: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:169: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:169: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:178: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:178: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:187: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:187: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:204: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:204: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] - homeassistant/components/deconz/sensor.py:215: error: Returning Any from function declared to return "Union[datetime, None, str, float]" [no-any-return] + homeassistant/components/deconz/sensor.py:215: error: Returning Any from function declared to return "Union[datetime, None, str, int, float]" [no-any-return] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Few new errors are actually valid (and maybe actually catching actual bugs), except the one in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, it looks like it is caused by this PR, a simple repro: x: float if isinstance(x, int) or isinstance(x, float): pass it worked before, but fails with this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh wait, it only happens with a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This is ready for review then. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@JukkaL if you have no objections, I will merge this latter today. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ilevkivskyi Any sense as to when this fix will be released? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As part of 0.990, probably in a month or so |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
mypy 0.981 does not simplify unions for assert_type Invalid handling type narrowing with inf/float due to duck typing mypy fails to narrow Union[float,int] to float after isinstance(x, float)
There was an error while loading. Please reload this page.