betterproto2-compiler 0.0.2__tar.gz → 0.0.3__tar.gz
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-0.0.2 → betterproto2_compiler-0.0.3}/PKG-INFO +1 -1
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/pyproject.toml +5 -1
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/compile/importing.py +2 -2
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/models.py +4 -3
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/LICENSE.md +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/README.md +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/_types.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/casing.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/compile/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/compile/naming.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/enum.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/grpclib_client.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/grpclib_server.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/util/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/util/async_channel.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/google/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/google/protobuf/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/google/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/google/protobuf/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/google/protobuf/compiler/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/google/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/google/protobuf/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/google/protobuf/compiler/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/__init__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/__main__.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/compiler.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/main.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/module_validation.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/parser.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/plugin.bat +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/typing_compiler.py +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/py.typed +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/templates/header.py.j2 +0 -0
- {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/templates/template.py.j2 +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "betterproto2_compiler"
|
3
|
-
version = "0.0.
|
3
|
+
version = "0.0.3"
|
4
4
|
description = "Compiler for betterproto2"
|
5
5
|
authors = ["Adrien Vannson <adrien.vannson@protonmail.com>", "Daniel G. Taylor <danielgtaylor@gmail.com>"]
|
6
6
|
readme = "README.md"
|
@@ -61,6 +61,10 @@ combine-as-imports = true
|
|
61
61
|
|
62
62
|
# Dev workflow tasks
|
63
63
|
|
64
|
+
[tool.poe.tasks.test]
|
65
|
+
cmd = "pytest"
|
66
|
+
help = "Run tests"
|
67
|
+
|
64
68
|
[tool.poe.tasks.generate]
|
65
69
|
script = "tests.generate:main"
|
66
70
|
help = "Generate test cases"
|
@@ -105,9 +105,9 @@ def get_type_reference(
|
|
105
105
|
compiling_google_protobuf = current_package == ["google", "protobuf"]
|
106
106
|
importing_google_protobuf = py_package == ["google", "protobuf"]
|
107
107
|
if importing_google_protobuf and not compiling_google_protobuf:
|
108
|
-
py_package = ["
|
108
|
+
py_package = ["betterproto2", "lib"] + (["pydantic"] if pydantic else []) + py_package
|
109
109
|
|
110
|
-
if py_package[:1] == ["
|
110
|
+
if py_package[:1] == ["betterproto2"]:
|
111
111
|
return reference_absolute(imports, py_package, py_type)
|
112
112
|
|
113
113
|
if py_package == current_package:
|
@@ -46,7 +46,8 @@ from typing import (
|
|
46
46
|
Union,
|
47
47
|
)
|
48
48
|
|
49
|
-
import
|
49
|
+
import betterproto2
|
50
|
+
|
50
51
|
from betterproto2_compiler.compile.naming import (
|
51
52
|
pythonize_class_name,
|
52
53
|
pythonize_field_name,
|
@@ -182,7 +183,7 @@ class ProtoContentBase:
|
|
182
183
|
source_file: FileDescriptorProto
|
183
184
|
typing_compiler: TypingCompiler
|
184
185
|
path: List[int]
|
185
|
-
parent: Union["
|
186
|
+
parent: Union["betterproto2.Message", "OutputTemplate"]
|
186
187
|
|
187
188
|
__dataclass_fields__: Dict[str, object]
|
188
189
|
|
@@ -420,7 +421,7 @@ class FieldCompiler(ProtoContentBase):
|
|
420
421
|
match_wrapper = re.match(r"\.google\.protobuf\.(.+)Value$", self.proto_obj.type_name)
|
421
422
|
if match_wrapper:
|
422
423
|
wrapped_type = "TYPE_" + match_wrapper.group(1).upper()
|
423
|
-
if hasattr(
|
424
|
+
if hasattr(betterproto2, wrapped_type):
|
424
425
|
return f"betterproto2.{wrapped_type}"
|
425
426
|
return None
|
426
427
|
|
File without changes
|
File without changes
|
{betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/__init__.py
RENAMED
File without changes
|
{betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/_types.py
RENAMED
File without changes
|
{betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/casing.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/enum.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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/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.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/py.typed
RENAMED
File without changes
|
File without changes
|
File without changes
|