Skip to content

Commit

Permalink
CU-86dt9vq5z - format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirella de Medeiros committed May 13, 2024
1 parent e5e5e83 commit 49731b6
Show file tree
Hide file tree
Showing 92 changed files with 123 additions and 124 deletions.
4 changes: 2 additions & 2 deletions boa3/builtin/contract/Nep17Contract.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.interop.contract import Contract
from boa3.builtin.type import UInt160

Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/contract/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
'to_script_hash',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.compile_time import CreateNewEvent
from boa3.builtin.contract.Nep17Contract import Nep17Contract
from boa3.builtin.type import ECPoint, UInt160, Event
Expand Down
2 changes: 1 addition & 1 deletion boa3/builtin/interop/blockchain/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"WitnessRuleAction",
"WitnessScope",
]
from deprecation import deprecated

from deprecation import deprecated

from boa3.builtin.type import UInt160
from boa3.internal.neo3.network.payloads.verification import WitnessConditionType, WitnessRuleAction, WitnessScope
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/interop/contract/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
'GAS',
]

from deprecation import deprecated

from collections.abc import Sequence
from typing import Any

from deprecation import deprecated

from boa3.builtin.interop.contract.callflagstype import CallFlags
from boa3.builtin.interop.contract.contract import Contract
from boa3.builtin.interop.contract.contractmanifest import ContractManifest
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/interop/crypto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
'bls12_381_serialize',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.interop.crypto.ibls12381 import IBls12381
from boa3.builtin.interop.crypto.namedcurve import NamedCurve
from boa3.builtin.type import ECPoint
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/interop/iterator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
'Iterator',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated


@deprecated(details='This module is deprecated. Use boa3.sc.utils instead')
class Iterator:
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/interop/json/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
'json_deserialize',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated


@deprecated(details='This module is deprecated. Use StdLib from boa3.sc.contracts instead')
def json_serialize(item: Any) -> str:
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/interop/runtime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
'script_container',
]

from deprecation import deprecated

from collections.abc import Sequence
from typing import Any

from deprecation import deprecated

from boa3.builtin.interop.blockchain import Transaction
from boa3.builtin.interop.contract.callflagstype import CallFlags
from boa3.builtin.interop.runtime.notification import Notification
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/interop/stdlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
'memory_compare',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated


@deprecated(details='This module is deprecated. Use StdLib from boa3.sc.contracts instead')
def base58_encode(key: bytes) -> str:
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/nativecontract/contractmanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
'Contract',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.interop.contract import Contract
from boa3.builtin.type import UInt160

Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/nativecontract/cryptolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
'IBls12381'
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.interop.crypto import NamedCurve, IBls12381
from boa3.builtin.type import ECPoint, UInt160

Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/nativecontract/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
'GAS',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.type import UInt160


Expand Down
1 change: 0 additions & 1 deletion boa3/builtin/nativecontract/ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from deprecation import deprecated


from boa3.builtin.interop.blockchain import Block, Signer, Transaction, VMState
from boa3.builtin.type import UInt256, UInt160

Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/nativecontract/neo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
'NEO',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.contract import NeoAccountState
from boa3.builtin.interop.iterator import Iterator
from boa3.builtin.type import ECPoint, UInt160
Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/nativecontract/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
'Oracle',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.type import UInt160


Expand Down
4 changes: 2 additions & 2 deletions boa3/builtin/nativecontract/stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
'StdLib',
]

from deprecation import deprecated

from typing import Any

from deprecation import deprecated

from boa3.builtin.type import UInt160


Expand Down
2 changes: 1 addition & 1 deletion boa3/internal/analyser/analyser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ast
from typing import Self

from boa3.sc.compiletime import NeoMetadata
from boa3.internal import constants
from boa3.internal.analyser.astanalyser import IAstAnalyser
from boa3.internal.analyser.astoptimizer import AstOptimizer
Expand All @@ -14,6 +13,7 @@
from boa3.internal.exception.CompilerWarning import CompilerWarning
from boa3.internal.model.symbol import ISymbol
from boa3.internal.model.type.type import Type
from boa3.sc.compiletime import NeoMetadata


class Analyser:
Expand Down
2 changes: 1 addition & 1 deletion boa3/internal/analyser/moduleanalyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from collections.abc import Iterable
from typing import Any

from boa3.sc.compiletime import NeoMetadata
from boa3.internal import constants
from boa3.internal.analyser import asthelper
from boa3.internal.analyser.astanalyser import IAstAnalyser
Expand Down Expand Up @@ -41,6 +40,7 @@
from boa3.internal.model.type.primitive.primitivetype import PrimitiveType
from boa3.internal.model.type.type import IType, Type
from boa3.internal.model.variable import Variable
from boa3.sc.compiletime import NeoMetadata


class ModuleAnalyser(IAstAnalyser, ast.NodeVisitor):
Expand Down
2 changes: 1 addition & 1 deletion boa3/internal/compiler/compiledmetadata.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Self

from boa3.sc.compiletime import NeoMetadata
from boa3.internal import constants
from boa3.internal.neo3.core.types import UInt160
from boa3.sc.compiletime import NeoMetadata


class CompiledMetadata:
Expand Down
2 changes: 1 addition & 1 deletion boa3/internal/model/sc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum

from boa3.internal.model.builtin.compile_time import NeoMetadataType
from boa3.internal.model.builtin.builtin import Builtin
from boa3.internal.model.builtin.compile_time import NeoMetadataType
from boa3.internal.model.builtin.interop.contract.contractmanifest import *
from boa3.internal.model.builtin.interop.interop import Interop
from boa3.internal.model.builtin.native.nativecontract import NativeContract
Expand Down
2 changes: 1 addition & 1 deletion boa3/internal/neo3/core/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# type: ignore

