Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment: Remove int/float promotion #17279

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JelleZijlstra
Copy link
Member

Just want to see the mypy-primer hits

Just want to see the mypy-primer hits

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

python-chess (https://github.com/niklasf/python-chess)
+ chess/engine.py:523: error: Unsupported operand types for / ("SupportsDunderLT[Any]" and "int")  [operator]
+ chess/engine.py:523: error: Unsupported operand types for / ("SupportsDunderGT[Any]" and "int")  [operator]
+ chess/engine.py:523: note: Left operand is of type "int | SupportsDunderLT[Any] | SupportsDunderGT[Any]"
+ chess/engine.py:527: error: Unsupported operand types for - ("float" and "SupportsDunderLT[Any]")  [operator]
+ chess/engine.py:527: error: Unsupported operand types for - ("float" and "SupportsDunderGT[Any]")  [operator]
+ chess/engine.py:527: note: Right operand is of type "int | SupportsDunderLT[Any] | SupportsDunderGT[Any]"
+ chess/engine.py:537: error: Unsupported operand types for - ("float" and "SupportsDunderLT[Any]")  [operator]
+ chess/engine.py:537: error: Unsupported operand types for - ("float" and "SupportsDunderGT[Any]")  [operator]
+ chess/engine.py:537: note: Right operand is of type "int | SupportsDunderLT[Any] | SupportsDunderGT[Any]"
+ chess/engine.py:547: error: Unsupported operand types for - ("float" and "SupportsDunderLT[Any]")  [operator]
+ chess/engine.py:547: error: Unsupported operand types for - ("float" and "SupportsDunderGT[Any]")  [operator]
+ chess/engine.py:547: note: Right operand is of type "int | SupportsDunderLT[Any] | SupportsDunderGT[Any]"
+ chess/pgn.py:158: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ chess/pgn.py:159: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ chess/pgn.py:562: error: Incompatible types in assignment (expression has type "SupportsDunderLT[Any] | SupportsDunderGT[Any]", variable has type "float | None")  [assignment]
+ chess/pgn.py:596: error: Incompatible types in assignment (expression has type "SupportsDunderLT[Any] | SupportsDunderGT[Any]", variable has type "float | None")  [assignment]

anyio (https://github.com/agronholm/anyio)
+ src/anyio/abc/_eventloop.py:128: error: Argument 1 to "sleep" of "AsyncBackend" has incompatible type "int"; expected "float"  [arg-type]
+ src/anyio/abc/_eventloop.py:142: error: Incompatible default for argument "deadline" (default has type "float | int", argument has type "float")  [assignment]
+ src/anyio/_core/_eventloop.py:99: error: Argument 1 to "sleep" has incompatible type "float | int"; expected "float"  [arg-type]
+ src/anyio/_core/_eventloop.py:113: error: Argument 1 to "sleep" has incompatible type "SupportsDunderLT[Any] | SupportsDunderGT[Any]"; expected "float"  [arg-type]
+ src/anyio/_core/_tasks.py:29: error: Incompatible default for argument "deadline" (default has type "float | int", argument has type "float")  [assignment]
+ src/anyio/_core/_tasks.py:113: error: Argument "deadline" to "create_cancel_scope" of "AsyncBackend" has incompatible type "float | int"; expected "float"  [arg-type]
+ src/anyio/_core/_tasks.py:134: error: Argument "deadline" to "create_cancel_scope" of "AsyncBackend" has incompatible type "float | int"; expected "float"  [arg-type]
+ src/anyio/streams/tls.py:274: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ src/anyio/_core/_streams.py:37: error: Incompatible default for argument "max_buffer_size" (default has type "int", argument has type "float")  [assignment]
+ src/anyio/_backends/_trio.py:775: error: Argument 1 to "create_memory_object_stream" has incompatible type "int"; expected "float"  [arg-type]
+ src/anyio/_backends/_trio.py:883: error: Incompatible default for argument "deadline" (default has type "float | int", argument has type "float")  [assignment]
+ src/anyio/_backends/_asyncio.py:347: error: Incompatible default for argument "deadline" (default has type "float | int", argument has type "float")  [assignment]
+ src/anyio/_backends/_asyncio.py:351: error: Incompatible default for argument "deadline" (default has type "float | int", argument has type "float")  [assignment]
+ src/anyio/_backends/_asyncio.py:1662: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ src/anyio/_backends/_asyncio.py:1701: error: Unsupported operand types for - ("SupportsDunderLT[Any]" and "int")  [operator]
+ src/anyio/_backends/_asyncio.py:1701: error: Unsupported operand types for - ("SupportsDunderGT[Any]" and "int")  [operator]
+ src/anyio/_backends/_asyncio.py:1701: note: Left operand is of type "SupportsDunderLT[Any] | SupportsDunderGT[Any]"
+ src/anyio/_backends/_asyncio.py:1920: error: Argument 1 to "create_memory_object_stream" has incompatible type "int"; expected "float"  [arg-type]
+ src/anyio/_backends/_asyncio.py:2053: error: Incompatible default for argument "deadline" (default has type "float | int", argument has type "float")  [assignment]
+ src/anyio/_backends/_asyncio.py:2064: error: Incompatible return value type (got "float | int", expected "float")  [return-value]
+ src/anyio/_backends/_asyncio.py:2077: error: Incompatible return value type (got "float | int", expected "float")  [return-value]
+ src/anyio/_backends/_asyncio.py:2443: error: Argument 1 to "CapacityLimiter" has incompatible type "int"; expected "float"  [arg-type]
+ src/anyio/to_process.py:150: error: Argument 1 to "fail_after" has incompatible type "int"; expected "float | None"  [arg-type]
+ src/anyio/to_process.py:193: error: Argument 1 to "CapacityLimiter" has incompatible type "int"; expected "float"  [arg-type]

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/utils.py:172: error: Argument "border" to "Label" has incompatible type "int"; expected "str | float"  [arg-type]
+ porcupine/utils.py:580: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:580: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:616: error: Argument "padx" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:616: error: Argument "pady" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:617: error: Argument "wraplength" to "Label" has incompatible type "int"; expected "str | float"  [arg-type]
+ porcupine/utils.py:618: error: Argument "padx" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:618: error: Argument "pady" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:633: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:633: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:656: error: Argument "wraplength" to "Label" has incompatible type "int"; expected "str | float"  [arg-type]
+ porcupine/utils.py:656: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:656: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:671: error: Argument "padx" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:671: error: Argument "pady" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:672: error: Argument "wraplength" to "Label" has incompatible type "int"; expected "str | float"  [arg-type]
+ porcupine/utils.py:673: error: Argument "padx" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:673: error: Argument "pady" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:677: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:677: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:683: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:699: error: Argument "wraplength" to "Label" has incompatible type "int"; expected "str | float"  [arg-type]
+ porcupine/utils.py:700: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:700: error: Argument "pady" has incompatible type "tuple[int, int]"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:703: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:716: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/utils.py:718: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/settings.py:506: error: Argument "padx" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/settings.py:506: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/settings.py:508: error: Argument "padding" to "Frame" has incompatible type "int"; expected "str | float | tuple[str | float] | tuple[str | float, str | float] | tuple[str | float, str | float, str | float] | tuple[str | float, str | float, str | float, str | float]"  [arg-type]
+ porcupine/settings.py:641: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/settings.py:690: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/settings.py:779: error: Argument "highlightthickness" to "Menubutton" has incompatible type "int"; expected "str | float"  [arg-type]
+ porcupine/settings.py:825: error: Argument "pady" has incompatible type "int"; expected "str | float | tuple[str | float, str | float]"  [arg-type]
+ porcupine/settings.py:828: error: No overload variant matches argument type "int"  [call-overload]
+ porcupine/settings.py:828: note: Possible overload variants:
+ porcupine/settings.py:828: note:     def configure(self, cnf: dict[str, Any] | None = ..., *, anchor: Literal['nw', 'n', 'ne', 'w', 'center', 'e', 'sw', 's', 'se'] = ..., background: str = ..., border: str | float = ..., borderwidth: str | float = ..., compound: Literal['', 'text', 'image', 'top', 'left', 'center', 'right', 'bottom', 'none'] = ..., cursor: str | tuple[str] | tuple[str, str] | tuple[str, str, str] | tuple[str, str, str, str] = ..., font: str | Font | list[Any] | tuple[str] | tuple[str, int] | tuple[str, int, str] | tuple[str, int, list[str] | tuple[str, ...]] | Tcl_Obj = ..., foreground: str = ..., image: _Image | str = ..., justify: Literal['left', 'center', 'right'] = ..., padding: str | float | tuple[str | float] | tuple[str | float, str | float] | tuple[str | float, str | float, str | float] | tuple[str | float, str | float, str | float, str | float] = ..., relief: Literal['raised', 'sunken', 'flat', 'ridge', 'solid', 'groove'] = ..., state: str = ..., style: str = ..., takefocus: Literal[0, 1, ''] | bool | Callable[[str], bool | None] = ..., text: float | int | str = ..., textvariable: Variable = ..., underline: int = ..., width: int | Literal[''] = ..., wraplength: str | float = ...) -> dict[str, tuple[str, str, str, Any, Any]] | None
+ porcupine/settings.py:828: note:     def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]
+ porcupine/textutils.py:699: error: No overload variant matches argument types "tuple[int, str]", "str"  [call-overload]
+ porcupine/textutils.py:699: note: Possible overload variants:
+ porcupine/textutils.py:699: note:     def configure(self, cnf: dict[str, Any] | None = ..., *, autoseparators: bool = ..., background: str = ..., bd: str | float = ..., bg: str = ..., blockcursor: bool = ..., border: str | float = ..., borderwidth: str | float = ..., cursor: str | tuple[str] | tuple[str, str] | tuple[str, str, str] | tuple[str, str, str, str] = ..., endline: int | Literal[''] = ..., exportselection: bool = ..., fg: str = ..., font: str | Font | list[Any] | tuple[str] | tuple[str, int] | tuple[str, int, str] | tuple[str, int, list[str] | tuple[str, ...]] | Tcl_Obj = ..., foreground: str = ..., height: str | float = ..., highlightbackground: str = ..., highlightcolor: str = ..., highlightthickness: str | float = ..., inactiveselectbackground: str = ..., insertbackground: str = ..., insertborderwidth: str | float = ..., insertofftime: int = ..., insertontime: int = ..., insertunfocussed: Literal['none', 'hollow', 'solid'] = ..., insertwidth: str | float = ..., maxundo: int = ..., padx: str | float = ..., pady: str | float = ..., relief: Literal['raised', 'sunken', 'flat', 'ridge', 'solid', 'groove'] = ..., selectbackground: str = ..., selectborderwidth: str | float = ..., selectforeground: str = ..., setgrid: bool = ..., spacing1: str | float = ..., spacing2: str | float = ..., spacing3: str | float = ..., startline: int | Literal[''] = ..., state: Literal['normal', 'disabled'] = ..., tabs: str | float | tuple[str | float, ...] = ..., tabstyle: Literal['tabular', 'wordprocessor'] = ..., takefocus: Literal[0, 1, ''] | bool | Callable[[str], bool | None] = ..., undo: bool = ..., width: int = ..., wrap: Literal['none', 'char', 'word'] = ..., xscrollcommand: str | Callable[[float, float], object] = ..., yscrollcommand: str | Callable[[float, float], object] = ...) -> dict[str, tuple[str, str, str, Any, Any]] | None
+ porcupine/textutils.py:699: note:     def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]
+ porcupine/textutils.py:892: error: No overload variant matches argument type "int"  [call-overload]
+ porcupine/textutils.py:892: note: Possible overload variants:

