Skip to content

Commit

Permalink
api: remove deprecated code (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje authored Oct 14, 2024
1 parent 7a6e4cc commit e020274
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions neo3/api/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from __future__ import annotations
from typing import Callable, Any, TypeVar, Optional, cast, Generic, TypeAlias
from typing_extensions import deprecated
from collections.abc import Sequence
import asyncio
from enum import IntEnum
Expand Down Expand Up @@ -1005,9 +1004,8 @@ def get_gas_per_block(self) -> ContractMethodResult[int]:
)
return ContractMethodResult(script, unwrap.as_int)

@deprecated("end argument is deprecated", stacklevel=2)
def get_unclaimed_gas(
self, account: types.UInt160 | NeoAddress, end: Optional[int] = None
self, account: types.UInt160 | NeoAddress
) -> ContractMethodResult[int]:
"""
Get the amount of unclaimed GAS.
Expand Down Expand Up @@ -1290,11 +1288,6 @@ def process(res: noderpc.ExecutionResult, _: int = 0) -> list[types.UInt160]:

return ContractMethodResult(sb.to_array(), process)

@deprecated("use total_owned_by", category=DeprecationWarning, stacklevel=2)
def balance_of(
self, owner: types.UInt160 | NeoAddress, token_id: bytes
) -> ContractMethodResult[int]:
return self.total_owned_by(owner, token_id)

def total_owned_by(
self, owner: types.UInt160 | NeoAddress, token_id: bytes
Expand All @@ -1311,13 +1304,6 @@ def total_owned_by(
)
return ContractMethodResult(sb.to_array(), unwrap.as_int)

@deprecated(
"use total_owned_by_friendly", category=DeprecationWarning, stacklevel=2
)
def balance_of_friendly(
self, owner: types.UInt160 | NeoAddress, token_id: bytes
) -> ContractMethodResult[float]:
return self.total_owned_by_friendly(owner, token_id)

def total_owned_by_friendly(
self, owner: types.UInt160 | NeoAddress, token_id: bytes
Expand Down

0 comments on commit e020274

Please sign in to comment.