mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-18 14:29:47 +08:00
Replace Incomplete | None = None in third party stubs (#14063)
This commit is contained in:
@@ -63,4 +63,4 @@ class BraintreeGateway:
|
||||
verification: CreditCardVerificationGateway
|
||||
webhook_notification: WebhookNotificationGateway
|
||||
webhook_testing: WebhookTestingGateway
|
||||
def __init__(self, config: Incomplete | None = None, **kwargs) -> None: ...
|
||||
def __init__(self, config=None, **kwargs) -> None: ...
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class ClientToken:
|
||||
@staticmethod
|
||||
def generate(params: Incomplete | None = None, gateway: Incomplete | None = None): ...
|
||||
def generate(params=None, gateway=None): ...
|
||||
@staticmethod
|
||||
def generate_signature() -> list[str | dict[str, list[str]]]: ...
|
||||
|
||||
@@ -4,4 +4,4 @@ class ClientTokenGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def generate(self, params: Incomplete | None = None): ...
|
||||
def generate(self, params=None): ...
|
||||
|
||||
@@ -12,7 +12,7 @@ class Configuration:
|
||||
public_key: str,
|
||||
private_key: str,
|
||||
*,
|
||||
http_strategy: Incomplete | None = None,
|
||||
http_strategy=None,
|
||||
timeout: int = 60,
|
||||
wrap_http_exceptions: bool = False,
|
||||
) -> None: ...
|
||||
@@ -23,7 +23,7 @@ class Configuration:
|
||||
public_key: str,
|
||||
private_key: str,
|
||||
*,
|
||||
http_strategy: Incomplete | None = None,
|
||||
http_strategy=None,
|
||||
timeout: int = 60,
|
||||
wrap_http_exceptions: bool = False,
|
||||
) -> Configuration: ...
|
||||
@@ -46,7 +46,7 @@ class Configuration:
|
||||
wrap_http_exceptions: bool
|
||||
def __init__(
|
||||
self,
|
||||
environment: Incomplete | None = None,
|
||||
environment=None,
|
||||
merchant_id: str | None = None,
|
||||
public_key: str | None = None,
|
||||
private_key: str | None = None,
|
||||
@@ -56,7 +56,7 @@ class Configuration:
|
||||
*args,
|
||||
timeout: int = 60,
|
||||
wrap_http_exceptions: bool = False,
|
||||
http_strategy: Incomplete | None = None,
|
||||
http_strategy=None,
|
||||
) -> None: ...
|
||||
def base_merchant_path(self) -> str: ...
|
||||
def base_url(self) -> str: ...
|
||||
|
||||
@@ -8,6 +8,6 @@ class ExchangeRateQuoteGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
graphql_client: Incomplete
|
||||
def __init__(self, gateway, graphql_client: Incomplete | None = None) -> None: ...
|
||||
def __init__(self, gateway, graphql_client=None) -> None: ...
|
||||
exchange_rate_quote_payload: ExchangeRateQuotePayload
|
||||
def generate(self, request) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Final
|
||||
|
||||
from braintree.resource import Resource
|
||||
@@ -18,7 +17,7 @@ class MerchantAccount(Resource):
|
||||
master_merchant_account: MerchantAccount
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params=None): ...
|
||||
@staticmethod
|
||||
def update(id, attributes): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -12,7 +12,7 @@ class PaymentMethod(Resource):
|
||||
@staticmethod
|
||||
def update(payment_method_token: str, params) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def delete(payment_method_token: str, options: Incomplete | None = None) -> SuccessfulResult: ...
|
||||
def delete(payment_method_token: str, options=None) -> SuccessfulResult: ...
|
||||
@staticmethod
|
||||
def create_signature() -> (
|
||||
list[
|
||||
|
||||
@@ -11,7 +11,7 @@ class PaymentMethodGateway:
|
||||
def create(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult: ...
|
||||
def find(self, payment_method_token: str) -> Resource: ...
|
||||
def update(self, payment_method_token: str, params) -> SuccessfulResult | ErrorResult: ...
|
||||
def delete(self, payment_method_token: str, options: Incomplete | None = None) -> SuccessfulResult: ...
|
||||
def delete(self, payment_method_token: str, options=None) -> SuccessfulResult: ...
|
||||
options: dict[str, Incomplete]
|
||||
def grant(self, payment_method_token: str, options: Incomplete | None = None) -> SuccessfulResult | ErrorResult: ...
|
||||
def grant(self, payment_method_token: str, options=None) -> SuccessfulResult | ErrorResult: ...
|
||||
def revoke(self, payment_method_token: str) -> SuccessfulResult | ErrorResult: ...
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.subscription import Subscription
|
||||
@@ -11,7 +9,7 @@ class PayPalAccount(Resource):
|
||||
@staticmethod
|
||||
def delete(paypal_account_token: str) -> SuccessfulResult: ...
|
||||
@staticmethod
|
||||
def update(paypal_account_token: str, params: Incomplete | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def update(paypal_account_token: str, params=None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def signature() -> list[str | dict[str, list[str]]]: ...
|
||||
subscriptions: list[Subscription]
|
||||
|
||||
@@ -10,4 +10,4 @@ class PayPalAccountGateway:
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def find(self, paypal_account_token: str) -> PayPalAccount | None: ...
|
||||
def delete(self, paypal_account_token: str) -> SuccessfulResult: ...
|
||||
def update(self, paypal_account_token: str, params: Incomplete | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def update(self, paypal_account_token: str, params=None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.add_on import AddOn
|
||||
from braintree.discount import Discount
|
||||
from braintree.resource import Resource
|
||||
@@ -11,11 +9,11 @@ class Plan(Resource):
|
||||
@staticmethod
|
||||
def all(): ...
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params=None): ...
|
||||
@staticmethod
|
||||
def find(subscription_id): ...
|
||||
@staticmethod
|
||||
def update(subscription_id, params: Incomplete | None = None): ...
|
||||
def update(subscription_id, params=None): ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -5,6 +5,6 @@ class PlanGateway:
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def all(self): ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def create(self, params=None): ...
|
||||
def find(self, plan_id): ...
|
||||
def update(self, plan_id, params: Incomplete | None = None): ...
|
||||
def update(self, plan_id, params=None): ...
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.resource import Resource
|
||||
|
||||
class SettlementBatchSummary(Resource):
|
||||
@staticmethod
|
||||
def generate(settlement_date, group_by_custom_field: Incomplete | None = None): ...
|
||||
def generate(settlement_date, group_by_custom_field=None): ...
|
||||
|
||||
@@ -4,4 +4,4 @@ class SettlementBatchSummaryGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def generate(self, settlement_date, group_by_custom_field: Incomplete | None = None): ...
|
||||
def generate(self, settlement_date, group_by_custom_field=None): ...
|
||||
|
||||
@@ -27,15 +27,15 @@ class Subscription(Resource):
|
||||
Pending: Final = "Pending"
|
||||
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params=None): ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
@staticmethod
|
||||
def find(subscription_id): ...
|
||||
@staticmethod
|
||||
def retry_charge(subscription_id, amount: Incomplete | None = None, submit_for_settlement: bool = False): ...
|
||||
def retry_charge(subscription_id, amount=None, submit_for_settlement: bool = False): ...
|
||||
@staticmethod
|
||||
def update(subscription_id, params: Incomplete | None = None): ...
|
||||
def update(subscription_id, params=None): ...
|
||||
@staticmethod
|
||||
def cancel(subscription_id): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -5,8 +5,8 @@ class SubscriptionGateway:
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def cancel(self, subscription_id): ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def create(self, params=None): ...
|
||||
def find(self, subscription_id): ...
|
||||
def retry_charge(self, subscription_id, amount: Incomplete | None = None, submit_for_settlement: bool = False): ...
|
||||
def retry_charge(self, subscription_id, amount=None, submit_for_settlement: bool = False): ...
|
||||
def search(self, *query): ...
|
||||
def update(self, subscription_id, params: Incomplete | None = None): ...
|
||||
def update(self, subscription_id, params=None): ...
|
||||
|
||||
@@ -99,19 +99,19 @@ class Transaction(Resource):
|
||||
@staticmethod
|
||||
def clone_transaction(transaction_id, params): ...
|
||||
@staticmethod
|
||||
def credit(params: Incomplete | None = None): ...
|
||||
def credit(params=None): ...
|
||||
@staticmethod
|
||||
def find(transaction_id): ...
|
||||
@staticmethod
|
||||
def refund(transaction_id, amount_or_options: Incomplete | None = None): ...
|
||||
def refund(transaction_id, amount_or_options=None): ...
|
||||
@staticmethod
|
||||
def sale(params: Incomplete | None = None): ...
|
||||
def sale(params=None): ...
|
||||
@staticmethod
|
||||
def search(*query): ...
|
||||
@staticmethod
|
||||
def submit_for_settlement(transaction_id, amount: Incomplete | None = None, params: Incomplete | None = None): ...
|
||||
def submit_for_settlement(transaction_id, amount=None, params=None): ...
|
||||
@staticmethod
|
||||
def update_details(transaction_id, params: Incomplete | None = None): ...
|
||||
def update_details(transaction_id, params=None): ...
|
||||
@staticmethod
|
||||
def void(transaction_id): ...
|
||||
@staticmethod
|
||||
@@ -127,13 +127,13 @@ class Transaction(Resource):
|
||||
@staticmethod
|
||||
def package_tracking_signature(): ...
|
||||
@staticmethod
|
||||
def package_tracking(transaction_id, params: Incomplete | None = None): ...
|
||||
def package_tracking(transaction_id, params=None): ...
|
||||
@staticmethod
|
||||
def update_details_signature(): ...
|
||||
@staticmethod
|
||||
def refund_signature(): ...
|
||||
@staticmethod
|
||||
def submit_for_partial_settlement(transaction_id, amount, params: Incomplete | None = None): ...
|
||||
def submit_for_partial_settlement(transaction_id, amount, params=None): ...
|
||||
amount: Decimal
|
||||
tax_amount: Decimal | None
|
||||
discount_amount: Decimal | None
|
||||
|
||||
@@ -10,11 +10,11 @@ class TransactionGateway:
|
||||
def create(self, params): ...
|
||||
def credit(self, params): ...
|
||||
def find(self, transaction_id): ...
|
||||
def refund(self, transaction_id, amount_or_options: Incomplete | None = None): ...
|
||||
def refund(self, transaction_id, amount_or_options=None): ...
|
||||
def sale(self, params): ...
|
||||
def search(self, *query): ...
|
||||
def submit_for_settlement(self, transaction_id, amount: Incomplete | None = None, params: Incomplete | None = None): ...
|
||||
def update_details(self, transaction_id, params: Incomplete | None = None): ...
|
||||
def submit_for_partial_settlement(self, transaction_id, amount, params: Incomplete | None = None): ...
|
||||
def package_tracking(self, transaction_id, params: Incomplete | None = None): ...
|
||||
def submit_for_settlement(self, transaction_id, amount=None, params=None): ...
|
||||
def update_details(self, transaction_id, params=None): ...
|
||||
def submit_for_partial_settlement(self, transaction_id, amount, params=None): ...
|
||||
def package_tracking(self, transaction_id, params=None): ...
|
||||
def void(self, transaction_id): ...
|
||||
|
||||
@@ -27,7 +27,7 @@ class GraphQLClient(Http):
|
||||
def raise_exception_for_graphql_error(response: _Response) -> None: ...
|
||||
graphql_headers: dict[str, str]
|
||||
def __init__(self, config: Configuration | None = None, environment: Environment | None = None) -> None: ...
|
||||
def query(self, definition, variables: Incomplete | None = None, operation_name: Incomplete | None = None): ...
|
||||
def query(self, definition, variables=None, operation_name=None): ...
|
||||
@staticmethod
|
||||
def get_validation_errors(response) -> _ValidationErrors | None: ...
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user