... (truncated 109 lines) ...

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/utils/human.py:20: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ mitmproxy/utils/asyncio_utils.py:55: error: Argument 3 to "getattr" has incompatible type "int"; expected "float"  [arg-type]
+ mitmproxy/tools/console/common.py:826: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "object"  [type-var]
+ mitmproxy/tools/console/common.py:826: error: Incompatible types in assignment (expression has type "object", variable has type "float | None")  [assignment]
+ mitmproxy/contentviews/base.py:66: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/test/tflow.py:86: error: Argument "timestamp_start" to "Request" has incompatible type "int"; expected "float"  [arg-type]
+ mitmproxy/test/tflow.py:87: error: Argument "timestamp_end" to "Request" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:100: error: Argument "timestamp_start" to "Response" has incompatible type "int"; expected "float"  [arg-type]
+ mitmproxy/test/tflow.py:101: error: Argument "timestamp_end" to "Response" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:222: error: Argument "timestamp_start" to "Client" has incompatible type "int"; expected "float"  [arg-type]
+ mitmproxy/test/tflow.py:223: error: Argument "timestamp_tls_setup" to "Client" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:224: error: Argument "timestamp_end" to "Client" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:246: error: Argument "timestamp_start" to "Server" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:247: error: Argument "timestamp_tcp_setup" to "Server" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:248: error: Argument "timestamp_tls_setup" to "Server" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:249: error: Argument "timestamp_end" to "Server" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:266: error: Argument 2 to "Error" has incompatible type "int"; expected "float"  [arg-type]
+ mitmproxy/test/tflow.py:275: error: Argument 4 to "WebSocketMessage" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:276: error: Argument 4 to "WebSocketMessage" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:277: error: Argument 4 to "WebSocketMessage" has incompatible type "int"; expected "float | None"  [arg-type]
+ mitmproxy/test/tflow.py:282: error: Incompatible types in assignment (expression has type "int", variable has type "float | None")  [assignment]
+ mitmproxy/addons/savehar.py:157: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ mitmproxy/addons/savehar.py:162: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ mitmproxy/addons/savehar.py:170: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ mitmproxy/contentviews/xml_html.py:272: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/xml_html.py:274: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/xml_html.py:277: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/mqtt.py:277: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/json.py:60: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/json.py:65: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/json.py:71: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/json.py:72: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/graphql.py:56: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/graphql.py:62: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/graphql.py:64: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/grpc.py:1118: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/grpc.py:1123: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/contentviews/auto.py:19: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ mitmproxy/tools/console/statusbar.py:91: error: Argument "seconds" to "send" of "_SyncSignal" has incompatible type "int"; expected "float"  [arg-type]
+ examples/addons/contentview.py:39: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ examples/addons/contentview.py:41: error: Incompatible return value type (got "int", expected "float")  [return-value]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/utils/filesystem.py:140: error: Argument 1 to "format_size" has incompatible type "int | float"; expected "float"  [arg-type]
+ src/pip/_internal/utils/filesystem.py:153: error: Argument 1 to "format_size" has incompatible type "int | float"; expected "float"  [arg-type]
+ src/pip/_internal/cli/spinners.py:104: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ src/pip/_internal/commands/cache.py:100: error: Argument 1 to "format_size" has incompatible type "int | float"; expected "float"  [arg-type]
+ src/pip/_internal/cli/progress_bars.py:42: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]
+ src/pip/_internal/cli/progress_bars.py:52: error: Argument "refresh_per_second" to "Progress" has incompatible type "int"; expected "float"  [arg-type]
+ src/pip/_internal/cli/progress_bars.py:57: error: Argument "advance" to "update" of "Progress" has incompatible type "int"; expected "float | None"  [arg-type]
+ src/pip/_internal/network/download.py:46: error: Argument 1 to "format_size" has incompatible type "int"; expected "float"  [arg-type]
+ src/pip/_internal/resolution/resolvelib/provider.py:103: error: Argument 1 to "defaultdict" has incompatible type "Callable[[], float | int]"; expected "Callable[[], float] | None"  [arg-type]
+ src/pip/_internal/resolution/resolvelib/provider.py:103: error: Incompatible return value type (got "float | int", expected "float")  [return-value]
+ src/pip/_internal/resolution/resolvelib/provider.py:172: error: Incompatible types in assignment (expression has type "float | int", variable has type "float")  [assignment]

