fixed covariant mapping value type used in overload#15501
fixed covariant mapping value type used in overload#15501randolf-scholz wants to merge 7 commits intopython:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This reverts commit 22cef60.
This comment has been minimized.
This comment has been minimized.
|
Diff from mypy_primer, showing the effect of this PR on open source code: mypy (https://github.com/python/mypy)
+ mypy/dmypy/client.py:583: error: Need type annotation for "telemetry" [var-annotated]
+ mypy/dmypy/client.py:583: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
- mypy/test/testpep561.py:133: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
optuna (https://github.com/optuna/optuna)
+ optuna/trial/_trial.py:64: error: Need type annotation for "_fixed_params" [var-annotated]
+ optuna/samplers/_ga/_base.py:112: error: Unsupported operand types for > ("int" and "None") [operator]
+ optuna/samplers/_ga/_base.py:112: note: Left operand is of type "Any | None"
+ optuna/samplers/_ga/_base.py:114: error: Unsupported operand types for < ("int" and "None") [operator]
+ optuna/samplers/_ga/_base.py:114: note: Left operand is of type "Any | None"
+ optuna/samplers/_ga/_base.py:115: error: Incompatible types in assignment (expression has type "Any | None", variable has type "int") [assignment]
freqtrade (https://github.com/freqtrade/freqtrade)
+ freqtrade/freqai/torch/PyTorchMLPModel.py:41: error: Argument 2 to "get" of "dict" has incompatible type "float"; expected "int" [arg-type]
+ freqtrade/plugins/pairlist/pairlist_helpers.py:49: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/plugins/pairlist/pairlist_helpers.py:49: note: Possible overload variants:
+ freqtrade/plugins/pairlist/pairlist_helpers.py:49: note: def get(self, Never, /) -> None
+ freqtrade/plugins/pairlist/pairlist_helpers.py:49: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/directory_operations.py:24: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ freqtrade/configuration/directory_operations.py:24: note: Possible overload variants:
+ freqtrade/configuration/directory_operations.py:24: note: def get(self, Never, /) -> None
+ freqtrade/configuration/directory_operations.py:24: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/deprecated_settings.py:44: error: Need type annotation for "section1_config" [var-annotated]
+ freqtrade/loggers/__init__.py:138: error: Unsupported target for indexed assignment ("Any | object") [index]
+ freqtrade/loggers/__init__.py:162: error: Unsupported target for indexed assignment ("Any | object") [index]
+ freqtrade/loggers/__init__.py:173: error: Unsupported right operand type for in ("Any | object") [operator]
+ freqtrade/loggers/__init__.py:174: error: Value of type "Any | object" is not indexable [index]
+ freqtrade/loggers/__init__.py:176: error: Unsupported target for indexed assignment ("Any | object") [index]
+ freqtrade/loggers/__init__.py:186: error: Item "object" of "Any | object" has no attribute "values" [union-attr]
+ freqtrade/loggers/__init__.py:214: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ freqtrade/loggers/__init__.py:214: note: Possible overload variants:
+ freqtrade/loggers/__init__.py:214: note: def get(self, Never, /) -> None
+ freqtrade/loggers/__init__.py:214: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/load_config.py:93: error: Need type annotation for "files_loaded" (hint: "files_loaded: list[<type>] = ...") [var-annotated]
+ freqtrade/rpc/fiat_convert.py:49: error: Need type annotation for "_coingecko_config" [var-annotated]
+ freqtrade/configuration/configuration.py:115: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/configuration/configuration.py:115: note: Possible overload variants:
+ freqtrade/configuration/configuration.py:115: note: def get(self, Never, /) -> None
+ freqtrade/configuration/configuration.py:115: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/configuration.py:545: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/configuration/configuration.py:545: note: Possible overload variants:
+ freqtrade/configuration/configuration.py:545: note: def get(self, Never, /) -> None
+ freqtrade/configuration/configuration.py:545: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:116: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/configuration/config_validation.py:116: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:116: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:116: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:121: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/configuration/config_validation.py:121: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:121: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:121: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:165: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/configuration/config_validation.py:165: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:165: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:165: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:187: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/configuration/config_validation.py:187: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:187: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:187: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:193: error: Need type annotation for "ask_strategy" [var-annotated]
+ freqtrade/configuration/config_validation.py:221: error: Need type annotation for "time_in_force" [var-annotated]
+ freqtrade/configuration/config_validation.py:242: error: Need type annotation for "order_types" [var-annotated]
+ freqtrade/configuration/config_validation.py:277: error: Need type annotation for "unfilledtimeout" [var-annotated]
+ freqtrade/configuration/config_validation.py:326: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/configuration/config_validation.py:326: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:326: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:326: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:335: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/configuration/config_validation.py:335: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:335: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:335: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:339: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/configuration/config_validation.py:339: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:339: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:339: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:358: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/configuration/config_validation.py:358: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:358: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:358: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:360: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/configuration/config_validation.py:360: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:360: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:360: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:367: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/configuration/config_validation.py:367: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:367: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:367: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/configuration/config_validation.py:389: error: Need type annotation for "emc_conf" [var-annotated]
+ freqtrade/configuration/config_validation.py:409: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/configuration/config_validation.py:409: note: Possible overload variants:
+ freqtrade/configuration/config_validation.py:409: note: def get(self, Never, /) -> None
+ freqtrade/configuration/config_validation.py:409: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/commands/list_commands.py:266: error: Need type annotation for "base_currencies" [var-annotated]
+ freqtrade/commands/list_commands.py:267: error: Need type annotation for "quote_currencies" [var-annotated]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:628: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:628: note: Possible overload variants:
+ freqtrade/optimize/optimize_reports/optimize_reports.py:628: note: def get(self, Never, /) -> None
+ freqtrade/optimize/optimize_reports/optimize_reports.py:628: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/hyper.py:64: error: No overload variant of "get" of "dict" matches argument types "str", "Any | float" [call-overload]
+ freqtrade/strategy/hyper.py:64: note: Possible overload variants:
+ freqtrade/strategy/hyper.py:64: note: def get(self, Never, /) -> None
+ freqtrade/strategy/hyper.py:64: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/hyper.py:67: error: No overload variant of "get" of "dict" matches argument types "str", "Any | int" [call-overload]
+ freqtrade/strategy/hyper.py:67: note: Possible overload variants:
+ freqtrade/strategy/hyper.py:67: note: def get(self, Never, /) -> None
+ freqtrade/strategy/hyper.py:67: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/hyper.py:70: error: Need type annotation for "trailing" [var-annotated]
+ freqtrade/exchange/exchange.py:568: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ freqtrade/exchange/exchange.py:568: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:568: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:568: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:572: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ freqtrade/exchange/exchange.py:572: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:572: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:572: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:598: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/exchange/exchange.py:598: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:598: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:598: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:599: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/exchange/exchange.py:599: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:599: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:599: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:625: error: Need type annotation for "market" [var-annotated]
+ freqtrade/exchange/exchange.py:860: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/exchange/exchange.py:860: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:860: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:860: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:861: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/exchange/exchange.py:861: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:861: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:861: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:1009: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/exchange/exchange.py:1009: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:1009: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:1009: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:1017: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/exchange/exchange.py:1017: note: Possible overload variants:
+ freqtrade/exchange/exchange.py:1017: note: def get(self, Never, /) -> None
+ freqtrade/exchange/exchange.py:1017: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/exchange.py:2264: error: Need type annotation for "conf_strategy" [var-annotated]
+ freqtrade/exchange/exchange.py:2345: error: Need type annotation for "entry_pricing" [var-annotated]
+ freqtrade/exchange/exchange.py:2346: error: Need type annotation for "exit_pricing" [var-annotated]
+ freqtrade/exchange/exchange.py:2922: error: Incompatible return value type (got "dict[tuple[str, str, CandleType], Any | None]", expected "dict[tuple[str, str, CandleType], DataFrame]") [return-value]
+ freqtrade/exchange/okx.py:200: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/exchange/okx.py:200: note: Possible overload variants:
+ freqtrade/exchange/okx.py:200: note: def get(self, Never, /) -> None
+ freqtrade/exchange/okx.py:200: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/hyperliquid.py:106: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ freqtrade/exchange/hyperliquid.py:106: note: Possible overload variants:
+ freqtrade/exchange/hyperliquid.py:106: note: def get(self, Never, /) -> None
+ freqtrade/exchange/hyperliquid.py:106: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/hyperliquid.py:152: error: Need type annotation for "market_info" [var-annotated]
+ freqtrade/exchange/gate.py:121: error: Need type annotation for "pair_fees" [var-annotated]
+ freqtrade/exchange/bybit.py:313: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/exchange/bybit.py:313: note: Possible overload variants:
+ freqtrade/exchange/bybit.py:313: note: def get(self, Never, /) -> None
+ freqtrade/exchange/bybit.py:313: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/bitget.py:253: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/exchange/bitget.py:253: note: Possible overload variants:
+ freqtrade/exchange/bitget.py:253: note: def get(self, Never, /) -> None
+ freqtrade/exchange/bitget.py:253: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/binance.py:95: error: Unused "type: ignore" comment [unused-ignore]
+ freqtrade/exchange/binance.py:455: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/exchange/binance.py:455: note: Possible overload variants:
+ freqtrade/exchange/binance.py:455: note: def get(self, Never, /) -> None
+ freqtrade/exchange/binance.py:455: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/binance.py:463: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/exchange/binance.py:463: note: Possible overload variants:
+ freqtrade/exchange/binance.py:463: note: def get(self, Never, /) -> None
+ freqtrade/exchange/binance.py:463: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/check_exchange.py:28: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/exchange/check_exchange.py:28: note: Possible overload variants:
+ freqtrade/exchange/check_exchange.py:28: note: def get(self, Never, /) -> None
+ freqtrade/exchange/check_exchange.py:28: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/exchange/check_exchange.py:33: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ freqtrade/exchange/check_exchange.py:33: note: Possible overload variants:
+ freqtrade/exchange/check_exchange.py:33: note: def get(self, Never, /) -> None
+ freqtrade/exchange/check_exchange.py:33: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/rpc/rpc.py:319: error: Argument 1 to "__call__" of "_UFunc_Nin1_Nout1" has incompatible type "Any | None"; expected "complex | str | bytes | generic[Any]" [arg-type]
+ freqtrade/rpc/rpc.py:322: error: Incompatible types in assignment (expression has type "Any | float | None", variable has type "float") [assignment]
+ freqtrade/rpc/rpc.py:322: error: Unsupported operand types for + ("float" and "None") [operator]
+ freqtrade/rpc/rpc.py:322: note: Right operand is of type "Any | None"
+ freqtrade/rpc/rpc.py:327: error: Argument 1 to "__call__" of "_UFunc_Nin1_Nout1" has incompatible type "Any | None"; expected "complex | str | bytes | generic[Any]" [arg-type]
+ freqtrade/rpc/rpc.py:329: error: Incompatible types in assignment (expression has type "Any | float | None", variable has type "float") [assignment]
+ freqtrade/rpc/rpc.py:331: error: Unsupported operand types for + ("float" and "None") [operator]
+ freqtrade/rpc/rpc.py:331: note: Right operand is of type "Any | None"
+ freqtrade/rpc/rpc.py:336: error: Need type annotation for "orders" [var-annotated]
+ freqtrade/rpc/rpc_manager.py:94: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/rpc/rpc_manager.py:94: note: Possible overload variants:
+ freqtrade/rpc/rpc_manager.py:94: note: def get(self, Never, /) -> None
+ freqtrade/rpc/rpc_manager.py:94: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/data/entryexitanalysis.py:324: error: Need type annotation for "analysis_groups" [var-annotated]
+ freqtrade/data/entryexitanalysis.py:327: error: Need type annotation for "indicator_list" [var-annotated]
+ freqtrade/data/entryexitanalysis.py:333: error: Unused "type: ignore" comment [unused-ignore]
+ freqtrade/data/dataprovider.py:69: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ freqtrade/data/dataprovider.py:69: note: Possible overload variants:
+ freqtrade/data/dataprovider.py:69: note: def get(self, Never, /) -> None
+ freqtrade/data/dataprovider.py:69: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/data/dataprovider.py:335: error: Need type annotation for "freqai_config" [var-annotated]
+ freqtrade/data/dataprovider.py:476: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/data/dataprovider.py:476: note: Possible overload variants:
+ freqtrade/data/dataprovider.py:476: note: def get(self, Never, /) -> None
+ freqtrade/data/dataprovider.py:476: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/interface.py:180: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/strategy/interface.py:180: note: Possible overload variants:
+ freqtrade/strategy/interface.py:180: note: def get(self, Never, /) -> None
+ freqtrade/strategy/interface.py:180: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/interface.py:1064: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/strategy/interface.py:1064: note: Possible overload variants:
+ freqtrade/strategy/interface.py:1064: note: def get(self, Never, /) -> None
+ freqtrade/strategy/interface.py:1064: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/interface.py:1303: error: No overload variant of "get" of "dict" matches argument types "str", "int" [call-overload]
+ freqtrade/strategy/interface.py:1303: note: Possible overload variants:
+ freqtrade/strategy/interface.py:1303: note: def get(self, Never, /) -> None
+ freqtrade/strategy/interface.py:1303: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/interface.py:1716: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/strategy/interface.py:1716: note: Possible overload variants:
+ freqtrade/strategy/interface.py:1716: note: def get(self, Never, /) -> None
+ freqtrade/strategy/interface.py:1716: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/interface.py:1718: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ freqtrade/strategy/interface.py:1718: note: Possible overload variants:
+ freqtrade/strategy/interface.py:1718: note: def get(self, Never, /) -> None
+ freqtrade/strategy/interface.py:1718: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/strategy/interface.py:1768: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/strategy/interface.py:1768: note: Possible overload variants:
+ freqtrade/strategy/interface.py:1768: note: def get(self, Never, /) -> None
+ freqtrade/strategy/interface.py:1768: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/rpc/external_message_consumer.py:66: error: Need type annotation for "_emc_config" [var-annotated]
+ freqtrade/freqai/data_kitchen.py:149: error: No overload variant of "get" of "dict" matches argument types "str", "float" [call-overload]
+ freqtrade/freqai/data_kitchen.py:149: note: Possible overload variants:
+ freqtrade/freqai/data_kitchen.py:149: note: def get(self, Never, /) -> None
+ freqtrade/freqai/data_kitchen.py:149: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqai/data_kitchen.py:600: error: Item "str" of "Any | str" has no attribute "get" [union-attr]
+ freqtrade/freqai/data_drawer.py:72: error: Need type annotation for "freqai_info" [var-annotated]
+ freqtrade/freqtradebot.py:137: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/freqtradebot.py:137: note: Possible overload variants:
+ freqtrade/freqtradebot.py:137: note: def get(self, Never, /) -> None
+ freqtrade/freqtradebot.py:137: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqtradebot.py:693: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/freqtradebot.py:693: note: Possible overload variants:
+ freqtrade/freqtradebot.py:693: note: def get(self, Never, /) -> None
+ freqtrade/freqtradebot.py:693: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqtradebot.py:1624: error: No overload variant of "get" of "dict" matches argument types "str", "int" [call-overload]
+ freqtrade/freqtradebot.py:1624: note: Possible overload variants:
+ freqtrade/freqtradebot.py:1624: note: def get(self, Never, /) -> None
+ freqtrade/freqtradebot.py:1624: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/optimize/backtesting.py:150: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/optimize/backtesting.py:150: note: Possible overload variants:
+ freqtrade/optimize/backtesting.py:150: note: def get(self, Never, /) -> None
+ freqtrade/optimize/backtesting.py:150: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/optimize/backtesting.py:206: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/optimize/backtesting.py:206: note: Possible overload variants:
+ freqtrade/optimize/backtesting.py:206: note: def get(self, Never, /) -> None
+ freqtrade/optimize/backtesting.py:206: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqai/utils.py:172: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/freqai/utils.py:172: note: Possible overload variants:
+ freqtrade/freqai/utils.py:172: note: def get(self, Never, /) -> None
+ freqtrade/freqai/utils.py:172: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/worker.py:57: error: Need type annotation for "internals_config" [var-annotated]
+ freqtrade/worker.py:63: error: No overload variant of "get" of "dict" matches argument types "str", "bool" [call-overload]
+ freqtrade/worker.py:63: note: Possible overload variants:
+ freqtrade/worker.py:63: note: def get(self, Never, /) -> None
+ freqtrade/worker.py:63: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqai/freqai_interface.py:63: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/freqai/freqai_interface.py:63: note: Possible overload variants:
+ freqtrade/freqai/freqai_interface.py:63: note: def get(self, Never, /) -> None
+ freqtrade/freqai/freqai_interface.py:63: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqai/freqai_interface.py:66: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ freqtrade/freqai/freqai_interface.py:66: note: Possible overload variants:
+ freqtrade/freqai/freqai_interface.py:66: note: def get(self, Never, /) -> None
+ freqtrade/freqai/freqai_interface.py:66: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqai/freqai_interface.py:93: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/freqai/freqai_interface.py:93: note: Possible overload variants:
+ freqtrade/freqai/freqai_interface.py:93: note: def get(self, Never, /) -> None
+ freqtrade/freqai/freqai_interface.py:93: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/optimize/analysis/recursive_helpers.py:90: error: Need type annotation for "strategy_list" [var-annotated]
+ freqtrade/optimize/analysis/lookahead_helpers.py:229: error: Need type annotation for "strategy_list" [var-annotated]
+ freqtrade/plugins/pairlist/ProducerPairList.py:40: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ freqtrade/plugins/pairlist/ProducerPairList.py:40: note: Possible overload variants:
+ freqtrade/plugins/pairlist/ProducerPairList.py:40: note: def get(self, Never, /) -> None
+ freqtrade/plugins/pairlist/ProducerPairList.py:40: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/plugins/pairlist/MarketCapPairList.py:40: error: Need type annotation for "_categories" [var-annotated]
+ freqtrade/plugins/pairlist/MarketCapPairList.py:43: error: Need type annotation for "_coingecko_config" [var-annotated]
+ freqtrade/freqai/base_models/BaseRegressionModel.py:66: error: No overload variant of "get" of "dict" matches argument types "str", "float" [call-overload]
+ freqtrade/freqai/base_models/BaseRegressionModel.py:66: note: Possible overload variants:
+ freqtrade/freqai/base_models/BaseRegressionModel.py:66: note: def get(self, Never, /) -> None
+ freqtrade/freqai/base_models/BaseRegressionModel.py:66: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqai/base_models/BaseClassifierModel.py:64: error: No overload variant of "get" of "dict" matches argument types "str", "float" [call-overload]
+ freqtrade/freqai/base_models/BaseClassifierModel.py:64: note: Possible overload variants:
+ freqtrade/freqai/base_models/BaseClassifierModel.py:64: note: def get(self, Never, /) -> None
+ freqtrade/freqai/base_models/BaseClassifierModel.py:64: note: def [_T] get(self, Never, _T, /) -> _T
+ freqtrade/freqai/RL/BaseReinforcementLearningModel.py:133: error: No overload variant of "get" of "dict" matches argument types "str", "float" [call-overload]
+ freqtrade/freqai/RL/BaseReinforcementLearningModel.py:133: note: Possible overload variants:
+ freqtrade/freqai/RL/BaseReinforcementLearningModel.py:133: note: def get(self, Never, /) -> None
+ freqtrade/freqai/RL/BaseReinforcementLearningModel.py:133: note: def [_T] get(self, Never, _T, /) -> _T
colour (https://github.com/colour-science/colour)
- colour/utilities/network.py:1459: error: Item "None" of "Any | None" has no attribute "connect" [union-attr]
+ colour/utilities/network.py:1459: error: Item "None" of "Any | Port | None" has no attribute "connect" [union-attr]
+ colour/utilities/network.py:1459: error: Argument 1 to "connect" of "Port" has incompatible type "Port | None"; expected "Port" [arg-type]
- colour/utilities/network.py:1507: error: Item "None" of "Any | None" has no attribute "disconnect" [union-attr]
+ colour/utilities/network.py:1507: error: Item "None" of "Any | Port | None" has no attribute "disconnect" [union-attr]
+ colour/utilities/network.py:1507: error: Argument 1 to "disconnect" of "Port" has incompatible type "Port | None"; expected "Port" [arg-type]
+ colour/io/luts/lut.py:1151: error: Need type annotation for "interpolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:1153: error: Need type annotation for "extrapolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:1586: error: Need type annotation for "interpolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:1588: error: Need type annotation for "extrapolator_kwargs" [var-annotated]
+ colour/io/luts/lut.py:2286: error: Need type annotation for "interpolator_kwargs" [var-annotated]
+ colour/geometry/primitives.py:151: error: Incompatible types in assignment (expression has type "Any | str", variable has type "Literal['-x', '+x', '-y', '+y', '-z', '+z', 'xy', 'xz', 'yz', 'yx', 'zx', 'zy']") [assignment]
+ colour/plotting/common.py:844: error: Argument 3 to "text" of "Axes" has incompatible type "str | int | float"; expected "str" [arg-type]
tornado (https://github.com/tornadoweb/tornado)
+ tornado/web.py:1572: error: Need type annotation for "cookie_kwargs" [var-annotated]
+ tornado/web.py:2242: error: Need type annotation for "static_handler_args" [var-annotated]
spark (https://github.com/apache/spark)
+ python/pyspark/logger/logger.py:71: error: Need type annotation for "log_entry" [var-annotated]
+ python/pyspark/sql/session.py:328: error: Unused "type: ignore" comment [unused-ignore]
+ python/pyspark/sql/session.py:328: error: Argument 2 to "get" of "dict" has incompatible type "str | None"; expected "str" [arg-type]
+ python/pyspark/sql/session.py:328: note: Error code "arg-type" not covered by "type: ignore" comment
+ python/pyspark/sql/session.py:329: error: Unused "type: ignore" comment [unused-ignore]
+ python/pyspark/sql/session.py:330: error: Argument 2 to "get" of "dict" has incompatible type "str | None"; expected "str" [arg-type]
openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/core/ia.py: note: In function "extract_item_metadata":
+ openlibrary/core/ia.py:118: error: Need type annotation for "files" [var-annotated]
+ openlibrary/core/ia.py: note: In member "get_item_status" of class "ItemEdition":
+ openlibrary/core/ia.py:267: error: Need type annotation for "collections" [var-annotated]
+ openlibrary/catalog/utils/__init__.py: note: In function "get_non_isbn_asin":
+ openlibrary/catalog/utils/__init__.py:405: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ openlibrary/catalog/utils/__init__.py:405: note: Possible overload variants:
+ openlibrary/catalog/utils/__init__.py:405: note: def get(self, Never, /) -> None
+ openlibrary/catalog/utils/__init__.py:405: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/catalog/utils/__init__.py: note: In function "is_asin_only":
+ openlibrary/catalog/utils/__init__.py:437: error: No overload variant of "get" of "dict" matches argument types "str", "list[Never]" [call-overload]
+ openlibrary/catalog/utils/__init__.py:437: note: Possible overload variants:
+ openlibrary/catalog/utils/__init__.py:437: note: def get(self, Never, /) -> None
+ openlibrary/catalog/utils/__init__.py:437: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/catalog/utils/__init__.py: note: In function "format_languages":
+ openlibrary/catalog/utils/__init__.py:481: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ openlibrary/catalog/utils/__init__.py:481: note: Possible overload variants:
+ openlibrary/catalog/utils/__init__.py:481: note: def get(self, Never, /) -> None
+ openlibrary/catalog/utils/__init__.py:481: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/catalog/utils/__init__.py:483: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ openlibrary/catalog/utils/__init__.py:483: note: Possible overload variants:
+ openlibrary/catalog/utils/__init__.py:483: note: def get(self, Never, /) -> None
+ openlibrary/catalog/utils/__init__.py:483: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/core/lending.py: note: In function "get_resource_id":
+ openlibrary/core/lending.py:1021: error: Need type annotation for "external_identifiers" [var-annotated]
+ openlibrary/catalog/add_book/__init__.py: note: In function "validate_record":
+ openlibrary/catalog/add_book/__init__.py:834: error: Need type annotation for "source_records" [var-annotated]
+ openlibrary/catalog/add_book/__init__.py: note: In function "update_edition_with_rec_data":
+ openlibrary/catalog/add_book/__init__.py:905: error: Need type annotation for "rec_values" [var-annotated]
+ openlibrary/catalog/add_book/__init__.py: note: At top level:
+ openlibrary/coverstore/code.py: note: In function "get_cover_id":
+ openlibrary/coverstore/code.py:75: error: Need type annotation for "covers" [var-annotated]
+ openlibrary/plugins/admin/code.py: note: In function "revert_changesets":
+ openlibrary/plugins/admin/code.py:130: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ openlibrary/plugins/admin/code.py:130: note: Possible overload variants:
+ openlibrary/plugins/admin/code.py:130: note: def get(self, Never, /) -> None
+ openlibrary/plugins/admin/code.py:130: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/book_providers.py: note: In member "from_json" of class "Acquisition":
+ openlibrary/book_providers.py:108: error: Argument "access" to "Acquisition" has incompatible type "Any | str"; expected "Literal['sample', 'buy', 'open-access', 'borrow', 'subscribe']" [arg-type]
+ openlibrary/book_providers.py: note: In member "from_opds_json" of class "Acquisition":
+ openlibrary/book_providers.py:119: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ openlibrary/book_providers.py:119: note: Possible overload variants:
+ openlibrary/book_providers.py:119: note: def get(self, Never, /) -> None
+ openlibrary/book_providers.py:119: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/book_providers.py:137: error: No overload variant of "get" of "dict" matches argument types "str", "None" [call-overload]
+ openlibrary/book_providers.py:137: note: Possible overload variants:
+ openlibrary/book_providers.py:137: note: def get(self, Never, /) -> None
+ openlibrary/book_providers.py:137: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/book_providers.py: note: In member "get_identifiers" of class "AbstractBookProvider":
+ openlibrary/book_providers.py:196: error: No overload variant of "get" of "dict" matches argument types "str | None", "list[Never]" [call-overload]
+ openlibrary/book_providers.py:196: note: Possible overload variants:
+ openlibrary/book_providers.py:196: note: def get(self, Never, /) -> None
+ openlibrary/book_providers.py:196: note: def [_T] get(self, Never, _T, /) -> _T
+ openlibrary/book_providers.py: note: In member "get_acquisitions" of class "AbstractBookProvider":
+ openlibrary/book_providers.py:280: error: Need type annotation for "providers" [var-annotated]
+ openlibrary/book_providers.py: note: In member "get_identifiers" of class "DirectProvider":
+ openlibrary/book_providers.py:595: error: Need type annotation for "providers" [var-annotated]
+ openlibrary/plugins/upstream/mybooks.py: note: In function "render_template":
+ openlibrary/plugins/upstream/mybooks.py:94: error: Need type annotation for "editions" [var-annotated]
+ openlibrary/plugins/openlibrary/partials.py: note: In member "generate" of class "AffiliateLinksPartial":
+ openlibrary/plugins/openlibrary/partials.py:243: error: Need type annotation for "args" [var-annotated]
+ openlibrary/plugins/openlibrary/partials.py: note: In member "generate" of class "SearchFacetsPartial":
+ openlibrary/plugins/openlibrary/partials.py:267: error: Need type annotation for "param" [var-annotated]
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ pymongo/errors.py:302: error: Need type annotation for "wces" [var-annotated]
+ pymongo/errors.py:306: error: Need type annotation for "werrs" [var-annotated]
+ pymongo/errors.py:350: error: Argument 2 to "get" of "Mapping" has incompatible type "dict[Never, Never]"; expected "list[WriteError] | None" [arg-type]
+ pymongo/auth_shared.py:114: error: Need type annotation for "properties" [var-annotated]
+ pymongo/hello.py:183: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ pymongo/hello.py:183: note: Possible overload variants:
+ pymongo/hello.py:183: note: def get(self, Never, /) -> None
+ pymongo/hello.py:183: note: def [_T] get(self, Never, _T, /) -> _T
+ pymongo/pool_options.py:207: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ pymongo/pool_options.py:207: note: Possible overload variants:
+ pymongo/pool_options.py:207: note: def get(self, Never, /) -> None
+ pymongo/pool_options.py:207: note: def [_T] get(self, Never, _T, /) -> _T
+ pymongo/pool_options.py:213: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ pymongo/pool_options.py:213: note: Possible overload variants:
+ pymongo/pool_options.py:213: note: def get(self, Never, /) -> None
+ pymongo/pool_options.py:213: note: def [_T] get(self, Never, _T, /) -> _T
+ pymongo/pool_options.py:237: error: Need type annotation for "driver" [var-annotated]
+ pymongo/pool_options.py:240: error: Value of type "Any | None" is not indexable [index]
+ pymongo/pool_options.py:250: error: Value of type "Any | None" is not indexable [index]
+ pymongo/client_options.py:56: error: Argument 1 to "_build_credentials_tuple" has incompatible type "Any | str | None"; expected "str" [arg-type]
+ pymongo/synchronous/collection.py:2879: error: Need type annotation for "options" [var-annotated]
+ pymongo/synchronous/client_bulk.py:587: error: Need type annotation for "wce" [var-annotated]
+ pymongo/asynchronous/collection.py:2886: error: Need type annotation for "options" [var-annotated]
+ pymongo/asynchronous/client_bulk.py:589: error: Need type annotation for "wce" [var-annotated]
dulwich (https://github.com/dulwich/dulwich)
+ dulwich/porcelain/__init__.py:4907: error: Need type annotation for "changes" (hint: "changes: list[<type>] = ...") [var-annotated]
setuptools (https://github.com/pypa/setuptools)
+ setuptools/config/_apply_pyprojecttoml.py:70: error: Need type annotation for "orig_config" [var-annotated]
+ setuptools/config/_apply_pyprojecttoml.py:88: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ setuptools/config/_apply_pyprojecttoml.py:88: note: Possible overload variants:
+ setuptools/config/_apply_pyprojecttoml.py:88: note: def get(self, Never, /) -> None
+ setuptools/config/_apply_pyprojecttoml.py:88: note: def [_T] get(self, Never, _T, /) -> _T
+ setuptools/config/_apply_pyprojecttoml.py:313: error: Need type annotation for "tool_table" [var-annotated]
+ setuptools/config/_apply_pyprojecttoml.py:314: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ setuptools/config/_apply_pyprojecttoml.py:314: note: Possible overload variants:
+ setuptools/config/_apply_pyprojecttoml.py:314: note: def get(self, Never, /) -> None
+ setuptools/config/_apply_pyprojecttoml.py:314: note: def [_T] get(self, Never, _T, /) -> _T
+ setuptools/config/_apply_pyprojecttoml.py:318: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ setuptools/config/_apply_pyprojecttoml.py:318: note: Possible overload variants:
+ setuptools/config/_apply_pyprojecttoml.py:318: note: def get(self, Never, /) -> None
+ setuptools/config/_apply_pyprojecttoml.py:318: note: def [_T] get(self, Never, _T, /) -> _T
+ setuptools/config/pyprojecttoml.py:109: error: Need type annotation for "project_table" [var-annotated]
+ setuptools/config/pyprojecttoml.py:110: error: Need type annotation for "tool_table" [var-annotated]
+ setuptools/config/pyprojecttoml.py:111: error: Need type annotation for "setuptools_table" [var-annotated]
+ setuptools/config/pyprojecttoml.py:138: error: Need type annotation for "places" [var-annotated]
+ setuptools/config/pyprojecttoml.py:191: error: Need type annotation for "project_cfg" [var-annotated]
+ setuptools/config/pyprojecttoml.py:192: error: Need type annotation for "dynamic" [var-annotated]
+ setuptools/config/pyprojecttoml.py:193: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ setuptools/config/pyprojecttoml.py:193: note: Possible overload variants:
+ setuptools/config/pyprojecttoml.py:193: note: def get(self, Never, /) -> None
+ setuptools/config/pyprojecttoml.py:193: note: def [_T] get(self, Never, _T, /) -> _T
+ setuptools/command/build_clib.py:54: error: Need type annotation for "global_deps" [var-annotated]
+ setuptools/command/build_clib.py:67: error: Need type annotation for "extra_deps" [var-annotated]
porcupine (https://github.com/Akuli/porcupine)
- porcupine/plugins/highlight/tree_sitter_highlighter.py:83: error: Incompatible return value type (got "Any | None", expected "str") [return-value]
schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/avro/schema.py: note: In function "make_avsc_object":
+ schema_salad/avro/schema.py:737:26: error: Need type annotation for "fields" [var-annotated]
+ schema_salad/schema.py: note: In function "print_inheritance":
+ schema_salad/schema.py:786:22: error: Need type annotation for "fields" [var-annotated]
alerta (https://github.com/alerta/alerta)
+ alerta/models/token.py:33: error: Need type annotation for "orgs" [var-annotated]
+ alerta/models/token.py:34: error: Need type annotation for "groups" [var-annotated]
+ alerta/models/token.py:35: error: Need type annotation for "roles" [var-annotated]
+ alerta/models/token.py:36: error: Need type annotation for "scopes" [var-annotated]
- alerta/models/permission.py:29: error: Argument "match" to "Permission" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/permission.py:29: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/permission.py:49: error: Argument "match" to "Permission" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/permission.py:49: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/note.py:34: error: Argument "text" to "Note" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/note.py:34: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/note.py:35: error: Argument "user" to "Note" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/note.py:35: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/note.py:37: error: Argument "note_type" to "Note" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/note.py:37: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
+ alerta/models/note.py:40: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ alerta/models/note.py:40: note: Possible overload variants:
+ alerta/models/note.py:40: note: def get(self, Never, /) -> None
+ alerta/models/note.py:40: note: def [_T] get(self, Never, _T, /) -> _T
- alerta/models/note.py:76: error: Argument "text" to "Note" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/note.py:76: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/note.py:77: error: Argument "user" to "Note" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/note.py:77: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/note.py:79: error: Argument "note_type" to "Note" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/note.py:79: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/key.py:51: error: Argument "user" to "ApiKey" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/key.py:51: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/key.py:53: error: Argument "text" to "ApiKey" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/key.py:53: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/key.py:55: error: Argument "customer" to "ApiKey" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/key.py:55: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/key.py:89: error: Argument "user" to "ApiKey" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/key.py:89: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/key.py:91: error: Argument 1 to "type_to_scopes" of "ApiKeyHelper" has incompatible type "Any | None"; expected "str" [arg-type]
- alerta/models/key.py:91: error: Argument 2 to "type_to_scopes" of "ApiKeyHelper" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/key.py:91: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/key.py:92: error: Argument "text" to "ApiKey" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/key.py:92: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/key.py:93: error: Argument "expire_time" to "ApiKey" has incompatible type "Any | None"; expected "datetime" [arg-type]
+ alerta/models/key.py:93: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "datetime" [arg-type]
- alerta/models/key.py:96: error: Argument "customer" to "ApiKey" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/key.py:96: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/heartbeat.py:85: error: Argument "origin" to "Heartbeat" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/heartbeat.py:85: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/heartbeat.py:89: error: Argument "timeout" to "Heartbeat" has incompatible type "Any | None"; expected "int" [arg-type]
+ alerta/models/heartbeat.py:89: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "int" [arg-type]
- alerta/models/heartbeat.py:90: error: Argument "customer" to "Heartbeat" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/heartbeat.py:90: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/heartbeat.py:120: error: Argument "origin" to "Heartbeat" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/heartbeat.py:120: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/heartbeat.py:124: error: Argument "create_time" to "Heartbeat" has incompatible type "Any | None"; expected "datetime" [arg-type]
+ alerta/models/heartbeat.py:124: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "datetime" [arg-type]
- alerta/models/heartbeat.py:125: error: Argument "timeout" to "Heartbeat" has incompatible type "Any | None"; expected "int" [arg-type]
+ alerta/models/heartbeat.py:125: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "int" [arg-type]
- alerta/models/heartbeat.py:129: error: Argument "customer" to "Heartbeat" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/heartbeat.py:129: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:32: error: Argument "id" to "GroupUser" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:32: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:33: error: Argument "name" to "GroupUser" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:33: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:34: error: Argument "login" to "GroupUser" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:34: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:35: error: Argument "status" to "GroupUser" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:35: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:84: error: Argument "name" to "Group" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:84: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:85: error: Argument "text" to "Group" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:85: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:106: error: Argument "name" to "Group" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:106: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/group.py:107: error: Argument "text" to "Group" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/group.py:107: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/customer.py:23: error: Argument "match" to "Customer" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/customer.py:23: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/customer.py:24: error: Argument "customer" to "Customer" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/customer.py:24: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/customer.py:44: error: Argument "match" to "Customer" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/customer.py:44: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/customer.py:45: error: Argument "customer" to "Customer" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/customer.py:45: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
+ alerta/models/blackout.py:42: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "int" [arg-type]
- alerta/models/alert.py:98: error: Argument "resource" to "Alert" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/alert.py:98: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/alert.py:99: error: Argument "event" to "Alert" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/alert.py:99: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/alert.py:173: error: Argument "resource" to "Alert" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/alert.py:173: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/alert.py:174: error: Argument "event" to "Alert" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/alert.py:174: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/user.py:66: error: Argument "login" to "User" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/user.py:66: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/user.py:68: error: Argument "email" to "User" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/user.py:68: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/user.py:72: error: Argument "text" to "User" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/user.py:72: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/user.py:107: error: Argument "name" to "User" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/user.py:107: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
+ alerta/models/user.py:108: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/user.py:109: error: Argument "password" to "User" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/user.py:109: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/user.py:110: error: Argument "email" to "User" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/user.py:110: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
- alerta/models/user.py:116: error: Argument "text" to "User" has incompatible type "Any | None"; expected "str" [arg-type]
+ alerta/models/user.py:116: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "str" [arg-type]
rich (https://github.com/Textualize/rich)
+ rich/markdown.py:163: error: Incompatible types in assignment (expression has type "str", variable has type "Literal['default', 'left', 'center', 'right', 'full'] | None") [assignment]
cibuildwheel (https://github.com/pypa/cibuildwheel)
+ cibuildwheel/options.py:526: error: No overload variant of "get" of "dict" matches argument types "str", "dict[Never, Never]" [call-overload]
+ cibuildwheel/options.py:526: note: Possible overload variants:
+ cibuildwheel/options.py:526: note: def get(self, Never, /) -> None
+ cibuildwheel/options.py:526: note: def [_T] get(self, Never, _T, /) -> _T
+ cibuildwheel/__main__.py:307: error: Argument 2 to "get" of "_Environ" has incompatible type "Literal['']"; expected "Literal['auto', 'linux', 'macos', 'windows'] | None" [arg-type]
pyppeteer (https://github.com/pyppeteer/pyppeteer)
+ pyppeteer/connection.py:117: error: Need type annotation for "params" [var-annotated]
+ pyppeteer/connection.py:121: error: Argument 1 to "get" of "dict" has incompatible type "Any | None"; expected "str" [arg-type]
+ pyppeteer/connection.py:123: error: Argument 1 to "_on_message" of "CDPSession" has incompatible type "Any | None"; expected "str" [arg-type]
+ pyppeteer/connection.py:125: error: Argument 1 to "get" of "dict" has incompatible type "Any | None"; expected "str" [arg-type]
+ pyppeteer/connection.py:128: error: Argument 1 to "__delitem__" of "dict" has incompatible type "Any | None"; expected "str" [arg-type]
+ pyppeteer/helper.py:44: error: Need type annotation for "stackTrace" [var-annotated]
+ pyppeteer/helper.py:46: error: Item "None" of "Any | None" has no attribute "__iter__" (not iterable) [union-attr]
+ pyppeteer/page.py:212: error: Need type annotation for "entry" [var-annotated]
+ pyppeteer/page.py:215: error: Need type annotation for "args" [var-annotated]
+ pyppeteer/page.py:1369: error: Need type annotation for "marginOptions" [var-annotated]
+ pyppeteer/network_manager.py:213: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ pyppeteer/network_manager.py:213: note: Possible overload variants:
+ pyppeteer/network_manager.py:213: note: def get(self, Never, /) -> None
+ pyppeteer/network_manager.py:213: note: def [_T] get(self, Never, _T, /) -> _T
+ pyppeteer/network_manager.py:265: error: Need type annotation for "_resp" [var-annotated]
+ pyppeteer/network_manager.py:269: error: Argument 5 to "Response" has incompatible type "Any | None"; expected "bool" [arg-type]
+ pyppeteer/network_manager.py:270: error: Argument 6 to "Response" has incompatible type "Any | None"; expected "bool" [arg-type]
+ pyppeteer/network_manager.py:271: error: Argument 7 to "Response" has incompatible type "Any | None"; expected "dict[Any, Any]" [arg-type]
+ pyppeteer/network_manager.py:342: error: Need type annotation for "headers" [var-annotated]
+ pyppeteer/network_manager.py:498: error: Argument 1 to "get" of "dict" has incompatible type "Any | int"; expected "str" [arg-type]
+ pyppeteer/network_manager.py:707: error: Need type annotation for "_hash" [var-annotated]
+ pyppeteer/network_manager.py:727: error: Unsupported target for indexed assignment ("dict[Any, Any] | Any | str | None") [index]
+ pyppeteer/launcher.py:381: error: Need type annotation for "args" [var-annotated]
+ pyppeteer/element_handle.py:285: error: Need type annotation for "model" [var-annotated]
+ pyppeteer/element_handle.py:287: error: Argument 1 to "_fromProtocolQuad" of "ElementHandle" has incompatible type "Any | None"; expected "list[int]" [arg-type]
+ pyppeteer/element_handle.py:288: error: Argument 1 to "_fromProtocolQuad" of "ElementHandle" has incompatible type "Any | None"; expected "list[int]" [arg-type]
+ pyppeteer/element_handle.py:289: error: Argument 1 to "_fromProtocolQuad" of "ElementHandle" has incompatible type "Any | None"; expected "list[int]" [arg-type]
+ pyppeteer/element_handle.py:290: error: Argument 1 to "_fromProtocolQuad" of "ElementHandle" has incompatible type "Any | None"; expected "list[int]" [arg-type]
+ pyppeteer/coverage.py:260: error: Need type annotation for "header" [var-annotated]
rotki (https://github.com/rotki/rotki)
+ rotkehlchen/chain/evm/decoding/superfluid/utils.py:65: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ rotkehlchen/chain/evm/decoding/superfluid/utils.py:65: note: Possible overload variants:
+ rotkehlchen/chain/evm/decoding/superfluid/utils.py:65: note: def get(self, Never, /) -> None
+ rotkehlchen/chain/evm/decoding/superfluid/utils.py:65: note: def [_T] get(self, Never, _T, /) -> _T
+ rotkehlchen/externalapis/hyperliquid.py:127: error: No overload variant of "get" of "dict" matches argument types "str", "int" [call-overload]
+ rotkehlchen/externalapis/hyperliquid.py:127: note: Possible overload variants:
+ rotkehlchen/externalapis/hyperliquid.py:127: note: def get(self, Never, /) -> None
+ rotkehlchen/externalapis/hyperliquid.py:127: note: def [_T] get(self, Never, _T, /) -> _T
+ rotkehlchen/chain/ethereum/modules/lido_csm/metrics.py:163: error: Need type annotation for "values" [var-annotated]
+ rotkehlchen/externalapis/alchemy.py:338: error: Need type annotation for "data" [var-annotated]
+ rotkehlchen/exchanges/coinbase.py:958: error: Need type annotation for "raw_network" [var-annotated]
+ rotkehlchen/exchanges/coinbase.py:1059: error: Need type annotation for "amount_data" [var-annotated]
+ rotkehlchen/exchanges/coinbase.py:1062: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
+ rotkehlchen/exchanges/coinbase.py:1062: note: Possible overload variants:
+ rotkehlchen/exchanges/coinbase.py:1062: note: def get(self, Never, /) -> None
+ rotkehlchen/exchanges/coinbase.py:1062: note: def [_T] get(self, Never, _T, /) -> _T
+ rotkehlchen/externalapis/opensea.py:388: error: Need type annotation for "payment_tokens" [var-annotated]
+ rotkehlchen/tests/utils/kraken.py:580: error: Argument 2 to "get" of "dict" has incompatible type "int"; expected "Timestamp" [arg-type]
+ rotkehlchen/tests/utils/kraken.py:581: error: Argument 2 to "get" of "dict" has incompatible type "Callable[[], Timestamp]"; expected "Timestamp" [arg-type]
+ rotkehlchen/tests/utils/kraken.py:600: error: Unsupported operand types for > ("int" and "Callable[[], Timestamp]") [operator]
+ rotkehlchen/tests/utils/kraken.py:600: note: Right operand is of type "Any | Callable[[], Timestamp]"
+ rotkehlchen/exchanges/coinbaseprime.py:147: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ rotkehlchen/exchanges/coinbaseprime.py:147: note: Possible overload variants:
+ rotkehlchen/exchanges/coinbaseprime.py:147: note: def get(self, Never, /) -> None
+ rotkehlchen/exchanges/coinbaseprime.py:147: note: def [_T] get(self, Never, _T, /) -> _T
+ rotkehlchen/exchanges/coinbaseprime.py:149: error: No overload variant of "get" of "dict" matches argument type "str" [call-overload]
+ rotkehlchen/exchanges/coinbaseprime.py:149: note: Possible overload variants:
+ rotkehlchen/exchanges/coinbaseprime.py:149: note: def get(self, Never, /) -> None
+ rotkehlchen/exchanges/coinbaseprime.py:149: note: def [_T] get(self, Never, _T, /) -> _T
+ rotkehlchen/api/v1/schemas.py:3354: error: Need type annotation for "block_numbers" [var-annotated]
spack (https://github.com/spack/spack)
+ lib/spack/spack/util/environment.py:847: error: Need type annotation for "exclude" [var-annotated]
+ lib/spack/spack/util/environment.py:848: error: Need type annotation for "include" [var-annotated]
+ lib/spack/spack/mirrors/mirror.py:312: error: Need type annotation for "value" [var-annotated]
+ lib/spack/spack/fetch_strategy.py:351: error: Need type annotation for "mirrors" [var-annotated]
+ lib/spack
... (truncated 892 lines) ... |
|
I'm afraid this won't be solvable from typeshed's sides without producing a lot of churn. It seems to me that the stubs due to historic reasons and Get signature should imo just look like so: @overload
def get(self, key: K, /) -> V | None: ...
@overload
def get[T](self, key: K, default: T, /) -> V | T: ...or even just (python/typing#2213): def get[S=None](self, key, default: S = None) -> T | S: ...but not this convoluted mess ... @overload
def get(self, key: _KT, default: None = None, /) -> _VT | None: ...
@overload
def get(self, key: _KT, default: _VT, /) -> _VT: ...
@overload
def get(self, key: _KT, default: _T, /) -> _VT | _T: ... |
|
This could be fixed without explicit variance by just typing it accurately: One common use of this is for using a dict to transform a token stream, leaving tokens of kinds not transformed unaltered. ( The actual signature of get for mapping should be should be: class Mapping[K, V]:
def get[D](self, key: Hashable, default: D = None, /) -> V | D: ... |
|
Well yes that is essentially the Using There were some strong opinions against using |
|
I don't really agree with not using hashable, but I'm aware there are issues with how type checkers allow removing hashability in subtypes. Would be better to move any special casing here to Hashable until it's resolved, but still use Hashable so that any type checker capable of detecting that is enabled to. the typeshed should really reflect runtime reality, while typecheckers should then handle any exceptions they need themselves |
Fixes #15500
I wanted to add a test, but I am not sure how to add a test that only runs with python 3.12+, which is required to check automatic inference behavior.