Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "betterproto2_compiler"
version = "0.1.1"
version = "0.2.0"
description = "Compiler for betterproto2"
authors = ["Adrien Vannson <[email protected]>", "Daniel G. Taylor <[email protected]>"]
readme = "README.md"
Expand All @@ -13,7 +13,7 @@ packages = [

[tool.poetry.dependencies]
python = "^3.10"
betterproto2 = "^0.1.3"
betterproto2 = "^0.2.1"
# The Ruff version is pinned. To update it, also update it in .pre-commit-config.yaml
ruff = "~0.7.4"
grpclib = "^0.4.1"
Expand Down Expand Up @@ -139,3 +139,17 @@ help = "Serve the documentation locally"
[build-system]
requires = ["poetry-core>=1.0.0,<2"]
build-backend = "poetry.core.masonry.api"

# python -m grpc.tools.protoc \
# --python_betterproto2_out=src/lib2 \
# google/protobuf/any.proto \
# google/protobuf/api.proto \
# google/protobuf/duration.proto \
# google/protobuf/empty.proto \
# google/protobuf/field_mask.proto \
# google/protobuf/source_context.proto \
# google/protobuf/struct.proto \
# google/protobuf/timestamp.proto \
# google/protobuf/type.proto \
# google/protobuf/wrappers.proto \
# google/protobuf/compiler/plugin.proto
3 changes: 1 addition & 2 deletions src/betterproto2_compiler/compile/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
TYPE_CHECKING,
)

from betterproto2.lib.google import protobuf as google_protobuf

from betterproto2_compiler.lib.google import protobuf as google_protobuf
from betterproto2_compiler.settings import Settings

from ..casing import safe_snake_case
Expand Down
7 changes: 3 additions & 4 deletions src/betterproto2_compiler/known_types/any.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import betterproto2
from betterproto2.lib.std.google.protobuf import Any as VanillaAny

# TODO put back
# default_message_pool = betterproto2.MessagePool() # Only for typing purpose
default_message_pool = ...
from betterproto2_compiler.lib.google.protobuf import Any as VanillaAny

default_message_pool = betterproto2.MessagePool() # Only for typing purpose


class Any(VanillaAny):
Expand Down
2 changes: 1 addition & 1 deletion src/betterproto2_compiler/known_types/duration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import datetime

from betterproto2.lib.std.google.protobuf import Duration as VanillaDuration
from betterproto2_compiler.lib.google.protobuf import Duration as VanillaDuration


class Duration(VanillaDuration):
Expand Down
2 changes: 1 addition & 1 deletion src/betterproto2_compiler/known_types/timestamp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import datetime

from betterproto2.lib.std.google.protobuf import Timestamp as VanillaTimestamp
from betterproto2_compiler.lib.google.protobuf import Timestamp as VanillaTimestamp


class Timestamp(VanillaTimestamp):
Expand Down
Loading
Loading