Skip to content

Commit

Permalink
🤫
Browse files Browse the repository at this point in the history
  • Loading branch information
achidlow committed Dec 11, 2023
1 parent 92fb682 commit e1595f7
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 278 deletions.
22 changes: 0 additions & 22 deletions examples/aug_ass_wit_side_efex/lol.py

This file was deleted.

25 changes: 0 additions & 25 deletions examples/aug_ass_wit_side_efex/out/lol.awst

This file was deleted.

39 changes: 0 additions & 39 deletions examples/aug_ass_wit_side_efex/puya.log

This file was deleted.

3 changes: 0 additions & 3 deletions examples/hello_world/puya.log

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

25 changes: 0 additions & 25 deletions examples/out/with_structs.awst

This file was deleted.

7 changes: 0 additions & 7 deletions examples/with_structs.puya.log

This file was deleted.

26 changes: 0 additions & 26 deletions examples/with_structs.py

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "puya"
version = "0.1.1"
version = "0.1.2"
description = "An optimising Python to TEAL compiler"
authors = ["Algorand Foundation <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 0 additions & 2 deletions src/puyapy-stubs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# ruff: noqa: F403
# note: arc4 deliberately imported as module instead of re-exporting
from puyapy import arc4 as arc4
from puyapy._array import *
from puyapy._constants import *
from puyapy._contract import *
from puyapy._gen import *
from puyapy._hints import *
from puyapy._primitives import *
from puyapy._reference import *
from puyapy._storage import *
from puyapy._struct import *
from puyapy._transactions import *
from puyapy._unsigned_builtins import *
from puyapy._util import *
Expand Down
58 changes: 0 additions & 58 deletions src/puyapy-stubs/_array.pyi

This file was deleted.

22 changes: 0 additions & 22 deletions src/puyapy-stubs/_struct.pyi

This file was deleted.

49 changes: 1 addition & 48 deletions tests/test_awst/module.test
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ class NotAllowed(typing.NamedTuple): ## E: Unsupported construct ClassDef: Named
an_int: UInt64

## case: unsupported_class
from puyapy import Struct, Contract, UInt64

class AllowedStruct(Struct):
a: UInt64
from puyapy import Contract, UInt64

class AllowedContract(Contract):

Expand All @@ -60,50 +57,6 @@ class AllowedContract(Contract):
class NotAllowed: ## E: not a subclass of puyapy.Contract or a direct subclass of puyapy.Struct
pass

## case: indirect_struct_subclass
from puyapy import Struct, UInt64

class AllowedStruct(Struct):
a: UInt64

class NotAllowed(AllowedStruct): ## E: Struct classes must only inherit directly from Struct
b: UInt64

## case: allowed_struct_types
from puyapy import Account, BigUInt, Bytes, Struct, UInt64

class MyStruct(Struct):
allowed_uint64: UInt64
allowed_Bytes: Bytes
allowed_biguint: BigUInt
allowed_account: Account
allowed_bool: bool

## case: not_allowed_struct_types
from puyapy import Struct

# TODO: fix error messages for these cases
class NotAllowedBytes(Struct):
not_allowed_bytes: bytes ## E: Unhandled puyapy name: builtins.bytes

class NotAllowedStr(Struct):
not_allowed_str: str ## E: Unhandled puyapy name: builtins.str

class NotAllowedFloat(Struct):
not_allowed_float: float ## E: Unhandled puyapy name: builtins.float

class NotAllowedInt(Struct):
not_allowed_int: int ## E: Unhandled puyapy name: builtins.int

## case: not_allowed_struct_statements
from puyapy import Struct, UInt64

class NotAllowed(Struct):
value: UInt64

def get_value(self) -> UInt64: ## E: Unsupported Struct declaration
return self.value

## case: all_ignored

FOO = 1
Expand Down

0 comments on commit e1595f7

Please sign in to comment.