from enum import Enum
from collections.abc import Iterable
from enum import Enum

from boa3.internal.neo3.core import Size, serialization

Expand Down
2 changes: 1 addition & 1 deletion boa3/sc/contracts/neotoken.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from typing import Any

from boa3.sc.utils.iterator import Iterator
from boa3.sc.types import ECPoint, UInt160, NeoAccountState
from boa3.sc.utils.iterator import Iterator


class NeoToken:
Expand Down
2 changes: 1 addition & 1 deletion boa3/sc/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@

from typing import Any

from boa3.sc.utils.iterator import Iterator
from boa3.sc.storage.storagecontext import StorageContext
from boa3.sc.storage.storagemap import StorageMap
from boa3.sc.types import FindOptions, UInt256, ECPoint, UInt160
from boa3.sc.utils.iterator import Iterator


def get_context() -> StorageContext:
Expand Down
8 changes: 4 additions & 4 deletions boa3/sc/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@

from boa3.internal.neo.vm.opcode.Opcode import Opcode
from boa3.internal.neo.vm.type.ContractParameterType import ContractParameterType
from boa3.internal.neo3.contracts import CallFlags
from boa3.internal.neo3.contracts import TriggerType
from boa3.internal.neo3.contracts.findoptions import FindOptions
from boa3.internal.neo3.contracts.namedcurve import NamedCurve
from boa3.internal.neo3.contracts.native import Role
from boa3.internal.neo3.network.payloads import OracleResponseCode
from boa3.internal.neo3.network.payloads.verification import WitnessScope, WitnessRuleAction, WitnessConditionType
from boa3.internal.neo3.contracts.findoptions import FindOptions
from boa3.internal.neo3.contracts import TriggerType
from boa3.internal.neo3.vm import VMState
from boa3.internal.neo3.contracts import CallFlags
from boa3.internal.neo3.network.payloads import OracleResponseCode


class UInt160(bytes):
Expand Down
6 changes: 3 additions & 3 deletions boa3_test/examples/amm.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from typing import Any

from boa3.sc import runtime, storage
from boa3.sc.compiletime import NeoMetadata, public
from boa3.sc.utils import CreateNewEvent, Nep17TransferEvent, abort, call_contract
from boa3.sc.math import sqrt
from boa3.sc.contracts import ContractManagement
from boa3.sc.math import sqrt
from boa3.sc.types import UInt160
from boa3.sc import storage, runtime
from boa3.sc.utils import CreateNewEvent, Nep17TransferEvent, abort, call_contract


# -------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions boa3_test/examples/auxiliary_contracts/update_contract.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from typing import Any

from boa3.sc import runtime, storage
from boa3.sc.compiletime import NeoMetadata, public
from boa3.sc.utils import CreateNewEvent
from boa3.sc.runtime import check_witness
from boa3.sc.contracts import ContractManagement
from boa3.sc.runtime import check_witness
from boa3.sc.types import UInt160
from boa3.sc import storage, runtime
from boa3.sc.utils import CreateNewEvent

# -------------------------------------------
# TOKEN SETTINGS
Expand Down
2 changes: 1 addition & 1 deletion boa3_test/examples/hello_world.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from boa3.sc.compiletime import NeoMetadata, public
from boa3.sc import storage
from boa3.sc.compiletime import NeoMetadata, public


@public
Expand Down
4 changes: 2 additions & 2 deletions boa3_test/examples/htlc.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import Any

from boa3.sc import runtime, storage
from boa3.sc.compiletime import NeoMetadata, public
from boa3.sc.utils import abort, call_contract, hash160
from boa3.sc.contracts import GasToken
from boa3.sc.types import UInt160
from boa3.sc import storage, runtime
from boa3.sc.utils import abort, call_contract, hash160


# -------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions boa3_test/examples/ico.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import Any

from boa3.sc import runtime, storage
from boa3.sc.compiletime import NeoMetadata, public
from boa3.sc.utils import Nep17TransferEvent, abort, call_contract
from boa3.sc.contracts import ContractManagement, GasToken as GAS_TOKEN, NeoToken as NEO_TOKEN
from boa3.sc.types import UInt160
from boa3.sc import storage, runtime
from boa3.sc.utils import Nep17TransferEvent, abort, call_contract


# -------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions boa3_test/examples/nep11_non_divisible.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

from typing import Any, cast

from boa3.sc import storage
from boa3.sc.compiletime import NeoMetadata, public
from boa3.sc.utils import CreateNewEvent, abort, call_contract, get_call_flags
from boa3.sc.contracts import ContractManagement, StdLib
from boa3.sc.utils.iterator import Iterator
from boa3.sc.runtime import check_witness, get_network, script_container
from boa3.sc import storage
from boa3.sc.types import FindOptions, UInt160, CallFlags
from boa3.sc.utils import CreateNewEvent, abort, call_contract, get_call_flags
from boa3.sc.utils import to_bytes
from boa3.sc.utils.iterator import Iterator


# -------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions boa3_test/examples/nep17.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import Any, cast

from boa3.sc import runtime, storage
from boa3.sc.compiletime import NeoMetadata, public
from boa3.sc.utils import Nep17TransferEvent, abort, call_contract
from boa3.sc.contracts import ContractManagement, NeoToken, GasToken
from boa3.sc.types import UInt160
from boa3.sc import storage, runtime
from boa3.sc.utils import Nep17TransferEvent, abort, call_contract


# -------------------------------------------
Expand Down
Loading

0 comments on commit 49731b6

Please sign in to comment.