betterproto2-compiler 0.2.0__tar.gz → 0.2.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/PKG-INFO +1 -1
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/pyproject.toml +1 -1
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/parser.py +14 -7
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/LICENSE.md +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/README.md +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/casing.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/compile/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/compile/importing.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/compile/naming.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/known_types/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/known_types/any.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/known_types/duration.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/known_types/timestamp.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/lib/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/lib/google/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/lib/google/protobuf/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/lib/message_pool.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/__init__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/__main__.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/compiler.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/main.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/models.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/module_validation.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/plugin.bat +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/typing_compiler.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/py.typed +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/settings.py +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/templates/header.py.j2 +0 -0
- {betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/templates/template.py.j2 +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
|
File without changes
|
File without changes
|
{betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/__init__.py
RENAMED
File without changes
|
{betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/casing.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/plugin/main.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/py.typed
RENAMED
File without changes
|
{betterproto2_compiler-0.2.0 → betterproto2_compiler-0.2.1}/src/betterproto2_compiler/settings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|