betterproto2-compiler 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,197 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # sources: google/protobuf/compiler/plugin.proto
3
- # plugin: python-betterproto2
4
- # This file has been @generated
5
-
6
- from dataclasses import dataclass
7
- from typing import List
8
-
9
- import betterproto2
10
-
11
- import betterproto2_compiler.lib.google.protobuf as betterproto_lib_google_protobuf
12
-
13
-
14
- class CodeGeneratorResponseFeature(betterproto2.Enum):
15
- """Sync with code_generator.h."""
16
-
17
- FEATURE_NONE = 0
18
- FEATURE_PROTO3_OPTIONAL = 1
19
- FEATURE_SUPPORTS_EDITIONS = 2
20
-
21
-
22
- @dataclass(eq=False, repr=False)
23
- class Version(betterproto2.Message):
24
- """The version number of protocol compiler."""
25
-
26
- major: int = betterproto2.int32_field(1)
27
- minor: int = betterproto2.int32_field(2)
28
- patch: int = betterproto2.int32_field(3)
29
- suffix: str = betterproto2.string_field(4)
30
- """
31
- A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
32
- be empty for mainline stable releases.
33
- """
34
-
35
-
36
- @dataclass(eq=False, repr=False)
37
- class CodeGeneratorRequest(betterproto2.Message):
38
- """An encoded CodeGeneratorRequest is written to the plugin's stdin."""
39
-
40
- file_to_generate: List[str] = betterproto2.string_field(1, repeated=True)
41
- """
42
- The .proto files that were explicitly listed on the command-line. The
43
- code generator should generate code only for these files. Each file's
44
- descriptor will be included in proto_file, below.
45
- """
46
-
47
- parameter: str = betterproto2.string_field(2)
48
- """The generator parameter passed on the command-line."""
49
-
50
- proto_file: List["betterproto_lib_google_protobuf.FileDescriptorProto"] = betterproto2.message_field(
51
- 15, repeated=True
52
- )
53
- """
54
- FileDescriptorProtos for all files in files_to_generate and everything
55
- they import. The files will appear in topological order, so each file
56
- appears before any file that imports it.
57
-
58
- Note: the files listed in files_to_generate will include runtime-retention
59
- options only, but all other files will include source-retention options.
60
- The source_file_descriptors field below is available in case you need
61
- source-retention options for files_to_generate.
62
-
63
- protoc guarantees that all proto_files will be written after
64
- the fields above, even though this is not technically guaranteed by the
65
- protobuf wire format. This theoretically could allow a plugin to stream
66
- in the FileDescriptorProtos and handle them one by one rather than read
67
- the entire set into memory at once. However, as of this writing, this
68
- is not similarly optimized on protoc's end -- it will store all fields in
69
- memory at once before sending them to the plugin.
70
-
71
- Type names of fields and extensions in the FileDescriptorProto are always
72
- fully qualified.
73
- """
74
-
75
- source_file_descriptors: List["betterproto_lib_google_protobuf.FileDescriptorProto"] = betterproto2.message_field(
76
- 17, repeated=True
77
- )
78
- """
79
- File descriptors with all options, including source-retention options.
80
- These descriptors are only provided for the files listed in
81
- files_to_generate.
82
- """
83
-
84
- compiler_version: "Version" = betterproto2.message_field(3)
85
- """The version number of protocol compiler."""
86
-
87
-
88
- @dataclass(eq=False, repr=False)
89
- class CodeGeneratorResponse(betterproto2.Message):
90
- """The plugin writes an encoded CodeGeneratorResponse to stdout."""
91
-
92
- error: str = betterproto2.string_field(1)
93
- """
94
- Error message. If non-empty, code generation failed. The plugin process
95
- should exit with status code zero even if it reports an error in this way.
96
-
97
- This should be used to indicate errors in .proto files which prevent the
98
- code generator from generating correct code. Errors which indicate a
99
- problem in protoc itself -- such as the input CodeGeneratorRequest being
100
- unparseable -- should be reported by writing a message to stderr and
101
- exiting with a non-zero status code.
102
- """
103
-
104
- supported_features: int = betterproto2.uint64_field(2)
105
- """
106
- A bitmask of supported features that the code generator supports.
107
- This is a bitwise "or" of values from the Feature enum.
108
- """
109
-
110
- minimum_edition: int = betterproto2.int32_field(3)
111
- """
112
- The minimum edition this plugin supports. This will be treated as an
113
- Edition enum, but we want to allow unknown values. It should be specified
114
- according the edition enum value, *not* the edition number. Only takes
115
- effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
116
- """
117
-
118
- maximum_edition: int = betterproto2.int32_field(4)
119
- """
120
- The maximum edition this plugin supports. This will be treated as an
121
- Edition enum, but we want to allow unknown values. It should be specified
122
- according the edition enum value, *not* the edition number. Only takes
123
- effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
124
- """
125
-
126
- file: List["CodeGeneratorResponseFile"] = betterproto2.message_field(15, repeated=True)
127
-
128
-
129
- @dataclass(eq=False, repr=False)
130
- class CodeGeneratorResponseFile(betterproto2.Message):
131
- """Represents a single generated file."""
132
-
133
- name: str = betterproto2.string_field(1)
134
- """
135
- The file name, relative to the output directory. The name must not
136
- contain "." or ".." components and must be relative, not be absolute (so,
137
- the file cannot lie outside the output directory). "/" must be used as
138
- the path separator, not "\".
139
-
140
- If the name is omitted, the content will be appended to the previous
141
- file. This allows the generator to break large files into small chunks,
142
- and allows the generated text to be streamed back to protoc so that large
143
- files need not reside completely in memory at one time. Note that as of
144
- this writing protoc does not optimize for this -- it will read the entire
145
- CodeGeneratorResponse before writing files to disk.
146
- """
147
-
148
- insertion_point: str = betterproto2.string_field(2)
149
- """
150
- If non-empty, indicates that the named file should already exist, and the
151
- content here is to be inserted into that file at a defined insertion
152
- point. This feature allows a code generator to extend the output
153
- produced by another code generator. The original generator may provide
154
- insertion points by placing special annotations in the file that look
155
- like:
156
- @@protoc_insertion_point(NAME)
157
- The annotation can have arbitrary text before and after it on the line,
158
- which allows it to be placed in a comment. NAME should be replaced with
159
- an identifier naming the point -- this is what other generators will use
160
- as the insertion_point. Code inserted at this point will be placed
161
- immediately above the line containing the insertion point (thus multiple
162
- insertions to the same point will come out in the order they were added).
163
- The double-@ is intended to make it unlikely that the generated code
164
- could contain things that look like insertion points by accident.
165
-
166
- For example, the C++ code generator places the following line in the
167
- .pb.h files that it generates:
168
- // @@protoc_insertion_point(namespace_scope)
169
- This line appears within the scope of the file's package namespace, but
170
- outside of any particular class. Another plugin can then specify the
171
- insertion_point "namespace_scope" to generate additional classes or
172
- other declarations that should be placed in this scope.
173
-
174
- Note that if the line containing the insertion point begins with
175
- whitespace, the same whitespace will be added to every line of the
176
- inserted text. This is useful for languages like Python, where
177
- indentation matters. In these languages, the insertion point comment
178
- should be indented the same amount as any inserted code will need to be
179
- in order to work correctly in that context.
180
-
181
- The code generator that generates the initial file and the one which
182
- inserts into it must both run as part of a single invocation of protoc.
183
- Code generators are executed in the order in which they appear on the
184
- command line.
185
-
186
- If |insertion_point| is present, |name| must also be present.
187
- """
188
-
189
- content: str = betterproto2.string_field(15)
190
- """The file contents."""
191
-
192
- generated_code_info: "betterproto_lib_google_protobuf.GeneratedCodeInfo" = betterproto2.message_field(16)
193
- """
194
- Information describing the file content being inserted. If an insertion
195
- point is used, this information will be appropriately offset and inserted
196
- into the code generation metadata for the generated files.
197
- """
@@ -1,34 +0,0 @@
1
- betterproto2_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- betterproto2_compiler/casing.py,sha256=bMdI4W0hfYh6kV-DQIqFEjSfGYEqUtPciAzP64z5HLQ,3587
3
- betterproto2_compiler/compile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- betterproto2_compiler/compile/importing.py,sha256=MN1pzFISG96wd6Djsym8q9yfsknBC5logvPrW6qnWyc,7388
5
- betterproto2_compiler/compile/naming.py,sha256=zf0VOmNojzyv33upOGelGxjZTEDE8JULEEED5_3inHg,562
6
- betterproto2_compiler/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- betterproto2_compiler/lib/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- betterproto2_compiler/lib/google/protobuf/__init__.py,sha256=RvtT0CjNfAegDv42ITEvaIVrGpEh2fXvGNyA7bd99oo,60
9
- betterproto2_compiler/lib/google/protobuf/compiler/__init__.py,sha256=1EvLU05Ck-rwv2Y_jW4ylJlCgqd7VpSHeFgbBFWfAmg,69
10
- betterproto2_compiler/lib/pydantic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- betterproto2_compiler/lib/pydantic/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- betterproto2_compiler/lib/pydantic/google/protobuf/__init__.py,sha256=RgGj0p9-KkaO-CFGV_CLTXm1yhPf-Vm02cUkF7z39SI,96972
13
- betterproto2_compiler/lib/pydantic/google/protobuf/compiler/__init__.py,sha256=uI4F0DytRxbrwXqiRKOJD0nJFewlQE0Lj_3WJdiGoDU,9217
14
- betterproto2_compiler/lib/std/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- betterproto2_compiler/lib/std/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- betterproto2_compiler/lib/std/google/protobuf/__init__.py,sha256=bfxwQzYXJ-ImFktGBN5_8HY9JgASJ8BbBg9fKeLTVQ0,80437
17
- betterproto2_compiler/lib/std/google/protobuf/compiler/__init__.py,sha256=z63o4vkjnDWB7yZpYnx-T0FZCbmSs5gBzfKrNP_qf8c,8646
18
- betterproto2_compiler/plugin/__init__.py,sha256=L3pW0b4CvkM5x53x_sYt1kYiSFPO0_vaeH6EQPq9FAM,43
19
- betterproto2_compiler/plugin/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
20
- betterproto2_compiler/plugin/compiler.py,sha256=jICLI4-5rAOkWQI1v5j7JqIvoao-ZM9szMuq0OBRteA,2138
21
- betterproto2_compiler/plugin/main.py,sha256=Q9PmcJqXuYYFe51l7AqHVzJrHqi2LWCUu80CZSQOOwk,1469
22
- betterproto2_compiler/plugin/models.py,sha256=7l1P8-ijdatENy-ERO5twHeMpYxLG3YEqhYM9Slm5TY,24655
23
- betterproto2_compiler/plugin/module_validation.py,sha256=RdPFwdmkbD6NKADaHC5eaPix_pz-yGxHvYJj8Ev48fA,4822
24
- betterproto2_compiler/plugin/parser.py,sha256=i_HDW0O4ieIatbq1hckOj0kM9MCfdzuib0fumSJqIA4,9610
25
- betterproto2_compiler/plugin/plugin.bat,sha256=lfLT1WguAXqyerLLsRL6BfHA0RqUE6QG79v-1BYVSpI,48
26
- betterproto2_compiler/plugin/typing_compiler.py,sha256=IK6m4ggHXK7HL98Ed_WjvQ_yeWfIpf_fIBZ9SA8UcyM,4873
27
- betterproto2_compiler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- betterproto2_compiler/templates/header.py.j2,sha256=nxqsengMcM_IRqQYNVntPQ0gUFUPCy_1P1mcoLvbDos,1464
29
- betterproto2_compiler/templates/template.py.j2,sha256=icyiNdSTJRgyD20e_lTgTAvSjgnSFSn4t1L1-yZnkEM,8712
30
- betterproto2_compiler-0.1.0.dist-info/LICENSE.md,sha256=Pgl2pReU-2yw2miGeQ55UFlyzqAZ_EpYVyZ2nWjwRv4,1121
31
- betterproto2_compiler-0.1.0.dist-info/METADATA,sha256=sJiWJ2eOTCN0ARCo0VmNcMlCPgEFli0tfsnM2vYM-Gc,1163
32
- betterproto2_compiler-0.1.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
33
- betterproto2_compiler-0.1.0.dist-info/entry_points.txt,sha256=re3Qg8lLljbVobeeKH2f1FVQZ114wfZkGv3zCZTD8Ok,84
34
- betterproto2_compiler-0.1.0.dist-info/RECORD,,