betterproto2-compiler 0.2.0__py3-none-any.whl → 0.2.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.
- betterproto2_compiler/plugin/parser.py +14 -7
- {betterproto2_compiler-0.2.0.dist-info → betterproto2_compiler-0.2.1.dist-info}/METADATA +1 -1
- {betterproto2_compiler-0.2.0.dist-info → betterproto2_compiler-0.2.1.dist-info}/RECORD +6 -6
- {betterproto2_compiler-0.2.0.dist-info → betterproto2_compiler-0.2.1.dist-info}/LICENSE.md +0 -0
- {betterproto2_compiler-0.2.0.dist-info → betterproto2_compiler-0.2.1.dist-info}/WHEEL +0 -0
- {betterproto2_compiler-0.2.0.dist-info → betterproto2_compiler-0.2.1.dist-info}/entry_points.txt +0 -0
@@ -227,14 +227,21 @@ def read_protobuf_type(
|
|
227
227
|
)
|
228
228
|
)
|
229
229
|
|
230
|
-
for
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
230
|
+
# Synthetic oneofs are generated for optional fields. We should not generate code or documentation for them.
|
231
|
+
is_synthetic_oneof = [True for _ in item.oneof_decl]
|
232
|
+
for field in item.field:
|
233
|
+
if field.oneof_index is not None and not field.proto3_optional:
|
234
|
+
is_synthetic_oneof[field.oneof_index] = False
|
235
|
+
|
236
|
+
for index, (oneof, is_synthetic) in enumerate(zip(item.oneof_decl, is_synthetic_oneof)):
|
237
|
+
if not is_synthetic:
|
238
|
+
message_data.oneofs.append(
|
239
|
+
OneofCompiler(
|
240
|
+
source_file=source_file,
|
241
|
+
path=path + [8, index],
|
242
|
+
proto_obj=oneof,
|
243
|
+
)
|
236
244
|
)
|
237
|
-
)
|
238
245
|
|
239
246
|
elif isinstance(item, EnumDescriptorProto):
|
240
247
|
# Enum
|
@@ -18,15 +18,15 @@ betterproto2_compiler/plugin/compiler.py,sha256=3sPbCtdzjAGftVvoGe5dvxE8uTzJ78hA
|
|
18
18
|
betterproto2_compiler/plugin/main.py,sha256=gI2fSWc9U-fn6MOlkLg7iResr2YsXbdOge6SzNWxBAo,1302
|
19
19
|
betterproto2_compiler/plugin/models.py,sha256=TNe96ANhRHRgz3GqGqUXmtSskaRM_T_JDrqW0nCjpBA,21755
|
20
20
|
betterproto2_compiler/plugin/module_validation.py,sha256=JnP8dSN83eJJVDP_UPJsHzq7E7Md3lah0PnKXDbFW5Q,4808
|
21
|
-
betterproto2_compiler/plugin/parser.py,sha256=
|
21
|
+
betterproto2_compiler/plugin/parser.py,sha256=9PT8ArcGwnCviIYo1j_dsfPcdroaSVWC0OfLNzI66hU,10410
|
22
22
|
betterproto2_compiler/plugin/plugin.bat,sha256=lfLT1WguAXqyerLLsRL6BfHA0RqUE6QG79v-1BYVSpI,48
|
23
23
|
betterproto2_compiler/plugin/typing_compiler.py,sha256=IK6m4ggHXK7HL98Ed_WjvQ_yeWfIpf_fIBZ9SA8UcyM,4873
|
24
24
|
betterproto2_compiler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
25
|
betterproto2_compiler/settings.py,sha256=d7XTRMywahR9PcOgaycPXLkHgJMSYDffuSO874yyrh0,182
|
26
26
|
betterproto2_compiler/templates/header.py.j2,sha256=wYBR4yer77dTGM9e1RijuID-mI4GHrmk66OjdVvmBxc,1734
|
27
27
|
betterproto2_compiler/templates/template.py.j2,sha256=theRmdVVan3dtVuHLlScuirRRLv6ePb15Rr9e_fHaWU,9238
|
28
|
-
betterproto2_compiler-0.2.
|
29
|
-
betterproto2_compiler-0.2.
|
30
|
-
betterproto2_compiler-0.2.
|
31
|
-
betterproto2_compiler-0.2.
|
32
|
-
betterproto2_compiler-0.2.
|
28
|
+
betterproto2_compiler-0.2.1.dist-info/LICENSE.md,sha256=Pgl2pReU-2yw2miGeQ55UFlyzqAZ_EpYVyZ2nWjwRv4,1121
|
29
|
+
betterproto2_compiler-0.2.1.dist-info/METADATA,sha256=AdzKJ5vZAfH65dlC69ota1baRkikMYdXk4r1-qsauM8,1099
|
30
|
+
betterproto2_compiler-0.2.1.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
31
|
+
betterproto2_compiler-0.2.1.dist-info/entry_points.txt,sha256=re3Qg8lLljbVobeeKH2f1FVQZ114wfZkGv3zCZTD8Ok,84
|
32
|
+
betterproto2_compiler-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{betterproto2_compiler-0.2.0.dist-info → betterproto2_compiler-0.2.1.dist-info}/entry_points.txt
RENAMED
File without changes
|