Skip to content
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
4 changes: 2 additions & 2 deletions pyteal/ast/abi/address_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pyteal.ast.abi.address import AddressLength
from pyteal.ast.abi.type_test import ContainerType
from pyteal.ast.abi.util import substringForDecoding
from pyteal.ast.abi.util import substring_for_decoding


options = pt.CompileOptions(version=5)
Expand Down Expand Up @@ -80,7 +80,7 @@ def test_Address_decode():
assert expr.has_return() is False

expectedExpr = value.stored_value.store(
substringForDecoding(
substring_for_decoding(
encoded,
start_index=start_index,
end_index=end_index,
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ast/abi/array_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from pyteal.ast.abi.tuple import encodeTuple
from pyteal.ast.abi.bool import Bool, BoolTypeSpec
from pyteal.ast.abi.uint import Uint16, Uint16TypeSpec
from pyteal.ast.abi.util import substringForDecoding
from pyteal.ast.abi.util import substring_for_decoding

T = TypeVar("T", bound=BaseType)

Expand Down Expand Up @@ -101,7 +101,7 @@ def decode(
An expression that partitions the needed parts from given byte strings and stores into
the scratch variable.
"""
extracted = substringForDecoding(
extracted = substring_for_decoding(
encoded, start_index=start_index, end_index=end_index, length=length
)
return self.stored_value.store(extracted)
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ast/abi/array_dynamic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pyteal as pt
from pyteal import abi
from pyteal.ast.abi.util import substringForDecoding
from pyteal.ast.abi.util import substring_for_decoding
from pyteal.ast.abi.tuple import encodeTuple
from pyteal.ast.abi.array_base_test import STATIC_TYPES, DYNAMIC_TYPES
from pyteal.ast.abi.type_test import ContainerType
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_DynamicArray_decode():
assert not expr.has_return()

expectedExpr = value.stored_value.store(
substringForDecoding(
substring_for_decoding(
encoded,
start_index=start_index,
end_index=end_index,
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ast/abi/array_static_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pyteal as pt
from pyteal import abi
from pyteal.ast.abi.util import substringForDecoding
from pyteal.ast.abi.util import substring_for_decoding
from pyteal.ast.abi.tuple import encodeTuple
from pyteal.ast.abi.bool import _bool_sequence_length
from pyteal.ast.abi.type_test import ContainerType
Expand Down Expand Up @@ -125,7 +125,7 @@ def test_StaticArray_decode():
assert not expr.has_return()

expectedExpr = value.stored_value.store(
substringForDecoding(
substring_for_decoding(
encoded,
start_index=start_index,
end_index=end_index,
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ast/abi/string_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pyteal as pt
from pyteal import abi
from pyteal.ast.abi.util import substringForDecoding
from pyteal.ast.abi.util import substring_for_decoding
from pyteal.ast.abi.type_test import ContainerType
from pyteal.util import escapeStr

Expand Down Expand Up @@ -71,7 +71,7 @@ def test_DynamicArray_decode():
assert expr.has_return() is False

expectedExpr = value.stored_value.store(
substringForDecoding(
substring_for_decoding(
encoded,
start_index=start_index,
end_index=end_index,
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ast/abi/tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
_bool_aware_static_byte_length,
)
from pyteal.ast.abi.uint import NUM_BITS_IN_BYTE, Uint16
from pyteal.ast.abi.util import substringForDecoding
from pyteal.ast.abi.util import substring_for_decoding


def encodeTuple(values: Sequence[BaseType]) -> Expr:
Expand Down Expand Up @@ -287,7 +287,7 @@ def decode(
end_index: Expr = None,
length: Expr = None,
) -> Expr:
extracted = substringForDecoding(
extracted = substring_for_decoding(
encoded, start_index=start_index, end_index=end_index, length=length
)
return self.stored_value.store(extracted)
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ast/abi/tuple_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pyteal import abi
from pyteal.ast.abi.tuple import encodeTuple, indexTuple, TupleElement
from pyteal.ast.abi.bool import _encode_bool_sequence
from pyteal.ast.abi.util import substringForDecoding
from pyteal.ast.abi.util import substring_for_decoding
from pyteal.ast.abi.type_test import ContainerType

options = pt.CompileOptions(version=5)
Expand Down Expand Up @@ -624,7 +624,7 @@ def test_Tuple_decode():
assert not expr.has_return()

expectedExpr = tupleValue.stored_value.store(
substringForDecoding(
substring_for_decoding(
encoded,
start_index=start_index,
end_index=end_index,
Expand Down
2 changes: 1 addition & 1 deletion pyteal/ast/abi/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from pyteal.ast.abi.type import TypeSpec, BaseType


def substringForDecoding(
def substring_for_decoding(
encoded: Expr,
*,
start_index: Expr = None,
Expand Down
6 changes: 3 additions & 3 deletions pyteal/ast/abi/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pyteal as pt
from pyteal import abi
from pyteal.ast.abi.util import (
substringForDecoding,
substring_for_decoding,
int_literal_from_annotation,
type_spec_from_algosdk,
type_spec_from_annotation,
Expand Down Expand Up @@ -76,15 +76,15 @@ class SubstringTest(NamedTuple):
for i, test in enumerate(tests):
if not isinstance(test.expected, pt.Expr):
with pytest.raises(test.expected):
substringForDecoding(
substring_for_decoding(
encoded,
start_index=test.start_index,
end_index=test.end_index,
length=test.length,
)
continue

expr = substringForDecoding(
expr = substring_for_decoding(
encoded,
start_index=test.start_index,
end_index=test.end_index,
Expand Down