Skip to content

Commit d43b550

Browse files
authored
Fix .gitignore and add missing files (onnx#1005)
1 parent ea1aa13 commit d43b550

30 files changed

+7949
-4
lines changed

.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
# Compiled protocol buffers
2020
*.pb.h
2121
*.pb.cc
22-
*_pb2.py
23-
*_pb.py
24-
*_pb2.pyi
25-
*_pb.pyi
22+
onnx/*_pb2.py
23+
onnx/*_pb.py
24+
onnx/*_pb2.pyi
25+
onnx/*_pb.pyi
2626

2727
# Compiled python
2828
*.pyc

stubs/google/protobuf/any_pb2.pyi

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from google.protobuf.message import (
2+
Message,
3+
)
4+
from typing import (
5+
Optional,
6+
Text,
7+
)
8+
9+
10+
class Any(Message):
11+
type_url = ... # type: Text
12+
value = ... # type: str
13+
14+
def __init__(self,
15+
type_url: Optional[Text] = ...,
16+
value: Optional[str] = ...,
17+
) -> None: ...
18+
19+
@classmethod
20+
def FromString(cls, s: str) -> Any: ...
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from google.protobuf.any_pb2 import (
2+
Any,
3+
)
4+
from google.protobuf.internal.containers import (
5+
RepeatedCompositeFieldContainer,
6+
)
7+
from google.protobuf.message import (
8+
Message,
9+
)
10+
from typing import (
11+
Iterable,
12+
Optional,
13+
)
14+
15+
16+
class TestAny(Message):
17+
int32_value = ... # type: int
18+
19+
@property
20+
def any_value(self) -> Any: ...
21+
22+
@property
23+
def repeated_any_value(self) -> RepeatedCompositeFieldContainer[Any]: ...
24+
25+
def __init__(self,
26+
int32_value: Optional[int] = ...,
27+
any_value: Optional[Any] = ...,
28+
repeated_any_value: Optional[Iterable[Any]] = ...,
29+
) -> None: ...
30+
31+
@classmethod
32+
def FromString(cls, s: str) -> TestAny: ...

stubs/google/protobuf/api_pb2.pyi

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
from google.protobuf.internal.containers import (
2+
RepeatedCompositeFieldContainer,
3+
)
4+
from google.protobuf.message import (
5+
Message,
6+
)
7+
from google.protobuf.source_context_pb2 import (
8+
SourceContext,
9+
)
10+
from google.protobuf.type_pb2 import (
11+
Option,
12+
Syntax,
13+
)
14+
from typing import (
15+
Iterable,
16+
Optional,
17+
Text,
18+
)
19+
20+
21+
class Api(Message):
22+
name = ... # type: Text
23+
version = ... # type: Text
24+
syntax = ... # type: Syntax
25+
26+
@property
27+
def methods(self) -> RepeatedCompositeFieldContainer[Method]: ...
28+
29+
@property
30+
def options(self) -> RepeatedCompositeFieldContainer[Option]: ...
31+
32+
@property
33+
def source_context(self) -> SourceContext: ...
34+
35+
@property
36+
def mixins(self) -> RepeatedCompositeFieldContainer[Mixin]: ...
37+
38+
def __init__(self,
39+
name: Optional[Text] = ...,
40+
methods: Optional[Iterable[Method]] = ...,
41+
options: Optional[Iterable[Option]] = ...,
42+
version: Optional[Text] = ...,
43+
source_context: Optional[SourceContext] = ...,
44+
mixins: Optional[Iterable[Mixin]] = ...,
45+
syntax: Optional[Syntax] = ...,
46+
) -> None: ...
47+
48+
@classmethod
49+
def FromString(cls, s: str) -> Api: ...
50+
51+
52+
class Method(Message):
53+
name = ... # type: Text
54+
request_type_url = ... # type: Text
55+
request_streaming = ... # type: bool
56+
response_type_url = ... # type: Text
57+
response_streaming = ... # type: bool
58+
syntax = ... # type: Syntax
59+
60+
@property
61+
def options(self) -> RepeatedCompositeFieldContainer[Option]: ...
62+
63+
def __init__(self,
64+
name: Optional[Text] = ...,
65+
request_type_url: Optional[Text] = ...,
66+
request_streaming: Optional[bool] = ...,
67+
response_type_url: Optional[Text] = ...,
68+
response_streaming: Optional[bool] = ...,
69+
options: Optional[Iterable[Option]] = ...,
70+
syntax: Optional[Syntax] = ...,
71+
) -> None: ...
72+
73+
@classmethod
74+
def FromString(cls, s: str) -> Method: ...
75+
76+
77+
class Mixin(Message):
78+
name = ... # type: Text
79+
root = ... # type: Text
80+
81+
def __init__(self,
82+
name: Optional[Text] = ...,
83+
root: Optional[Text] = ...,
84+
) -> None: ...
85+
86+
@classmethod
87+
def FromString(cls, s: str) -> Mixin: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
from google.protobuf.descriptor_pb2 import (
2+
FileDescriptorProto,
3+
)
4+
from google.protobuf.internal.containers import (
5+
RepeatedCompositeFieldContainer,
6+
RepeatedScalarFieldContainer,
7+
)
8+
from google.protobuf.message import (
9+
Message,
10+
)
11+
from typing import (
12+
Iterable,
13+
Optional,
14+
Text,
15+
)
16+
17+
18+
class Version(Message):
19+
major = ... # type: int
20+
minor = ... # type: int
21+
patch = ... # type: int
22+
suffix = ... # type: Text
23+
24+
def __init__(self,
25+
major: Optional[int] = ...,
26+
minor: Optional[int] = ...,
27+
patch: Optional[int] = ...,
28+
suffix: Optional[Text] = ...,
29+
) -> None: ...
30+
31+
@classmethod
32+
def FromString(cls, s: str) -> Version: ...
33+
34+
35+
class CodeGeneratorRequest(Message):
36+
file_to_generate = ... # type: RepeatedScalarFieldContainer[Text]
37+
parameter = ... # type: Text
38+
39+
@property
40+
def proto_file(self) -> RepeatedCompositeFieldContainer[FileDescriptorProto]: ...
41+
42+
@property
43+
def compiler_version(self) -> Version: ...
44+
45+
def __init__(self,
46+
file_to_generate: Optional[Iterable[Text]] = ...,
47+
parameter: Optional[Text] = ...,
48+
proto_file: Optional[Iterable[FileDescriptorProto]] = ...,
49+
compiler_version: Optional[Version] = ...,
50+
) -> None: ...
51+
52+
@classmethod
53+
def FromString(cls, s: str) -> CodeGeneratorRequest: ...
54+
55+
56+
class CodeGeneratorResponse(Message):
57+
58+
class File(Message):
59+
name = ... # type: Text
60+
insertion_point = ... # type: Text
61+
content = ... # type: Text
62+
63+
def __init__(self,
64+
name: Optional[Text] = ...,
65+
insertion_point: Optional[Text] = ...,
66+
content: Optional[Text] = ...,
67+
) -> None: ...
68+
69+
@classmethod
70+
def FromString(cls, s: str) -> CodeGeneratorResponse.File: ...
71+
error = ... # type: Text
72+
73+
@property
74+
def file(self) -> RepeatedCompositeFieldContainer[CodeGeneratorResponse.File]: ...
75+
76+
def __init__(self,
77+
error: Optional[Text] = ...,
78+
file: Optional[Iterable[CodeGeneratorResponse.File]] = ...,
79+
) -> None: ...
80+
81+
@classmethod
82+
def FromString(cls, s: str) -> CodeGeneratorResponse: ...

0 commit comments

Comments
 (0)