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

Started to formalize rules for narrowing Any. Needs more work. #5467

Closed
wants to merge 1 commit into from

Conversation

erictraut
Copy link
Collaborator

No description provided.

@erictraut erictraut closed this Jul 11, 2023
@github-actions
Copy link
Contributor

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

steam.py (https://github.com/Gobot1234/steam.py)
-   /tmp/mypy_primer/projects/steam.py/scripts/blacken_docs_correctly.py:37:19 - error: Type of "get" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/steam.py/scripts/blacken_docs_correctly.py:37:19 - error: Type of "get" is partially unknown
-     Type of "get" is "Unknown | Overload[(__key: str, /) -> (Any | None), (__key: str, __default: Any | _T@get, /) -> (Any | _T@get)]" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/steam.py/scripts/blacken_docs_correctly.py:38:66 - error: Type of "get" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/steam.py/scripts/blacken_docs_correctly.py:38:66 - error: Type of "get" is partially unknown
-     Type of "get" is "Unknown | Overload[(__key: str, /) -> (Any | None), (__key: str, __default: Any | _T@get, /) -> (Any | _T@get)]" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/steam.py/scripts/blacken_docs_correctly.py:38:42 - error: Type of "upper" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/steam.py/scripts/blacken_docs_correctly.py:38:42 - error: Type of "upper" is partially unknown
-     Type of "upper" is "Unknown | Any" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/steam.py/steam/gateway.py:843:55 - error: Operator "in" not supported for types "int" and "Iterable[ID64]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/steam.py/tests/unit/test_commands.py:172:62 - error: "qualified_name" is not a known member of "None" (reportOptionalMemberAccess)
- 8737 errors, 49 warnings, 0 informations 
+ 8733 errors, 49 warnings, 0 informations 

koda-validate (https://github.com/keithasaurus/koda-validate)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/dataclasses.py:146:37 - error: Operator "in" not supported for types "str" and "Dict[str, Validator[Any]] | None"
+     Operator "in" not supported for types "str" and "None" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/dataclasses.py:146:17 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/generic.py:195:16 - error: Expression of type "AlwaysValid[Any] | None" cannot be assigned to return type "AlwaysValid[A@AlwaysValid]"
+     Type "AlwaysValid[Any] | None" cannot be assigned to type "AlwaysValid[A@AlwaysValid]"
+       Type "None" cannot be assigned to type "AlwaysValid[A@AlwaysValid]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/generic.py:320:16 - error: Expression of type "NotBlank[Any] | None" cannot be assigned to return type "NotBlank[StrOrBytes@NotBlank]"
+     Type "NotBlank[Any] | None" cannot be assigned to type "NotBlank[StrOrBytes@NotBlank]"
+       Type "None" cannot be assigned to type "NotBlank[StrOrBytes@NotBlank]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/namedtuple.py:139:37 - error: Operator "in" not supported for types "str" and "Dict[str, Validator[Any]] | None"
+     Operator "in" not supported for types "str" and "None" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/namedtuple.py:139:17 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+ /tmp/mypy_primer/projects/koda-validate/koda_validate/typeddict.py
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/typeddict.py:143:37 - error: Operator "in" not supported for types "str" and "Dict[str, Validator[Any]] | None"
+     Operator "in" not supported for types "str" and "None" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/koda-validate/koda_validate/typeddict.py:143:17 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
- 172 errors, 5 warnings, 0 informations 
+ 180 errors, 5 warnings, 0 informations 

pydantic (https://github.com/samuelcolvin/pydantic)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:480:62 - error: Argument of type "JsonSchemaValue | None" cannot be assigned to parameter "json_schema" of type "JsonSchemaValue" in function "populate_defs"
+     Type "JsonSchemaValue | None" cannot be assigned to type "JsonSchemaValue"
+       Type "None" cannot be assigned to type "JsonSchemaValue" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:481:49 - error: Argument of type "JsonSchemaValue | None" cannot be assigned to parameter "json_schema" of type "JsonSchemaValue" in function "convert_to_all_of"
+     Type "JsonSchemaValue | None" cannot be assigned to type "JsonSchemaValue"
+       Type "None" cannot be assigned to type "JsonSchemaValue" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pydantic/pydantic/json_schema.py:482:20 - error: Expression of type "JsonSchemaValue | None" cannot be assigned to return type "JsonSchemaValue"
+     Type "JsonSchemaValue | None" cannot be assigned to type "JsonSchemaValue"
+       Type "None" cannot be assigned to type "JsonSchemaValue" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pydantic/pydantic/main.py:216:17 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/pydantic/pydantic/main.py:253:25 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/pydantic/pydantic/main.py:1109:27 - error: "pop" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/pydantic/pydantic/main.py:1112:21 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/pydantic/pydantic/_internal/_generate_schema.py:1314:86 - error: Argument of type "Iterable[Any]" cannot be assigned to parameter "annotations" of type "tuple[Any, ...]" in function "_get_prepare_pydantic_annotations_for_known_type"
+     "Iterable[Any]" is incompatible with "tuple[Any, ...]" (reportGeneralTypeIssues)
- 66 errors, 0 warnings, 0 informations 
+ 74 errors, 0 warnings, 0 informations 

Tanjun (https://github.com/FasterSpeeding/Tanjun)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/annotations.py:454:33 - error: Argument of type "_ConverterSig[Any] | Sequence[_ConverterSig[Any]]" cannot be assigned to parameter "_str_converters" of type "Sequence[_ConverterSig[Any]]" in function "__init__"
+     Type "_ConverterSig[Any] | Sequence[_ConverterSig[Any]]" cannot be assigned to type "Sequence[_ConverterSig[Any]]"
+       "function" is incompatible with "Sequence[_ConverterSig[Any]]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/annotations.py:1551:80 - error: "_ConverterSig[_T@__getitem__]" is not iterable (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/annotations.py:1551:80 - warning: Argument type is unknown
+     Argument corresponds to parameter "converter" in function "__init__" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/annotations.py:1551:80 - warning: Argument type is unknown
+     Argument corresponds to parameter "other_converters" in function "__init__" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:571:32 - error: Argument of type "str" cannot be assigned to parameter "__s" of type "slice" in function "__getitem__"
+     "str" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:575:25 - error: Argument of type "str" cannot be assigned to parameter "__key" of type "slice" in function "__setitem__"
+     "str" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:575:25 - error: Argument of type "_TreeT" cannot be assigned to parameter "__value" of type "Iterable[tuple[list[str], MessageCommand[Any]]]" in function "__setitem__"
+     "_TreeT" is incompatible with "Iterable[tuple[list[str], MessageCommand[Any]]]"
+       TypeVar "_T_co@Iterable" is covariant
+         Type "str | _IndexKeys" cannot be assigned to type "tuple[list[str], MessageCommand[Any]]"
+           "_IndexKeys" is incompatible with "tuple[list[str], MessageCommand[Any]]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:584:32 - error: Argument of type "Literal[_IndexKeys.COMMANDS]" cannot be assigned to parameter "__s" of type "slice" in function "__getitem__"
+     "Literal[_IndexKeys.COMMANDS]" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:584:21 - warning: Type of "commands" is partially unknown
+     Type of "commands" is "dict[str | _IndexKeys, _TreeT | list[tuple[list[str], MessageCommand[Any]]]] | list[tuple[list[str], MessageCommand[Any]]] | Unknown" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:588:21 - error: Argument of type "Literal[_IndexKeys.COMMANDS]" cannot be assigned to parameter "__key" of type "slice" in function "__setitem__"
+     "Literal[_IndexKeys.COMMANDS]" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:652:24 - error: Argument of type "str" cannot be assigned to parameter "__s" of type "slice" in function "__getitem__"
+     "str" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:715:27 - error: Argument of type "Literal[_IndexKeys.COMMANDS]" cannot be assigned to parameter "__s" of type "slice" in function "__getitem__"
+     "Literal[_IndexKeys.COMMANDS]" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:702:28 - error: Argument of type "str" cannot be assigned to parameter "__s" of type "slice" in function "__getitem__"
+     "str" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:715:17 - warning: Type of "entries" is partially unknown
+     Type of "entries" is "dict[str | _IndexKeys, _TreeT | list[tuple[list[str], MessageCommand[Any]]]] | list[tuple[list[str], MessageCommand[Any]]] | Unknown" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:718:24 - error: Argument of type "Literal[_IndexKeys.COMMANDS]" cannot be assigned to parameter "__s" of type "slice" in function "__getitem__"
+     "Literal[_IndexKeys.COMMANDS]" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:719:25 - error: Argument of type "Literal[_IndexKeys.COMMANDS]" cannot be assigned to parameter "__key" of type "SupportsIndex | slice" in function "__delitem__"
+     Type "Literal[_IndexKeys.COMMANDS]" cannot be assigned to type "SupportsIndex | slice"
+       "Literal[_IndexKeys.COMMANDS]" is incompatible with protocol "SupportsIndex"
+         "__index__" is not present
+       "Literal[_IndexKeys.COMMANDS]" is incompatible with "slice" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:727:35 - error: Cannot access member "get" for type "list[tuple[list[str], MessageCommand[Any]]]"
+     Member "get" is unknown (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:727:30 - warning: Type of "get" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:727:30 - warning: Type of "get" is partially unknown
+     Type of "get" is "Overload[(__key: str | _IndexKeys, /) -> (dict[str | _IndexKeys, _TreeT | list[tuple[list[str], MessageCommand[Any]]]] | list[tuple[list[str], MessageCommand[Any]]] | None), (__key: str | _IndexKeys, __default: dict[str | _IndexKeys, _TreeT | list[tuple[list[str], MessageCommand[Any]]]] | list[tuple[list[str], MessageCommand[Any]]] | _T@get, /) -> (dict[str | _IndexKeys, _TreeT | list[tuple[list[str], MessageCommand[Any]]]] | list[tuple[list[str], MessageCommand[Any]]] | _T@get)] | Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/_internal/__init__.py:727:21 - warning: Type of "parent" is partially unknown
+     Type of "parent" is "dict[str | _IndexKeys, _TreeT | list[tuple[list[str], MessageCommand[Any]]]] | list[tuple[list[str], MessageCommand[Any]]] | Unknown | None" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/commands/slash.py:1736:30 - error: "ConverterSig[float]" is not iterable (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/commands/slash.py:1736:30 - error: "ConverterSig[int]" is not iterable (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/commands/slash.py:1736:30 - error: "ConverterSig[str]" is not iterable (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/commands/slash.py:1736:17 - warning: Type of "converter" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/Tanjun/tanjun/commands/slash.py:1793:28 - error: Argument of type "_AnyConverterSig | Sequence[_AnyConverterSig]" cannot be assigned to parameter "converters" of type "list[_AnyConverterSig] | None" in function "__init__"
+     Type "_AnyConverterSig | Sequence[_AnyConverterSig]" cannot be assigned to type "list[_AnyConverterSig] | None"
+       Type "Sequence[_AnyConverterSig]" cannot be assigned to type "list[_AnyConverterSig] | None"
+         "Sequence[_AnyConverterSig]" is incompatible with "list[_AnyConverterSig]"
+         Type cannot be assigned to type "None" (reportGeneralTypeIssues)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:194:5 - warning: Type of "command" is partially unknown
-     Type of "command" is "Unknown | MessageCommand[Any]" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:198:37 - warning: Argument type is partially unknown
-     Argument corresponds to parameter "command" in function "with_annotated_args"
-     Argument type is "Unknown | MessageCommand[Any]" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:200:12 - warning: Type of "parser" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:200:12 - warning: Type of "parser" is partially unknown
-     Type of "parser" is "Unknown | MessageParser | None" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:201:23 - warning: Type of "wrapped_command" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:201:23 - warning: Type of "wrapped_command" is partially unknown
-     Type of "wrapped_command" is "Unknown | ExecutableCommand[Any] | None" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:202:12 - warning: Type of "wrapped_command" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:202:12 - warning: Type of "wrapped_command" is partially unknown
-     Type of "wrapped_command" is "Unknown | ExecutableCommand[Any] | None" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:203:12 - warning: Type of "wrapped_command" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:203:12 - warning: Type of "wrapped_command" is partially unknown
-     Type of "wrapped_command" is "Unknown | ExecutableCommand[Any] | None" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:210:5 - warning: Type of "command" is partially unknown
-     Type of "command" is "Unknown | MessageCommand[Any]" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/Tanjun/tests/test_annotations.py:214:37 - warning: Argument type is partially unknown
-     Argument corresponds to parameter "command" in function "with_annotated_args"

... (truncated 61 lines) ...

freqtrade (https://github.com/freqtrade/freqtrade)
+ /tmp/mypy_primer/projects/freqtrade/freqtrade/configuration/configuration.py
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/configuration/configuration.py:44:16 - error: Expression of type "Config | None" cannot be assigned to return type "Config"
+     Type "Config | None" cannot be assigned to type "Config"
+       Type "None" cannot be assigned to type "Config" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/freqtrade/freqtrade/resolvers/strategy_resolver.py
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/resolvers/strategy_resolver.py:43:23 - error: "get" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/resolvers/strategy_resolver.py:47:25 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/resolvers/strategy_resolver.py:49:35 - error: Argument of type "Config | None" cannot be assigned to parameter "config" of type "Config" in function "_load_strategy"
+     Type "Config | None" cannot be assigned to type "Config"
+       Type "None" cannot be assigned to type "Config" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/resolvers/strategy_resolver.py:50:30 - error: "get" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/resolvers/strategy_resolver.py:82:67 - error: Argument of type "Config | None" cannot be assigned to parameter "config" of type "Config" in function "_override_attribute_helper"
+     Type "Config | None" cannot be assigned to type "Config"
+       Type "None" cannot be assigned to type "Config" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/freqtrade/freqtrade/resolvers/strategy_resolver.py:88:65 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
- 759 errors, 54 warnings, 0 informations 
+ 766 errors, 54 warnings, 0 informations 

operator (https://github.com/canonical/operator)
+ /tmp/mypy_primer/projects/operator/ops/charm.py
+   /tmp/mypy_primer/projects/operator/ops/charm.py:1295:26 - error: "get" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/operator/ops/charm.py:1296:32 - error: "get" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/operator/ops/charm.py:1297:31 - error: "get" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/operator/ops/charm.py:1298:29 - error: "get" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/operator/ops/pebble.py:1568:81 - error: Argument of type "Dict[str, Any] | None" cannot be assigned to parameter "headers" of type "MutableMapping[str, str]" in function "__init__"
+     Type "Dict[str, Any] | None" cannot be assigned to type "MutableMapping[str, str]"
+       Type "None" cannot be assigned to type "MutableMapping[str, str]" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/operator/ops/testing.py
+   /tmp/mypy_primer/projects/operator/ops/testing.py:1685:53 - error: "name" is not a known member of "None" (reportOptionalMemberAccess)
- 3 errors, 0 warnings, 0 informations 
+ 9 errors, 0 warnings, 0 informations 

antidote (https://github.com/Finistere/antidote)
-   /tmp/mypy_primer/projects/antidote/src/antidote/core/_injection.py:78:31 - error: Type of "extra" is partially unknown
-     Type of "extra" is "Any | Unknown" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/antidote/src/antidote/core/_injection.py:78:69 - error: Argument type is partially unknown
-     Argument corresponds to parameter "x" in function "_is_dependency"
-     Argument type is "Any | Unknown" (reportUnknownArgumentType)
-     Type of "methods" is "dict[str, ((...) -> Any) | staticmethod[Any, Unknown] | classmethod[Any, (...), Unknown]]" (reportUnknownVariableType)
+     Type of "methods" is "Dict[str, ((...) -> Any) | staticmethod[Any, Unknown] | classmethod[Any, (...), Unknown]]" (reportUnknownVariableType)
-     Type of "methods" is "dict[str, ((...) -> Any) | staticmethod[Any, Unknown] | classmethod[Any, (...), Unknown]]" (reportUnknownVariableType)
+     Type of "methods" is "Dict[str, ((...) -> Any) | staticmethod[Any, Unknown] | classmethod[Any, (...), Unknown]]" (reportUnknownVariableType)
- 4272 errors, 76 warnings, 0 informations 
+ 4270 errors, 76 warnings, 0 informations 

pandera (https://github.com/pandera-dev/pandera)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:127:27 - error: Argument of type "Dict[Any, Unknown] | None" cannot be assigned to parameter "column_dict" of type "dict[Any, Unknown]" in function "_validate_columns"
+     Type "Dict[Any, Unknown] | None" cannot be assigned to type "dict[Any, Unknown]"
+       Type "None" cannot be assigned to type "dict[Any, Unknown]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:128:36 - error: Argument of type "Dict[Any, Unknown] | None" cannot be assigned to parameter "columns" of type "dict[Any, Unknown]" in function "_columns_renamed"
+     Type "Dict[Any, Unknown] | None" cannot be assigned to type "dict[Any, Unknown]"
+       Type "None" cannot be assigned to type "dict[Any, Unknown]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/model_components.py:268:12 - error: Expression of type "tuple[AnyCallable | classmethod[Unknown, (...), Unknown], classmethod[Unknown, (...), Unknown] | classmethod[Any, (), Any]]" cannot be assigned to return type "Tuple[AnyCallable, classmethod[Unknown, (...), Unknown]]"
+     Type "AnyCallable | classmethod[Unknown, (...), Unknown]" cannot be assigned to type "AnyCallable"
+       Type "classmethod[Unknown, (...), Unknown]" cannot be assigned to type "AnyCallable" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pyspark/container.py:116:27 - error: Argument of type "Dict[Any, Unknown] | None" cannot be assigned to parameter "column_dict" of type "dict[Any, Unknown]" in function "_validate_columns"
+     Type "Dict[Any, Unknown] | None" cannot be assigned to type "dict[Any, Unknown]"
+       Type "None" cannot be assigned to type "dict[Any, Unknown]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pyspark/container.py:117:36 - error: Argument of type "Dict[Any, Unknown] | None" cannot be assigned to parameter "columns" of type "dict[Any, Unknown]" in function "_columns_renamed"
+     Type "Dict[Any, Unknown] | None" cannot be assigned to type "dict[Any, Unknown]"
+       Type "None" cannot be assigned to type "dict[Any, Unknown]" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pyspark/model_components.py:244:12 - error: Expression of type "tuple[AnyCallable | classmethod[Unknown, (...), Unknown], classmethod[Unknown, (...), Unknown] | classmethod[Any, (), Any]]" cannot be assigned to return type "Tuple[AnyCallable, classmethod[Unknown, (...), Unknown]]"
+     Type "AnyCallable | classmethod[Unknown, (...), Unknown]" cannot be assigned to type "AnyCallable"
+       Type "classmethod[Unknown, (...), Unknown]" cannot be assigned to type "AnyCallable" (reportGeneralTypeIssues)
- 1041 errors, 10 warnings, 0 informations 
+ 1047 errors, 10 warnings, 0 informations 

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: Object of type "None" cannot be used as iterable value (reportOptionalIterable)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "Builds[((...) -> Any) -> ((...) -> Any)]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "ZenPartialBuilds[((...) -> Any) -> ((...) -> Any)]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "HydraPartialBuilds[((...) -> Any) -> ((...) -> Any)]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "Just[((...) -> Any) -> ((...) -> Any)]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "type[Builds[((...) -> Any) -> ((...) -> Any)]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "type[ZenPartialBuilds[((...) -> Any) -> ((...) -> Any)]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "type[HydraPartialBuilds[((...) -> Any) -> ((...) -> Any)]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "type[Just[((...) -> Any) -> ((...) -> Any)]]" is not iterable
+     "__iter__" method not defined (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1615:24 - error: "((...) -> Any) -> ((...) -> Any)" is not iterable (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1631:40 - error: Cannot access member "append" for type "Sequence[str | Builds[Any]]"
+     Member "append" is unknown (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1639:40 - error: Cannot access member "append" for type "Sequence[str | Builds[Any]]"
+     Member "append" is unknown (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1642:36 - error: Cannot access member "append" for type "Sequence[str | Builds[Any]]"
+     Member "append" is unknown (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1649:36 - error: Cannot access member "append" for type "Sequence[str | Builds[Any]]"
+     Member "append" is unknown (reportGeneralTypeIssues)
- 182 errors, 0 warnings, 0 informations 
+ 196 errors, 0 warnings, 0 informations 

discord.py (https://github.com/Rapptz/discord.py)
+ /tmp/mypy_primer/projects/discord.py/discord/file.py
+   /tmp/mypy_primer/projects/discord.py/discord/file.py:114:59 - error: Argument of type "str | None" cannot be assigned to parameter "filename" of type "str" in function "_strip_spoiler"
+     Type "str | None" cannot be assigned to type "str"
+       Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
+   /tmp/mypy_primer/projects/discord.py/discord/http.py:715:46 - error: "get" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/discord.py/discord/http.py:695:50 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/utils.py:1175:62 - error: Argument of type "Dict[str, Any] | None" cannot be assigned to parameter "cache" of type "Dict[str, Any]" in function "evaluate_annotation"
+     Type "Dict[str, Any] | None" cannot be assigned to type "Dict[str, Any]"
+       Type "None" cannot be assigned to type "Dict[str, Any]" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/discord.py/discord/ext/commands/core.py
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/core.py:464:106 - warning: Unnecessary "# type: ignore" comment
+ /tmp/mypy_primer/projects/discord.py/discord/ext/commands/hybrid.py
+   /tmp/mypy_primer/projects/discord.py/discord/ext/commands/hybrid.py:541:30 - error: "wrapped" is not a known member of "None" (reportOptionalMemberAccess)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:562:9 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:566:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:568:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:572:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:574:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:578:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:580:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:583:9 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:587:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
+   /tmp/mypy_primer/projects/discord.py/discord/webhook/async_.py:589:13 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)

... (truncated 41 lines) ...```

@erictraut erictraut deleted the issue5413 branch July 12, 2023 08:37
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.

2 participants