betterproto2-compiler 0.3.1__tar.gz → 0.3.2__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 (30) hide show
  1. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/PKG-INFO +1 -1
  2. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/pyproject.toml +1 -1
  3. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/models.py +6 -1
  4. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/LICENSE.md +0 -0
  5. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/README.md +0 -0
  6. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/__init__.py +0 -0
  7. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/casing.py +0 -0
  8. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/compile/__init__.py +0 -0
  9. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/compile/importing.py +0 -0
  10. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/compile/naming.py +0 -0
  11. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/known_types/__init__.py +0 -0
  12. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/known_types/any.py +0 -0
  13. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/known_types/duration.py +0 -0
  14. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/known_types/timestamp.py +0 -0
  15. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/lib/__init__.py +0 -0
  16. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/lib/google/__init__.py +0 -0
  17. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/lib/google/protobuf/__init__.py +0 -0
  18. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/lib/google/protobuf/compiler/__init__.py +0 -0
  19. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/lib/message_pool.py +0 -0
  20. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/__init__.py +0 -0
  21. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/__main__.py +0 -0
  22. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/compiler.py +0 -0
  23. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/main.py +0 -0
  24. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/module_validation.py +0 -0
  25. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/parser.py +0 -0
  26. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/plugin/plugin.bat +0 -0
  27. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/py.typed +0 -0
  28. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/settings.py +0 -0
  29. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/templates/header.py.j2 +0 -0
  30. {betterproto2_compiler-0.3.1 → betterproto2_compiler-0.3.2}/src/betterproto2_compiler/templates/template.py.j2 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: betterproto2_compiler
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Compiler for betterproto2
5
5
  License: MIT
6
6
  Keywords: protobuf,gRPC,compiler
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "betterproto2_compiler"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Compiler for betterproto2"
5
5
  authors = [
6
6
  { name = "Adrien Vannson", email = "adrien.vannson@protonmail.com" },
@@ -129,7 +129,12 @@ def get_comment(
129
129
  # We don't add this space to the generated file.
130
130
  lines = [line[1:] if line and line[0] == " " else line for line in lines]
131
131
 
132
- return "\n".join(lines)
132
+ comment = "\n".join(lines)
133
+
134
+ # Escape backslashes and triple quotes
135
+ comment = comment.replace("\\", "\\\\").replace('"""', '\\"\\"\\"')
136
+
137
+ return comment
133
138
 
134
139
  return ""
135
140