[copybara] Resync robotpy (#8585)

Project import generated by Copybara.
    
GitOrigin-RevId: fd000778e9b78c72cc7ca7b2ebe476129b78c6e0
This commit is contained in:
PJ Reiniger
2026-02-08 10:36:35 -05:00
committed by GitHub
parent 4aa21e947d
commit 227c89ab23
53 changed files with 1049 additions and 170 deletions

View File

@@ -1,7 +1,7 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"semiwrap~=0.2.1",
"semiwrap~=0.2.6",
"hatch-meson~=0.1.0",
"hatch-robotpy~=0.2.1",
"hatchling",

View File

@@ -176,8 +176,7 @@ def _process_class(cls, struct_name: typing.Optional[str]):
ctx["_s"] = s
# Construct the serialization functions using the same hack NamedTuple uses
fnsrc = inspect.cleandoc(
f"""
fnsrc = inspect.cleandoc(f"""
from wpiutil import wpistruct
def _pack(v):
@@ -210,8 +209,7 @@ def _process_class(cls, struct_name: typing.Optional[str]):
# raise ValueError(f"{err_name}: error unpacking data") from e
{forEachNested_stmt}
"""
)
""")
exec(fnsrc, ctx, ctx)