Skip to content

Commit 822eb26

Browse files
authored
chore: update puyapy dependency to 5.7.1 (PR #59)
2 parents 2c80892 + 663ec61 commit 822eb26

File tree

45 files changed

+158
-210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+158
-210
lines changed

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ type = "virtual"
5050
path = ".venv"
5151
python = "3.12"
5252
dependencies = [
53-
"puyapy>=5",
53+
"puyapy>=5.7.1",
5454
"pytest>=7.4",
5555
"pytest-mock>=3.10.0",
5656
"pytest-xdist[psutil]>=3.3",
5757
"py-algorand-sdk>=2.4.0",
5858
"algokit-utils>=4.0.0",
5959
"pytest-cov>=4.1.0",
6060
"prettytable>=3.9.0",
61-
"mypy==1.10",
61+
"mypy==1.19.1",
6262
]
6363

6464
[tool.hatch.envs.default.env-vars]
@@ -132,7 +132,7 @@ dependencies = [
132132
"pytest-cov>=4.1.0",
133133
"py-algorand-sdk>=2.4.0",
134134
"algokit-utils>=4.0.0",
135-
"puyapy>=5",
135+
"puyapy>=5.7.1",
136136
]
137137

138138
[tool.hatch.envs.test.scripts]
@@ -190,7 +190,7 @@ dependencies = [
190190
"py-algorand-sdk>=2.4.0",
191191
"algokit-utils>=4.0.0",
192192
"pytest-cov>=4.1.0",
193-
"mypy==1.10",
193+
"mypy==1.19.1",
194194
]
195195

196196
[tool.hatch.envs.examples.scripts]

src/_algopy_testing/arc4.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,17 +1154,17 @@ class _StructMeta(type):
11541154

11551155
def _tuple_type_from_struct(struct: type[Struct]) -> type[Tuple]: # type: ignore[type-arg]
11561156
field_types = [f.type for f in struct._type_info.fields]
1157-
return parameterize_type(Tuple, *field_types)
1157+
return parameterize_type(Tuple, *field_types) # type: ignore[arg-type]
11581158

11591159

1160-
class Struct(MutableBytes, _ABIEncoded, metaclass=_StructMeta): # type: ignore[misc]
1160+
class Struct(MutableBytes, _ABIEncoded, metaclass=_StructMeta):
11611161
"""Base class for ARC4 Struct types."""
11621162

11631163
_type_info: typing.ClassVar[_StructTypeInfo] # type: ignore[misc]
11641164

11651165
def __init_subclass__(cls, *args: typing.Any, **kwargs: dict[str, typing.Any]) -> None:
11661166
# make implementation not frozen, so we can conditionally control behaviour
1167-
dataclasses.dataclass(cls, *args, **{**kwargs, "frozen": False})
1167+
dataclasses.dataclass(cls, *args, **{**kwargs, "frozen": False}) # type: ignore[call-overload]
11681168
frozen = kwargs.get("frozen", False)
11691169
assert isinstance(frozen, bool)
11701170
cls._type_info = _StructTypeInfo(cls, frozen=frozen)

src/_algopy_testing/itxn_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, inner_txn: InnerTransactionResultType):
4848
def _get_itxn(self, txn_type: type[_T]) -> _T:
4949
if (
5050
not isinstance(self._inner_txn, txn_type)
51-
and getattr(self._inner_txn, "type", None) != self._TXN_TYPE_MAP[txn_type]
51+
and getattr(self._inner_txn, "type", None) != self._TXN_TYPE_MAP[txn_type] # type: ignore[index]
5252
):
5353
raise TypeError(f"transaction is not of type {txn_type.__name__}!")
5454
return self._inner_txn # type: ignore[return-value]

src/_algopy_testing/models/account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AccountContextData:
7575

7676
opted_assets: dict[int, AssetHolding] = dataclasses.field(default_factory=dict)
7777
opted_apps: dict[int, algopy.Application] = dataclasses.field(default_factory=dict)
78-
fields: AccountFields = dataclasses.field(default_factory=AccountFields) # type: ignore[arg-type]
78+
fields: AccountFields = dataclasses.field(default_factory=AccountFields)
7979

8080

8181
class Account(BytesBacked):

src/_algopy_testing/primitives/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ class Struct(Serializable, MutableBytes):
531531

532532
def __init_subclass__(cls, *args: typing.Any, **kwargs: dict[str, typing.Any]) -> None:
533533
# make implementation not frozen, so we can conditionally control behaviour
534-
dataclasses.dataclass(cls, *args, **{**kwargs, "frozen": False})
534+
dataclasses.dataclass(cls, *args, **{**kwargs, "frozen": False}) # type: ignore[call-overload]
535535
frozen = kwargs.get("frozen", False)
536536
cls._field_names = [
537537
f.name for f in dataclasses.fields(typing.cast("type[DataclassInstance]", cls))

src/_algopy_testing/serialize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _items_to_native(items: Sequence[object]) -> tuple[object, ...]:
145145
return tuple(result)
146146

147147
return _Serializer(
148-
arc4_type=arc4.Tuple[*(s.arc4_type for s in serializers)], # type: ignore[misc]
148+
arc4_type=arc4.Tuple[*(s.arc4_type for s in serializers)], # type: ignore[misc,arg-type]
149149
native_to_arc4=lambda t: arc4.Tuple(_items_to_arc4(t)),
150150
arc4_to_native=lambda t: _items_to_native(t),
151151
)
@@ -190,7 +190,7 @@ def type_of(value: object) -> type:
190190
if it is a generic type."""
191191
# get fully parametrized tuples
192192
if isinstance(value, tuple) and type(value) is tuple:
193-
return tuple[*(type_of(i) for i in value)] # type: ignore[misc, no-any-return]
193+
return tuple[*(type_of(i) for i in value)] # type: ignore[misc,return-value]
194194
else:
195195
return type(value)
196196

src/_algopy_testing/state/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ def deserialize(typ: type[_TValue], value: SerializableValue) -> _TValue:
3737
elif issubclass(typ, bool):
3838
return value != 0 # type: ignore[return-value]
3939
elif issubclass(typ, UInt64 | Bytes):
40-
return typ(value) # type: ignore[arg-type, return-value]
40+
return typ(value) # type: ignore[arg-type]
4141
elif issubclass(typ, UInt64Backed):
4242
if isinstance(value, bytes):
4343
raise TypeError("expected int, received bytes")
44-
return typ.from_int(value) # type: ignore[return-value]
44+
return typ.from_int(value)
4545
elif issubclass(typ, BytesBacked | Serializable):
4646
if isinstance(value, int):
4747
raise TypeError("expected bytes, received int")
48-
return typ.from_bytes(value) # type: ignore[return-value]
48+
return typ.from_bytes(value)
4949
else:
5050
raise TypeError(f"Unsupported type: {typ}")
5151

tests/artifacts/AVM12/data/Contract.arc56.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"compiler": "puya",
111111
"compilerVersion": {
112112
"major": 5,
113-
"minor": 5,
113+
"minor": 6,
114114
"patch": 0
115115
}
116116
},

tests/artifacts/AVM12/data/ContractV0.arc56.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"compiler": "puya",
8282
"compilerVersion": {
8383
"major": 5,
84-
"minor": 5,
84+
"minor": 6,
8585
"patch": 0
8686
}
8787
},

tests/artifacts/AVM12/data/ContractV1.arc56.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"compiler": "puya",
8282
"compilerVersion": {
8383
"major": 5,
84-
"minor": 5,
84+
"minor": 6,
8585
"patch": 0
8686
}
8787
},

0 commit comments

Comments
 (0)