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

remove support for relative imports that are not prefixed with a . #85

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

DetachHead
Copy link
Owner

fixes #76

This comment has been minimized.

@DetachHead DetachHead force-pushed the fix-invalid-relative-imports branch from 187b631 to 73d2856 Compare February 13, 2024 04:25

This comment has been minimized.

@DetachHead DetachHead force-pushed the fix-invalid-relative-imports branch from 73d2856 to c962278 Compare February 13, 2024 04:38

This comment has been minimized.

This comment has been minimized.

@DetachHead DetachHead force-pushed the fix-invalid-relative-imports branch from 01a02f8 to 2bff9cb Compare February 13, 2024 07:20

This comment has been minimized.

@DetachHead DetachHead force-pushed the fix-invalid-relative-imports branch from 2bff9cb to 930487f Compare February 13, 2024 08:06
Copy link
Contributor

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

mypy-protobuf (https://github.com/dropbox/mypy-protobuf)
+   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/dummy_pb2_grpc.pyi:7:8 - error: Import "grpc" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/dummy_pb2_grpc.pyi:23:51 - error: "Channel" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/dummy_pb2_grpc.pyi:24:22 - error: "UnaryUnaryMultiCallable" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/dummy_pb2_grpc.pyi:29:23 - error: "UnaryStreamMultiCallable" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/dummy_pb2_grpc.pyi:34:23 - error: "StreamUnaryMultiCallable" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/dummy_pb2_grpc.pyi:39:24 - error: "StreamStreamMultiCallable" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/dummy_pb2_grpc.pyi:101:98 - error: "Server" is not a known member of module "grpc" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/import_pb2_grpc.pyi:8:8 - error: Import "grpc" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/import_pb2_grpc.pyi:24:51 - error: "Channel" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/import_pb2_grpc.pyi:25:22 - error: "UnaryUnaryMultiCallable" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/import_pb2_grpc.pyi:30:23 - error: "UnaryUnaryMultiCallable" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/import_pb2_grpc.pyi:35:21 - error: "UnaryUnaryMultiCallable" is not a known member of module "grpc" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/mypy-protobuf/test/generated/testproto/grpc/import_pb2_grpc.pyi:82:100 - error: "Server" is not a known member of module "grpc" (reportAttributeAccessIssue)
- 21 errors, 24 warnings, 0 notes 
+ 12 errors, 24 warnings, 0 notes 

pandera (https://github.com/pandera-dev/pandera)
+   /tmp/mypy_primer/projects/pandera/pandera/api/extensions.py:10:8 - error: Import "pandas" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandera/pandera/api/extensions.py:198:31 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/extensions.py:198:45 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/extensions.py:208:13 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/extensions.py:208:27 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/extensions.py:210:18 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/extensions.py:210:32 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandera/pandera/api/base/checks.py:19:8 - error: Import "pandas" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandera/pandera/api/base/checks.py:35:8 - error: "core" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/base/checks.py:36:8 - error: "core" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/base/checks.py:39:27 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/base/checks.py:39:48 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/base/checks.py:40:30 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/base/checks.py:40:54 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:6:8 - error: Import "pandas" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:143:29 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:143:40 - error: "Index" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:144:19 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:144:30 - error: "Index" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:195:29 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:195:43 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:202:19 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:202:33 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:284:46 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:284:57 - error: "Index" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:284:67 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:379:23 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:386:13 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:461:28 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:472:24 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:474:40 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/array.py:481:24 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:6:8 - error: Import "pandas" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:144:23 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:151:13 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:181:33 - error: "Index" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:181:43 - error: "MultiIndex" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:192:59 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:230:40 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:268:29 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:268:43 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:275:19 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:275:33 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:337:47 - error: "Index" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:464:29 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:464:43 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:471:19 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/components.py:471:33 - error: "Series" is not a known member of module "pandas" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:11:8 - error: Import "pandas" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:244:40 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:282:42 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:282:59 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:287:23 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:294:13 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:387:23 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:394:13 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:417:23 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/container.py:1379:13 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/model.py:24:8 - error: Import "pandas" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/model.py:295:23 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandera/pandera/api/pandas/model.py:662:16 - error: "DataFrame" is not a known member of module "pandas" (reportAttributeAccessIssue)

... (truncated 198 lines) ...

pandas (https://github.com/pandas-dev/pandas)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/pickle_compat.py:180:18 - error: "array" is not a known member of module "numpy" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandas/pandas/compat/pickle_compat.py:15:8 - error: Import "numpy" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/pickle_compat.py:183:18 - error: "array" is not a known member of module "numpy" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/pyarrow.py:10:32 - error: "__version__" is not a known member of module "pyarrow" (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandas/pandas/compat/pyarrow.py:8:12 - error: Import "pyarrow" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/__init__.py:4:8 - error: Import "numpy" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/__init__.py:9:18 - error: "__version__" is not a known member of module "numpy" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/__init__.py:41:22 - error: "int_" is not a known member of module "numpy" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/__init__.py:42:23 - error: "uint" is not a known member of module "numpy" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/__init__.py:44:18 - error: "int_" is not a known member of module "numpy" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/__init__.py:45:19 - error: "uint" is not a known member of module "numpy" (reportAttributeAccessIssue)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/function.py:29:19 - error: "ndarray" is unknown import symbol (reportAttributeAccessIssue)
+   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/function.py:28:8 - error: Import "numpy" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/function.py:29:6 - error: Import "numpy" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/pandas/pandas/compat/numpy/function.py:232:32 - error: "bool_" is not a known member of module "numpy" (reportAttributeAccessIssue)
- 1880 errors, 3 warnings, 0 notes 
+ 1875 errors, 3 warnings, 0 notes 

bidict (https://github.com/jab/bidict)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:29:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:29:34 - error: Type of "BB" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:30:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:30:34 - error: Type of "BT" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:31:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:31:34 - error: Type of "KT" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:32:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:32:34 - error: Type of "MBT" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:33:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
-   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:33:34 - error: Type of "SET_OPS" is Any (reportAny)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:33:34 - error: Type of "SET_OPS" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:34:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:34:34 - error: Type of "VT" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:35:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:35:34 - error: Type of "Oracle" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:36:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:36:34 - error: Type of "SupportsKeysAndGetItem" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:37:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:37:34 - error: Type of "UserBiNotOwnInv" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:38:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:38:34 - error: Type of "UserOrderedBi" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:39:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:39:34 - error: Type of "bidict_types" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:40:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:40:34 - error: Type of "dedup" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:41:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:41:34 - error: Type of "mutable_bidict_types" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:42:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:42:34 - error: Type of "should_be_reversible" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:43:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:43:34 - error: Type of "update_arg_types" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:44:6 - error: Import "bidict_test_fixtures" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:44:34 - error: Type of "zip_equal" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:108:33 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:108:33 - error: Type of "data" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:109:9 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:109:9 - error: Type of "assert_match" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:117:9 - error: Type of "expect" is partially unknown
+     Type of "expect" is "Any | Unknown" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:117:26 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:117:26 - error: Type of "data" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:117:26 - error: Argument type is unknown
+     Argument corresponds to parameter "__o" in function "getattr" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:117:85 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:117:85 - error: Type of "data_inv" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:117:85 - error: Type of "keys" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:118:34 - error: Argument type is partially unknown
+     Argument corresponds to parameter "__obj" in function "len"
+     Argument type is "Any | Unknown" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:120:30 - error: Argument type is Any
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:122:39 - error: Argument type is partially unknown
-     Argument corresponds to parameter "i1" in function "zip_equal" (reportAny)
+     Argument corresponds to parameter "__iterable" in function "__new__"
+     Argument type is "Any | Unknown" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:125:12 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:125:12 - error: Type of "data" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:126:13 - error: Type of "contained" is partially unknown
+     Type of "contained" is "Any | Unknown" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:126:43 - error: Argument type is partially unknown
+     Argument corresponds to parameter "__iterable" in function "__new__"
+     Argument type is "Any | Unknown" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:135:49 - error: Argument type is Any
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:135:43 - error: Argument type is unknown
-     Argument corresponds to parameter "x" in function "dedup" (reportAny)
+     Argument corresponds to parameter "arg" in function "__init__" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:145:32 - error: Return type of lambda is unknown (reportUnknownLambdaType)
-   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:145:53 - error: Argument type is unknown
-     Argument corresponds to parameter "bi_t" in function "should_be_reversible" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:151:58 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:151:58 - error: Type of "data" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:151:58 - error: Argument type is unknown
+     Argument corresponds to parameter "__sequence" in function "__init__" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:152:66 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:152:66 - error: Type of "data" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:152:66 - error: Type of "items" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:152:66 - error: Argument type is unknown
+     Argument corresponds to parameter "__sequence" in function "__init__" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:153:67 - error: Type of "oracle" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:153:67 - error: Type of "data" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:153:67 - error: Type of "values" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:153:67 - error: Argument type is unknown
+     Argument corresponds to parameter "__sequence" in function "__init__" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/bidict/tests/test_bidict.py:171:9 - error: Type of "oracle" is unknown (reportUnknownMemberType)

... (truncated 198 lines) ...

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_common.py:12:10 - error: Import "conftest" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_common.py:12:26 - error: Type of "PytestRobotTester" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_common.py:15:34 - error: Type of parameter "pr" is unknown (reportUnknownParameterType)
-   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_common.py:16:5 - error: Type of "run_and_assert_result" is partially unknown
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_common.py:16:5 - error: Type of "run_and_assert_result" is unknown (reportUnknownMemberType)
-     Type of "run_and_assert_result" is "(*, pytest_args: list[str] | None = None, subprocess: bool = True, passed: int = 0, skipped: int = 0, failed: int = 0, errors: int = 0, xfailed: int = 0, exit_code: Unknown | None = None) -> None" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_common.py:17:5 - error: Type of "assert_log_file_exists" is unknown (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_common.py:16:40 - error: Argument type is unknown
-     Argument corresponds to parameter "exit_code" in function "run_and_assert_result" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:17:10 - error: Import "conftest" could not be resolved (reportMissingImports)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:17:26 - error: Type of "PytestRobotTester" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:21:26 - error: Type of parameter "pr" is partially unknown
+     Parameter type is "PytestRobotTester | Unknown" (reportUnknownParameterType)
-     Type of "run_and_assert_result" is "(*, pytest_args: list[str] | None = None, subprocess: bool = True, passed: int = 0, skipped: int = 0, failed: int = 0, errors: int = 0, xfailed: int = 0, exit_code: Unknown | None = None) -> None" (reportUnknownMemberType)
+     Type of "run_and_assert_result" is "((*, pytest_args: list[str] | None = None, subprocess: bool = True, passed: int = 0, skipped: int = 0, failed: int = 0, errors: int = 0, xfailed: int = 0, exit_code: Unknown | None = None) -> None) | Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:22:5 - error: Result of call expression is of type "Unknown | None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:23:5 - error: Type of "assert_log_file_exists" is partially unknown
+     Type of "assert_log_file_exists" is "((*, check_xdist: bool = True) -> None) | Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:23:5 - error: Result of call expression is of type "Unknown | None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:26:25 - error: Type of parameter "pr" is partially unknown
+     Parameter type is "PytestRobotTester | Unknown" (reportUnknownParameterType)
-     Type of "run_and_assert_result" is "(*, pytest_args: list[str] | None = None, subprocess: bool = True, passed: int = 0, skipped: int = 0, failed: int = 0, errors: int = 0, xfailed: int = 0, exit_code: Unknown | None = None) -> None" (reportUnknownMemberType)
+     Type of "run_and_assert_result" is "((*, pytest_args: list[str] | None = None, subprocess: bool = True, passed: int = 0, skipped: int = 0, failed: int = 0, errors: int = 0, xfailed: int = 0, exit_code: Unknown | None = None) -> None) | Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:27:5 - error: Result of call expression is of type "Unknown | None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:28:5 - error: Type of "assert_log_file_exists" is partially unknown
+     Type of "assert_log_file_exists" is "((*, check_xdist: bool = True) -> None) | Unknown" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:28:5 - error: Result of call expression is of type "Unknown | None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/pytest-robotframework/tests/test_robot.py:31:27 - error: Type of parameter "pr" is partially unknown
+     Parameter type is "PytestRobotTester | Unknown" (reportUnknownParameterType)

... (truncated 203 lines) ...```

@DetachHead DetachHead merged commit 84b0136 into main Feb 14, 2024
10 checks passed
@DetachHead DetachHead deleted the fix-invalid-relative-imports branch February 14, 2024 07:18
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.

pyright incorrectly adds the script directory to the module search path
1 participant