From 684defdab23bdbec7a78d03bf6fe43afa18c387c Mon Sep 17 00:00:00 2001 From: Adam Chidlow Date: Thu, 14 Dec 2023 13:06:48 +0800 Subject: [PATCH] build: fix poetry shell breaking in CI/CD minor tweaks to reduce coverage comment size --- .github/workflows/cd.yaml | 2 +- src/puya/arc32.py | 4 +--- src/puya/ir/visitor_mem_replacer.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 5d0e3c2367..09979d542f 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -52,7 +52,7 @@ jobs: if: inputs.run_checks run: | set -o pipefail - poetry shell + source $(poetry env info --path)/bin/activate pre-commit run --all-files && git diff --exit-code algokit localnet start pytest diff --git a/src/puya/arc32.py b/src/puya/arc32.py index 7d12b555d9..24e866e9f6 100644 --- a/src/puya/arc32.py +++ b/src/puya/arc32.py @@ -186,9 +186,7 @@ def create_arc32_json(contract: CompiledContract) -> str: "global": _encode_schema(metadata.global_state), "local": _encode_schema(metadata.local_state), }, - "contract": _encode_arc4_contract( - metadata.name_override or metadata.class_name, metadata.description, arc4_methods - ), + "contract": _encode_arc4_contract(metadata.name, metadata.description, arc4_methods), "bare_call_config": _encode_bare_method_configs(bare_methods), } return json.dumps(_filter_none(app_spec), indent=4) diff --git a/src/puya/ir/visitor_mem_replacer.py b/src/puya/ir/visitor_mem_replacer.py index f6b80c8b38..0a8ba86471 100644 --- a/src/puya/ir/visitor_mem_replacer.py +++ b/src/puya/ir/visitor_mem_replacer.py @@ -17,11 +17,9 @@ def apply( cls, blocks: Sequence[models.BasicBlock], *, - find: Iterable[models.Register] | models.Register, + find: Iterable[models.Register], replacement: models.Register, ) -> int: - if isinstance(find, models.Register): - find = [find] replacer = cls(find=frozenset(find), replacement=replacement) for block in blocks: replacer.visit_block(block)