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.
Files changed (40) hide show
  1. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/PKG-INFO +1 -1
  2. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/pyproject.toml +5 -1
  3. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/compile/importing.py +2 -2
  4. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/models.py +4 -3
  5. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/LICENSE.md +0 -0
  6. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/README.md +0 -0
  7. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/__init__.py +0 -0
  8. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/_types.py +0 -0
  9. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/casing.py +0 -0
  10. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/compile/__init__.py +0 -0
  11. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/compile/naming.py +0 -0
  12. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/enum.py +0 -0
  13. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/__init__.py +0 -0
  14. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/grpclib_client.py +0 -0
  15. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/grpclib_server.py +0 -0
  16. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/util/__init__.py +0 -0
  17. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/grpc/util/async_channel.py +0 -0
  18. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/__init__.py +0 -0
  19. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/google/__init__.py +0 -0
  20. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/google/protobuf/__init__.py +0 -0
  21. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py +0 -0
  22. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/__init__.py +0 -0
  23. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/google/__init__.py +0 -0
  24. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/google/protobuf/__init__.py +0 -0
  25. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/pydantic/google/protobuf/compiler/__init__.py +0 -0
  26. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/__init__.py +0 -0
  27. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/google/__init__.py +0 -0
  28. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/google/protobuf/__init__.py +0 -0
  29. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/lib/std/google/protobuf/compiler/__init__.py +0 -0
  30. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/__init__.py +0 -0
  31. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/__main__.py +0 -0
  32. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/compiler.py +0 -0
  33. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/main.py +0 -0
  34. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/module_validation.py +0 -0
  35. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/parser.py +0 -0
  36. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/plugin.bat +0 -0
  37. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/plugin/typing_compiler.py +0 -0
  38. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/py.typed +0 -0
  39. {betterproto2_compiler-0.0.2 → betterproto2_compiler-0.0.3}/src/betterproto2_compiler/templates/header.py.j2 +0 -0
  40. {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
  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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "betterproto2_compiler"
3
- version = "0.0.2"
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 = ["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