downforeveryone (https://github.com/rpdelaney/downforeveryone)
+ downforeveryone/isup.py:72:21: error: Argument "timeout" to "get" has incompatible type "int"; expected "float | tuple[float, float] | tuple[float, None] | None"  [arg-type]

jinja (https://github.com/pallets/jinja)
+ src/jinja2/filters.py:710: error: Non-overlapping equality check (left operand type: "float", right operand type: "Literal[1]")  [comparison-overlap]

sockeye (https://github.com/awslabs/sockeye)
+ sockeye/utils.py:779: error: Unsupported operand types for + ("int" and "object")  [operator]
+ sockeye/data_io.py:162: error: No overload variant of "__setitem__" of "list" matches argument types "int", "int"  [call-overload]
+ sockeye/data_io.py:162: note: Possible overload variants:
+ sockeye/data_io.py:162: note:     def __setitem__(self, SupportsIndex, float | None, /) -> None
+ sockeye/data_io.py:162: note:     def __setitem__(self, slice, Iterable[float | None], /) -> None
+ sockeye/data_io.py:309: error: Unsupported operand types for / ("int" and "object")  [operator]
+ sockeye/inference.py:93: error: Incompatible types in assignment (expression has type "int", variable has type "float")  [assignment]

pylint (https://github.com/pycqa/pylint)
+ pylint/utils/linterstats.py:284: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ pylint/utils/linterstats.py:285: error: Incompatible return value type (got "int", expected "float")  [return-value]
+ pylint/checkers/__init__.py:118: error: Argument 2 to "diff_string" has incompatible type "int | float"; expected "float"  [arg-type]
+ pylint/lint/report_functions.py:64: error: Incompatible types in assignment (expression has type "object", target has type "int | float")  [assignment]
+ pylint/checkers/raw_metrics.py:32: error: Argument 1 to "diff_string" has incompatible type "int"; expected "float"  [arg-type]
+ pylint/checkers/raw_metrics.py:32: error: Argument 2 to "diff_string" has incompatible type "int"; expected "float"  [arg-type]
+ pylint/checkers/base/basic_checker.py:89: error: Argument 1 to "diff_string" has incompatible type "int"; expected "float"  [arg-type]
+ pylint/checkers/base/basic_checker.py:89: error: Argument 2 to "diff_string" has incompatible type "int"; expected "float"  [arg-type]

dragonchain (https://github.com/dragonchain/dragonchain)
+ dragonchain/lib/party.py:60:109: error: Argument "timeout" to "request" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/interfaces/docker_registry.py:53:147: error: Argument "timeout" to "delete" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/interfaces/docker_registry.py:56:101: error: Argument "timeout" to "delete" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/dto/btc.py:322:21: error: Argument "timeout" to "post" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/dto/btc_utest.py:96:45: error: Argument 1 to "btc_to_satoshi" has incompatible type "int"; expected "float"  [arg-type]
+ dragonchain/lib/database/redis.py:232:75: error: Argument "ex" to "set" of "BasicKeyCommands" has incompatible type "Optional[int]"; expected "Union[None, float, timedelta]"  [arg-type]
+ dragonchain/lib/database/redis.py:296:16: error: No overload variant of "brpop" of "ListCommands" matches argument types "str", "int"  [call-overload]
+ dragonchain/lib/database/redis.py:296:16: note: Possible overload variants:
+ dragonchain/lib/database/redis.py:296:16: note:     def brpop(self, keys: Union[bytes, float, int, str, Iterable[Union[bytes, float, int, str]]], timeout: Optional[Literal[0]] = ...) -> Tuple[Any, Any]
+ dragonchain/lib/database/redis.py:296:16: note:     def brpop(self, keys: Union[bytes, float, int, str, Iterable[Union[bytes, float, int, str]]], timeout: float) -> Optional[Tuple[Any, Any]]
+ dragonchain/lib/database/redis.py:333:44: error: Argument "ex" to "set" of "BasicKeyCommands" has incompatible type "Optional[int]"; expected "Union[None, float, timedelta]"  [arg-type]
+ dragonchain/lib/callback.py:42:82: error: Argument "timeout" to "post" of "Session" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/matchmaking.py:323:123: error: Argument "timeout" to "request" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/authorization.py:153:136: error: Argument "timeout" to "post" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/authorization.py:173:101: error: Argument "timeout" to "post" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/dto/bnb.py:381:71: error: Argument "timeout" to "post" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/dto/bnb.py:395:59: error: Argument "timeout" to "get" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/broadcast.py:55:68: error: Argument "timeout" to "post" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/broadcast.py:83:70: error: Argument "timeout" to "get" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/lib/broadcast.py:118:72: error: Argument "timeout" to "post" has incompatible type "int"; expected "Optional[Union[float, Tuple[float, float], Tuple[float, None]]]"  [arg-type]
+ dragonchain/broadcast_processor/broadcast_processor.py:108:46: error: Unsupported left operand type for * ("object")  [operator]

pylox (https://github.com/sco1/pylox)
+ pylox/scanner.py:173: error: Argument 2 to "_add_token" of "Scanner" has incompatible type "int"; expected "str | float | bool | None"  [arg-type]
+ pylox/builtins/py_builtins.py:57: error: Incompatible return value type (got "object", expected "float | int")  [return-value]
+ pylox/interpreter.py:273: error: Incompatible return value type (got "float | int", expected "float | str | None")  [return-value]
+ pylox/interpreter.py:314: error: Incompatible return value type (got "bool", expected "float | str | None")  [return-value]
+ pylox/interpreter.py:316: error: Incompatible return value type (got "bool", expected "float | str | None")  [return-value]
+ tests/scanning/test_numbers.py:20: error: Argument "literal" to "Token" has incompatible type "int"; expected "str | float | bool | None"  [arg-type]
+ tests/scanning/test_numbers.py:23: error: Argument "literal" to "Token" has incompatible type "int"; expected "str | float | bool | None"  [arg-type]
+ tests/scanning/test_numbers.py:24: error: Argument "literal" to "Token" has incompatible type "int"; expected "str | float | bool | None"  [arg-type]

psycopg (https://github.com/psycopg/psycopg)
+ psycopg/psycopg/_acompat.py:48: error: Argument 2 of "get" is incompatible with supertype "Queue"; supertype defines the argument type as "float | int | None"  [override]
+ psycopg/psycopg/_acompat.py:48: note: This violates the Liskov substitution principle
+ psycopg/psycopg/_acompat.py:48: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
+ psycopg/psycopg/waiting.py:340: error: Incompatible types in assignment (expression has type "int", variable has type "float | None")  [assignment]

... (truncated 1795 lines) ...```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant