Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove # type: ignore after each REQUIRED #765

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/generate_tx_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _generate_param_line(param: str, is_required: bool) -> str:
param_name = param[2:]
param_type = sfields[param_name][0]
if is_required:
param_type_output = f"{TYPE_MAP[param_type]} = REQUIRED # type: ignore"
param_type_output = f"{TYPE_MAP[param_type]} = REQUIRED"
else:
param_type_output = f"Optional[{TYPE_MAP[param_type]}] = None"
return f" {_key_to_json(param_name)}: {param_type_output}"
Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/amounts/issued_currency_amount.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class IssuedCurrencyAmount(IssuedCurrency):
See https://xrpl.org/currency-formats.html#issued-currency-amounts.
"""

value: Union[str, int, float] = REQUIRED # type: ignore
value: Union[str, int, float] = REQUIRED
"""
This field is required.

Expand Down
4 changes: 2 additions & 2 deletions xrpl/models/amounts/mpt_amount.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
class MPTAmount(BaseModel):
"""Specifies an MPT amount."""

mpt_issuance_id: str = REQUIRED # type: ignore
mpt_issuance_id: str = REQUIRED
"""
This field is required.

:meta hide-value:
"""

value: Union[str, int, float] = REQUIRED # type: ignore
value: Union[str, int, float] = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/auth_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class AuthAccount(NestedModel):
"""Represents one entry in a list of AuthAccounts used in AMMBid transaction."""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
4 changes: 2 additions & 2 deletions xrpl/models/currencies/issued_currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ class IssuedCurrency(BaseModel):
See https://xrpl.org/currency-formats.html#specifying-currency-amounts
"""

currency: str = REQUIRED # type: ignore
currency: str = REQUIRED
"""
This field is required.

:meta hide-value:
"""

issuer: str = REQUIRED # type: ignore
issuer: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AccountChannels(Request, LookupByLedgerRequest):
"""

method: RequestMethod = field(default=RequestMethod.ACCOUNT_CHANNELS, init=False)
account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_currencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AccountCurrencies(Request, LookupByLedgerRequest):
`See account_currencies <https://xrpl.org/account_currencies.html>`_
"""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AccountInfo(Request, LookupByLedgerRequest):
`See account_info <https://xrpl.org/account_info.html>`_
"""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AccountLines(Request, LookupByLedgerRequest):
`See account_lines <https://xrpl.org/account_lines.html>`_
"""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_nfts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AccountNFTs(Request, LookupByLedgerRequest):
"""

method: RequestMethod = field(default=RequestMethod.ACCOUNT_NFTS, init=False)
account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
The unique identifier of an account, typically the account's address. The
request returns NFTs owned by this account. This value is required.
Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AccountObjects(Request, LookupByLedgerRequest):
`See account_objects <https://xrpl.org/account_objects.html>`_
"""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_offers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AccountOffers(Request, LookupByLedgerRequest):
`See account_offers <https://xrpl.org/account_offers.html>`_
"""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/account_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AccountTx(Request, LookupByLedgerRequest):
`See account_tx <https://xrpl.org/account_tx.html>`_
"""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
4 changes: 2 additions & 2 deletions xrpl/models/requests/book_offers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class BookOffers(Request, LookupByLedgerRequest):
as the order book, between two currencies.
"""

taker_gets: Currency = REQUIRED # type: ignore
taker_gets: Currency = REQUIRED
"""
This field is required.

:meta hide-value:
"""

taker_pays: Currency = REQUIRED # type: ignore
taker_pays: Currency = REQUIRED
"""
This field is required.

Expand Down
4 changes: 2 additions & 2 deletions xrpl/models/requests/channel_authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class ChannelAuthorize(Request):
"""

method: RequestMethod = field(default=RequestMethod.CHANNEL_AUTHORIZE, init=False)
channel_id: str = REQUIRED # type: ignore
channel_id: str = REQUIRED
"""
This field is required.

:meta hide-value:
"""

amount: str = REQUIRED # type: ignore
amount: str = REQUIRED
"""
This field is required.

Expand Down
8 changes: 4 additions & 4 deletions xrpl/models/requests/channel_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ class ChannelVerify(Request):
"""

method: RequestMethod = field(default=RequestMethod.CHANNEL_VERIFY, init=False)
channel_id: str = REQUIRED # type: ignore
channel_id: str = REQUIRED
"""
This field is required.

:meta hide-value:
"""

amount: str = REQUIRED # type: ignore
amount: str = REQUIRED
"""
This field is required.

:meta hide-value:
"""

public_key: str = REQUIRED # type: ignore
public_key: str = REQUIRED
"""
This field is required.

:meta hide-value:
"""

signature: str = REQUIRED # type: ignore
signature: str = REQUIRED
"""
This field is required.

Expand Down
4 changes: 2 additions & 2 deletions xrpl/models/requests/deposit_authorized.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class DepositAuthorized(Request, LookupByLedgerRequest):
authorization to deliver money to your account.
"""

source_account: str = REQUIRED # type: ignore
source_account: str = REQUIRED
"""
This field is required.

:meta hide-value:
"""

destination_account: str = REQUIRED # type: ignore
destination_account: str = REQUIRED
"""
This field is required.

Expand Down
2 changes: 1 addition & 1 deletion xrpl/models/requests/gateway_balances.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GatewayBalances(Request, LookupByLedgerRequest):
`See gateway_balances <https://xrpl.org/gateway_balances.html>`_
"""

account: str = REQUIRED # type: ignore
account: str = REQUIRED
"""
This field is required.

Expand Down
6 changes: 3 additions & 3 deletions xrpl/models/requests/get_aggregate_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class GetAggregatePrice(Request):

method: RequestMethod = field(default=RequestMethod.GET_AGGREGATE_PRICE, init=False)

base_asset: str = REQUIRED # type: ignore
base_asset: str = REQUIRED
"""The currency code of the asset to be priced"""

quote_asset: str = REQUIRED # type: ignore
quote_asset: str = REQUIRED
"""The currency code of the asset to quote the price of the base asset"""

oracles: List[Oracle] = REQUIRED # type: ignore
oracles: List[Oracle] = REQUIRED
"""The oracle identifier"""

trim: Optional[int] = None
Expand Down
Loading