Skip to content

Commit

Permalink
chore: Update lib awst
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmenzel committed Oct 30, 2024
1 parent 82c3de3 commit 6b30872
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/generate_puya_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def main() -> None:
output_path = VCS_ROOT / "src" / "puya" / "ir" / "_puya_lib.awst.json"
replace_awst = awst_path.read_text()
for lib_path in puya_lib_path.glob("*.py"):
find_str = f'"file": "{lib_path}",'
path_as_str = str(lib_path).replace("\\", "\\\\")
find_str = f'"file": "{path_as_str}",'
replace_str = '"file": null,'
replace_awst = replace_awst.replace(find_str, replace_str)
output_path.write_text(replace_awst)
Expand Down
14 changes: 14 additions & 0 deletions src/puya/ir/_puya_lib.awst.json
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,13 @@
"end_column": 23
},
"value": true,
"wtype": {
"name": "bool",
"scalar_type": 2,
"ephemeral": false,
"immutable": true,
"_type": "WType"
},
"_type": "BoolConstant"
},
"_type": "ReturnStatement"
Expand Down Expand Up @@ -1240,6 +1247,13 @@
"end_column": 16
},
"value": false,
"wtype": {
"name": "bool",
"scalar_type": 2,
"ephemeral": false,
"immutable": true,
"_type": "WType"
},
"_type": "BoolConstant"
},
"_type": "ReturnStatement"
Expand Down
2 changes: 1 addition & 1 deletion test_cases/literals/puya.log
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ literals/folding.py:49:12 warning: expression is always True
literals/folding.py:50:17 warning: expression is always False
literals/folding.py:53:12 warning: due to Python ints being signed, bitwise inversion yield a negative number
literals/folding.py:80:12 warning: due to Python ints being signed, bitwise inversion yield a negative number
literals/folding.py:80:12 warning: Bitwise inversion '~' on bool is deprecated. This returns the bitwise inversion of the underlying int object and is usually not what you expect from negating a bool. Use the 'not' operator for boolean negation or ~int(x) if you really want the bitwise inversion of the underlying int.
literals/folding.py:80:12 warning: Bitwise inversion '~' on bool is deprecated and will be removed in Python 3.16. This returns the bitwise inversion of the underlying int object and is usually not what you expect from negating a bool. Use the 'not' operator for boolean negation or ~int(x) if you really want the bitwise inversion of the underlying int.
info: writing literals/out/module.awst
debug: Sealing block@0: // L12
debug: Terminated block@0: // L12
Expand Down

0 comments on commit 6b30872

Please sign in to comment.