betterproto2-compiler 0.0.2__py3-none-any.whl → 0.0.3__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.
@@ -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 = ["betterproto", "lib"] + (["pydantic"] if pydantic else []) + py_package
108
+ py_package = ["betterproto2", "lib"] + (["pydantic"] if pydantic else []) + py_package
109
109
 
110
- if py_package[:1] == ["betterproto"]:
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 betterproto2_compiler
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["betterproto2_compiler.Message", "OutputTemplate"]
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(betterproto2_compiler, wrapped_type):
424
+ if hasattr(betterproto2, wrapped_type):
424
425
  return f"betterproto2.{wrapped_type}"
425
426
  return None
426
427
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: betterproto2_compiler
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: Compiler for betterproto2
5
5
  Home-page: https://github.com/betterproto/python-betterproto2-compiler
6
6
  License: MIT
@@ -2,7 +2,7 @@ betterproto2_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
2
2
  betterproto2_compiler/_types.py,sha256=nIsUxcId43N1Gu8EqdeuflR9iUZB1JWu4JTGQV9NeUI,294
3
3
  betterproto2_compiler/casing.py,sha256=bMdI4W0hfYh6kV-DQIqFEjSfGYEqUtPciAzP64z5HLQ,3587
4
4
  betterproto2_compiler/compile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- betterproto2_compiler/compile/importing.py,sha256=SpDU88rUbBYg5EQ4xOmiym8Xrwlg9GbUuIpdKgrLMmo,7440
5
+ betterproto2_compiler/compile/importing.py,sha256=UNBvayHZmvvwQMIEZ0Zzk0KsqIGqGSbPKhv_DUg2qV8,7442
6
6
  betterproto2_compiler/compile/naming.py,sha256=zf0VOmNojzyv33upOGelGxjZTEDE8JULEEED5_3inHg,562
7
7
  betterproto2_compiler/enum.py,sha256=LcILQf1BEjnszouUCtPwifJAR_8u2tf9U9hfwP4vXTc,5396
8
8
  betterproto2_compiler/grpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -26,7 +26,7 @@ betterproto2_compiler/plugin/__init__.py,sha256=L3pW0b4CvkM5x53x_sYt1kYiSFPO0_va
26
26
  betterproto2_compiler/plugin/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
27
27
  betterproto2_compiler/plugin/compiler.py,sha256=J_0WvuOVXuIINogNTOtU9Kyhzbu3NDrKh7ojbMjSjJk,2032
28
28
  betterproto2_compiler/plugin/main.py,sha256=Q9PmcJqXuYYFe51l7AqHVzJrHqi2LWCUu80CZSQOOwk,1469
29
- betterproto2_compiler/plugin/models.py,sha256=Qmpf7HZCGdbUShVBmb7wirFwMKW4xB9phAniwf-H5vk,24314
29
+ betterproto2_compiler/plugin/models.py,sha256=Ljo08MGmZ68q7bFTI7532KrqyjjJhHMe15a-tvxAGyI,24288
30
30
  betterproto2_compiler/plugin/module_validation.py,sha256=vye8PjsZFs1Ikh0yNLQXuy12EdM0em0Bflgx7xYrMhk,4853
31
31
  betterproto2_compiler/plugin/parser.py,sha256=PFFlK7Di7BF7_tCzkIWUeaRqDfVKJQc9YjSVKeHVXWM,9651
32
32
  betterproto2_compiler/plugin/plugin.bat,sha256=lfLT1WguAXqyerLLsRL6BfHA0RqUE6QG79v-1BYVSpI,48
@@ -34,8 +34,8 @@ betterproto2_compiler/plugin/typing_compiler.py,sha256=gMrKsrA_xFoy33tbm4VjiktXy
34
34
  betterproto2_compiler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  betterproto2_compiler/templates/header.py.j2,sha256=H3R2v5MiCebp5p1zMKCDjsVlnOLklqrwO24SUtjfdN0,1410
36
36
  betterproto2_compiler/templates/template.py.j2,sha256=icyiNdSTJRgyD20e_lTgTAvSjgnSFSn4t1L1-yZnkEM,8712
37
- betterproto2_compiler-0.0.2.dist-info/LICENSE.md,sha256=Pgl2pReU-2yw2miGeQ55UFlyzqAZ_EpYVyZ2nWjwRv4,1121
38
- betterproto2_compiler-0.0.2.dist-info/METADATA,sha256=QtFZcJYtNY44aPlst2o8H30uyuX0nUB5e5QE3CV8rTQ,1163
39
- betterproto2_compiler-0.0.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
40
- betterproto2_compiler-0.0.2.dist-info/entry_points.txt,sha256=DE80wLfBwKlvu82d9pAYzEo7Cp22WNqwU7WJZq6JAWk,83
41
- betterproto2_compiler-0.0.2.dist-info/RECORD,,
37
+ betterproto2_compiler-0.0.3.dist-info/LICENSE.md,sha256=Pgl2pReU-2yw2miGeQ55UFlyzqAZ_EpYVyZ2nWjwRv4,1121
38
+ betterproto2_compiler-0.0.3.dist-info/METADATA,sha256=-h0sesZ9kJlHnXU645Jmgbo-DA2BMVqfTZu7b8pCbiQ,1163
39
+ betterproto2_compiler-0.0.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
40
+ betterproto2_compiler-0.0.3.dist-info/entry_points.txt,sha256=DE80wLfBwKlvu82d9pAYzEo7Cp22WNqwU7WJZq6JAWk,83
41
+ betterproto2_compiler-0.0.3.dist-info/RECORD,,