Debian Codegraph @

test_negative/output.expected.3.8.omit_linenos

raw
1 test_negative/negative_3.8.py: error: Missing positional argument "channel" in call to "DummyServiceStub" [call-arg]
2 test_negative/negative_3.8.py: error: "DummyReply" has no attribute "not_exists" [attr-defined]
3 test_negative/negative_3.8.py: error: "DummyReply" has no attribute "__iter__" (not iterable) [attr-defined]
4 test_negative/negative_3.8.py: error: "DummyReply" has no attribute "not_exists" [attr-defined]
5 test_negative/negative_3.8.py: error: "CallIterator[DummyReply]" has no attribute "value" [attr-defined]
6 test_negative/negative_3.8.py: error: Argument 1 to "__call__" of "StreamUnaryMultiCallable" has incompatible type "DummyRequest"; expected "Iterable[DummyRequest]" [arg-type]
7 test_negative/negative_3.8.py: error: "DummyReply" has no attribute "__iter__" (not iterable) [attr-defined]
8 test_negative/negative_3.8.py: error: Argument 1 to "__call__" of "StreamUnaryMultiCallable" has incompatible type "DummyRequest"; expected "Iterable[DummyRequest]" [arg-type]
9 test_negative/negative_3.8.py: error: Argument 1 to "__call__" of "StreamStreamMultiCallable" has incompatible type "DummyRequest"; expected "Iterable[DummyRequest]" [arg-type]
10 test_negative/negative_3.8.py: error: "DummyReply" has no attribute "not_exists" [attr-defined]
11 test_negative/negative_3.8.py: error: Argument 1 of "UnaryUnary" is incompatible with supertype "DummyServiceServicer"; supertype defines the argument type as "DummyRequest" [override]
12 test_negative/negative_3.8.py: note: This violates the Liskov substitution principle
13 test_negative/negative_3.8.py: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
14 test_negative/negative_3.8.py: error: Return type "Iterator[DummyReply]" of "UnaryUnary" incompatible with return type "DummyReply" in supertype "DummyServiceServicer" [override]
15 test_negative/negative_3.8.py: error: Argument 1 of "UnaryStream" is incompatible with supertype "DummyServiceServicer"; supertype defines the argument type as "DummyRequest" [override]
16 test_negative/negative_3.8.py: note: This violates the Liskov substitution principle
17 test_negative/negative_3.8.py: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
18 test_negative/negative_3.8.py: error: Return type "DummyReply" of "UnaryStream" incompatible with return type "Iterator[DummyReply]" in supertype "DummyServiceServicer" [override]
19 test_negative/negative_3.8.py: error: Argument 1 of "StreamUnary" is incompatible with supertype "DummyServiceServicer"; supertype defines the argument type as "Iterator[DummyRequest]" [override]
20 test_negative/negative_3.8.py: note: This violates the Liskov substitution principle
21 test_negative/negative_3.8.py: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
22 test_negative/negative_3.8.py: error: Return type "Iterator[DummyReply]" of "StreamUnary" incompatible with return type "DummyReply" in supertype "DummyServiceServicer" [override]
23 test_negative/negative.py: error: "Simple1" has no attribute "SerializeToStringg" [attr-defined]
24 test_negative/negative.py: error: Argument 1 to "ParseFromString" of "Message" has incompatible type "Simple1"; expected "bytes" [arg-type]
25 test_negative/negative.py: error: Argument 1 to "CopyFrom" of "Message" has incompatible type "bytes"; expected "Simple1" [arg-type]
26 test_negative/negative.py: error: Argument 1 to "extend" of "list" has incompatible type "RepeatedScalarFieldContainer[str]"; expected "Iterable[int]" [arg-type]
27 test_negative/negative.py: error: Argument "foo" to "TestMessage" has incompatible type "int"; expected "str" [arg-type]
28 test_negative/negative.py: error: Incompatible types in assignment (expression has type "int", variable has type "ValueType") [assignment]
29 test_negative/negative.py: error: Argument 1 to "HasField" of "Simple1" has incompatible type "Literal['garbage']"; expected "Union[Literal['a_boolean'], Literal[b'a_boolean'], Literal['a_enum'], Literal[b'a_enum'], Literal['a_external_enum'], Literal[b'a_external_enum'], Literal['a_inner'], Literal[b'a_inner'], Literal['a_nested'], Literal[b'a_nested'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['a_string'], Literal[b'a_string'], Literal['a_uint32'], Literal[b'a_uint32'], Literal['email'], Literal[b'email'], Literal['inner_enum'], Literal[b'inner_enum'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['inner_message'], Literal[b'inner_message'], Literal['nested_enum'], Literal[b'nested_enum'], Literal['nested_message'], Literal[b'nested_message'], Literal['no_package'], Literal[b'no_package'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof'], Literal['user_id'], Literal[b'user_id']]" [arg-type]
30 test_negative/negative.py: error: Argument 1 to "HasField" of "Simple1" has incompatible type "Literal['a_repeated_string']"; expected "Union[Literal['a_boolean'], Literal[b'a_boolean'], Literal['a_enum'], Literal[b'a_enum'], Literal['a_external_enum'], Literal[b'a_external_enum'], Literal['a_inner'], Literal[b'a_inner'], Literal['a_nested'], Literal[b'a_nested'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['a_string'], Literal[b'a_string'], Literal['a_uint32'], Literal[b'a_uint32'], Literal['email'], Literal[b'email'], Literal['inner_enum'], Literal[b'inner_enum'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['inner_message'], Literal[b'inner_message'], Literal['nested_enum'], Literal[b'nested_enum'], Literal['nested_message'], Literal[b'nested_message'], Literal['no_package'], Literal[b'no_package'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof'], Literal['user_id'], Literal[b'user_id']]" [arg-type]
31 test_negative/negative.py: error: Argument 1 to "HasField" of "SimpleProto3" has incompatible type "Literal['garbage']"; expected "Union[Literal['OuterMessage3'], Literal[b'OuterMessage3'], Literal['_an_optional_string'], Literal[b'_an_optional_string'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['an_optional_string'], Literal[b'an_optional_string'], Literal['b_oneof'], Literal[b'b_oneof'], Literal['b_oneof_1'], Literal[b'b_oneof_1'], Literal['b_oneof_2'], Literal[b'b_oneof_2'], Literal['bool'], Literal[b'bool'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message'], Literal[b'outer_message'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof']]" [arg-type]
32 test_negative/negative.py: error: Argument 1 to "HasField" of "SimpleProto3" has incompatible type "Literal['a_string']"; expected "Union[Literal['OuterMessage3'], Literal[b'OuterMessage3'], Literal['_an_optional_string'], Literal[b'_an_optional_string'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['an_optional_string'], Literal[b'an_optional_string'], Literal['b_oneof'], Literal[b'b_oneof'], Literal['b_oneof_1'], Literal[b'b_oneof_1'], Literal['b_oneof_2'], Literal[b'b_oneof_2'], Literal['bool'], Literal[b'bool'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message'], Literal[b'outer_message'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof']]" [arg-type]
33 test_negative/negative.py: error: Argument 1 to "HasField" of "SimpleProto3" has incompatible type "Literal['outer_enum']"; expected "Union[Literal['OuterMessage3'], Literal[b'OuterMessage3'], Literal['_an_optional_string'], Literal[b'_an_optional_string'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['an_optional_string'], Literal[b'an_optional_string'], Literal['b_oneof'], Literal[b'b_oneof'], Literal['b_oneof_1'], Literal[b'b_oneof_1'], Literal['b_oneof_2'], Literal[b'b_oneof_2'], Literal['bool'], Literal[b'bool'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message'], Literal[b'outer_message'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof']]" [arg-type]
34 test_negative/negative.py: error: Argument 1 to "HasField" of "SimpleProto3" has incompatible type "Literal['a_repeated_string']"; expected "Union[Literal['OuterMessage3'], Literal[b'OuterMessage3'], Literal['_an_optional_string'], Literal[b'_an_optional_string'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['an_optional_string'], Literal[b'an_optional_string'], Literal['b_oneof'], Literal[b'b_oneof'], Literal['b_oneof_1'], Literal[b'b_oneof_1'], Literal['b_oneof_2'], Literal[b'b_oneof_2'], Literal['bool'], Literal[b'bool'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message'], Literal[b'outer_message'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof']]" [arg-type]
35 test_negative/negative.py: error: Argument 1 to "ClearField" of "Simple1" has incompatible type "Literal['garbage']"; expected "Union[Literal['a_boolean'], Literal[b'a_boolean'], Literal['a_enum'], Literal[b'a_enum'], Literal['a_external_enum'], Literal[b'a_external_enum'], Literal['a_inner'], Literal[b'a_inner'], Literal['a_nested'], Literal[b'a_nested'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['a_repeated_string'], Literal[b'a_repeated_string'], Literal['a_string'], Literal[b'a_string'], Literal['a_uint32'], Literal[b'a_uint32'], Literal['email'], Literal[b'email'], Literal['email_by_uid'], Literal[b'email_by_uid'], Literal['inner_enum'], Literal[b'inner_enum'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['inner_message'], Literal[b'inner_message'], Literal['nested_enum'], Literal[b'nested_enum'], Literal['nested_message'], Literal[b'nested_message'], Literal['no_package'], Literal[b'no_package'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof'], Literal['rep_inner_enum'], Literal[b'rep_inner_enum'], Literal['rep_inner_message'], Literal[b'rep_inner_message'], Literal['user_id'], Literal[b'user_id']]" [arg-type]
36 test_negative/negative.py: error: Argument 1 to "ClearField" of "SimpleProto3" has incompatible type "Literal['garbage']"; expected "Union[Literal['OuterEnum'], Literal[b'OuterEnum'], Literal['OuterMessage3'], Literal[b'OuterMessage3'], Literal['_an_optional_string'], Literal[b'_an_optional_string'], Literal['a_oneof'], Literal[b'a_oneof'], Literal['a_oneof_1'], Literal[b'a_oneof_1'], Literal['a_oneof_2'], Literal[b'a_oneof_2'], Literal['a_outer_enum'], Literal[b'a_outer_enum'], Literal['a_repeated_string'], Literal[b'a_repeated_string'], Literal['a_string'], Literal[b'a_string'], Literal['an_optional_string'], Literal[b'an_optional_string'], Literal['b_oneof'], Literal[b'b_oneof'], Literal['b_oneof_1'], Literal[b'b_oneof_1'], Literal['b_oneof_2'], Literal[b'b_oneof_2'], Literal['bool'], Literal[b'bool'], Literal['inner_enum'], Literal[b'inner_enum'], Literal['inner_enum_in_oneof'], Literal[b'inner_enum_in_oneof'], Literal['map_message'], Literal[b'map_message'], Literal['map_scalar'], Literal[b'map_scalar'], Literal['outer_enum_in_oneof'], Literal[b'outer_enum_in_oneof'], Literal['outer_message'], Literal[b'outer_message'], Literal['outer_message_in_oneof'], Literal[b'outer_message_in_oneof']]" [arg-type]
37 test_negative/negative.py: error: Argument 1 to "WhichOneof" of "Simple1" has incompatible type "Literal['garbage']"; expected "Union[Literal['a_oneof'], Literal[b'a_oneof']]" [arg-type]
38 test_negative/negative.py: error: Incompatible types in assignment (expression has type "Union[Literal['a_oneof_1'], Literal['a_oneof_2'], Literal['outer_message_in_oneof'], Literal['outer_enum_in_oneof'], Literal['inner_enum_in_oneof'], None]", variable has type "int") [assignment]
39 test_negative/negative.py: error: Argument 1 to "HasField" of "Simple2" has incompatible type "Union[Literal['a_oneof_1'], Literal['a_oneof_2'], Literal['outer_message_in_oneof'], Literal['outer_enum_in_oneof'], Literal['inner_enum_in_oneof']]"; expected "Union[Literal['a_string'], Literal[b'a_string']]" [arg-type]
40 test_negative/negative.py: error: Incompatible types in assignment (expression has type "Union[Literal['a_oneof_1'], Literal['a_oneof_2'], Literal['outer_message_in_oneof'], Literal['outer_enum_in_oneof'], Literal['inner_enum_in_oneof'], None]", variable has type "str") [assignment]
41 test_negative/negative.py: error: No overload variant of "WhichOneof" of "SimpleProto3" matches argument type "str" [call-overload]
42 test_negative/negative.py: note: Possible overload variants:
43 test_negative/negative.py: note: def WhichOneof(self, oneof_group: Union[Literal['_an_optional_string'], Literal[b'_an_optional_string']]) -> Optional[Literal['an_optional_string']]
44 test_negative/negative.py: note: def WhichOneof(self, oneof_group: Union[Literal['a_oneof'], Literal[b'a_oneof']]) -> Union[Literal['a_oneof_1'], Literal['a_oneof_2'], Literal['outer_message_in_oneof'], Literal['outer_enum_in_oneof'], Literal['inner_enum_in_oneof'], None]
45 test_negative/negative.py: note: def WhichOneof(self, oneof_group: Union[Literal['b_oneof'], Literal[b'b_oneof']]) -> Union[Literal['b_oneof_1'], Literal['b_oneof_2'], None]
46 test_negative/negative.py: error: Incompatible types in assignment (expression has type "Union[Literal['a_oneof_1'], Literal['a_oneof_2'], Literal['outer_message_in_oneof'], Literal['outer_enum_in_oneof'], Literal['inner_enum_in_oneof'], None]", variable has type "int") [assignment]
47 test_negative/negative.py: error: Argument 1 to "HasField" of "Simple2" has incompatible type "Union[Literal['a_oneof_1'], Literal['a_oneof_2'], Literal['outer_message_in_oneof'], Literal['outer_enum_in_oneof'], Literal['inner_enum_in_oneof']]"; expected "Union[Literal['a_string'], Literal[b'a_string']]" [arg-type]
48 test_negative/negative.py: error: Incompatible types in assignment (expression has type "_ExtensionFieldDescriptor[Simple1, Extensions1]", variable has type "int") [assignment]
49 test_negative/negative.py: error: "Type[Extensions1]" has no attribute "bad" [attr-defined]
50 test_negative/negative.py: error: "Extensions1" has no attribute "foo" [attr-defined]
51 test_negative/negative.py: error: Incompatible types in assignment (expression has type "Extensions2", variable has type "Extensions1") [assignment]
52 test_negative/negative.py: error: Invalid index type "str" for "_ExtensionDict[Simple1]"; expected type "_ExtensionFieldDescriptor[Simple1, <nothing>]" [index]
53 test_negative/negative.py: error: Invalid index type "_ExtensionFieldDescriptor[Simple2, SeparateFileExtension]" for "_ExtensionDict[Simple1]"; expected type "_ExtensionFieldDescriptor[Simple1, SeparateFileExtension]" [index]
54 test_negative/negative.py: error: Unsupported operand types for in ("_ExtensionFieldDescriptor[Simple2, SeparateFileExtension]" and "_ExtensionDict[Simple1]") [operator]
55 test_negative/negative.py: error: Argument 1 to "__delitem__" of "_ExtensionDict" has incompatible type "_ExtensionFieldDescriptor[Simple2, SeparateFileExtension]"; expected "_ExtensionFieldDescriptor[Simple1, SeparateFileExtension]" [arg-type]
56 test_negative/negative.py: error: Argument 1 to "HasExtension" of "Message" has incompatible type "_ExtensionFieldDescriptor[Simple2, SeparateFileExtension]"; expected "_ExtensionFieldDescriptor[Simple1, Any]" [arg-type]
57 test_negative/negative.py: error: Argument 1 to "ClearExtension" of "Message" has incompatible type "_ExtensionFieldDescriptor[Simple1, Extensions1]"; expected "_ExtensionFieldDescriptor[Simple2, Any]" [arg-type]
58 test_negative/negative.py: error: Incompatible types in assignment (expression has type "int", variable has type "_ExtensionFieldDescriptor[Simple1, Any]") [assignment]
59 test_negative/negative.py: error: Incompatible types in assignment (expression has type "Union[Literal['b_oneof_1'], Literal['b_oneof_2'], None]", variable has type "Union[Literal['a_oneof_1'], Literal['a_oneof_2'], Literal['outer_message_in_oneof'], Literal['outer_enum_in_oneof'], Literal['inner_enum_in_oneof'], None]") [assignment]
60 test_negative/negative.py: error: "Descriptor" has no attribute "Garbage" [attr-defined]
61 test_negative/negative.py: error: "Descriptor" has no attribute "Garbage" [attr-defined]
62 test_negative/negative.py: error: "EnumDescriptor" has no attribute "Garbage" [attr-defined]
63 test_negative/negative.py: error: "FileDescriptor" has no attribute "Garbage" [attr-defined]
64 test_negative/negative.py: error: "ValueType" has no attribute "FOO" [attr-defined]
65 test_negative/negative.py: error: Argument 1 to "Name" of "_EnumTypeWrapper" has incompatible type "int"; expected "ValueType" [arg-type]
66 test_negative/negative.py: error: Argument 1 to "Name" of "_EnumTypeWrapper" has incompatible type "testproto.test3_pb2.SimpleProto3._InnerEnum.ValueType"; expected "testproto.test3_pb2._OuterEnum.ValueType" [arg-type]
67 test_negative/negative.py: error: Argument 1 to "Name" of "_EnumTypeWrapper" has incompatible type "testproto.test3_pb2.SimpleProto3._InnerEnum.ValueType"; expected "testproto.test3_pb2._OuterEnum.ValueType" [arg-type]
68 test_negative/negative.py: error: Argument 1 to "Name" of "_EnumTypeWrapper" has incompatible type "testproto.test3_pb2.SimpleProto3._InnerEnum.ValueType"; expected "testproto.test3_pb2._OuterEnum.ValueType" [arg-type]
69 test_negative/negative.py: error: "ScalarMap[int, str]" has no attribute "get_or_create" [attr-defined]
70 test_negative/negative.py: error: No overload variant of "get" of "Mapping" matches argument type "str" [call-overload]
71 test_negative/negative.py: note: Possible overload variants:
72 test_negative/negative.py: note: def get(self, key: int) -> Optional[str]
73 test_negative/negative.py: note: def [_T] get(self, int, Union[str, _T]) -> Union[str, _T]
74 test_negative/negative.py: error: No overload variant of "get" of "Mapping" matches argument type "str" [call-overload]
75 test_negative/negative.py: note: Possible overload variants:
76 test_negative/negative.py: note: def get(self, key: int) -> Optional[OuterMessage3]
77 test_negative/negative.py: note: def [_T] get(self, int, Union[OuterMessage3, _T]) -> Union[OuterMessage3, _T]
78 test_negative/negative.py: error: Incompatible types in assignment (expression has type "Optional[str]", variable has type "int") [assignment]
79 test_negative/negative.py: error: Incompatible types in assignment (expression has type "Optional[OuterMessage3]", variable has type "int") [assignment]
80 test_negative/negative.py: error: Dict entry 0 has incompatible type "str": "int"; expected "int": "str" [dict-item]
81 test_negative/negative.py: error: Dict entry 0 has incompatible type "str": "str"; expected "int": "OuterMessage3" [dict-item]
82 test_negative/negative.py: error: Incompatible types in assignment (expression has type "int", variable has type "UserId") [assignment]
83 test_negative/negative.py: error: Incompatible types in assignment (expression has type "str", variable has type "Email") [assignment]
84 test_negative/negative.py: error: Invalid index type "int" for "ScalarMap[UserId, Email]"; expected type "UserId" [index]
85 test_negative/negative.py: error: Incompatible types in assignment (expression has type "str", target has type "Email") [assignment]
86 test_negative/negative.py: error: Incompatible types in assignment (expression has type "str", target has type "Email") [assignment]
87 test_negative/negative.py: error: Invalid index type "int" for "ScalarMap[UserId, Email]"; expected type "UserId" [index]
88 test_negative/negative.py: error: Argument "user_id" to "Simple1" has incompatible type "int"; expected "Optional[UserId]" [arg-type]
89 test_negative/negative.py: error: Argument "email" to "Simple1" has incompatible type "str"; expected "Optional[Email]" [arg-type]
90 test_negative/negative.py: error: Dict entry 0 has incompatible type "int": "str"; expected "UserId": "Email" [dict-item]
91 test_negative/negative.py: error: Module "testproto.reexport_pb2" has no attribute "Inner" [attr-defined]
92 test_negative/negative.py: error: Argument "a_string" to "OuterMessage3" has incompatible type "None"; expected "str" [arg-type]
93 test_negative/negative.py: error: Property "a_repeated_string" defined in "Simple1" is read-only [misc]
94 test_negative/negative.py: error: Property "rep_inner_enum" defined in "Simple1" is read-only [misc]
95 test_negative/negative.py: error: "_r_None" has no attribute "invalid"; maybe "valid"? [attr-defined]
96 test_negative/negative.py: error: Incompatible types in assignment (expression has type "ValueType", variable has type "str") [assignment]
97 Found 80 errors in 2 files (checked 32 source files)