Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stubs: Reformat *.pyi files with Black.

Anders Kaseorgae655bdc69dc
diff --git a/stubs/stripe/__init__.pyi b/stubs/stripe/__init__.pyi
index 9561f785625..06712dd8727 100644
--- a/stubs/stripe/__init__.pyi
+++ b/stubs/stripe/__init__.pyi
@@ -23,28 +23,22 @@ class Customer:
description: str
discount: Optional[Discount]
metadata: Dict[str, str]
-
@staticmethod
- def retrieve(customer_id: str=..., expand: Optional[List[str]]=...) -> Customer:
- ...
-
+ def retrieve(customer_id: str = ..., expand: Optional[List[str]] = ...) -> Customer: ...
@staticmethod
- def create(description: str=..., email: str=..., metadata: Dict[str, Any]=...,
- source: Optional[str]=..., coupon: Optional[str]=...) -> Customer:
- ...
-
+ def create(
+ description: str = ...,
+ email: str = ...,
+ metadata: Dict[str, Any] = ...,
+ source: Optional[str] = ...,
+ coupon: Optional[str] = ...,
+ ) -> Customer: ...
@staticmethod
- def save(customer: Customer) -> Customer:
- ...
-
+ def save(customer: Customer) -> Customer: ...
@staticmethod
- def delete_discount(customer: Customer) -> None:
- ...
-
+ def delete_discount(customer: Customer) -> None: ...
@staticmethod
- def list(limit: Optional[int]=...) -> List[Customer]:
- ...
-
+ def list(limit: Optional[int] = ...) -> List[Customer]: ...
class Invoice:
id: str
@@ -58,42 +52,37 @@ class Invoice:
status: str
status_transitions: Any
total: int
-
@staticmethod
- def upcoming(customer: str=..., subscription: str=...,
- subscription_items: List[Dict[str, Union[str, int]]]=...) -> Invoice:
- ...
-
+ def upcoming(
+ customer: str = ...,
+ subscription: str = ...,
+ subscription_items: List[Dict[str, Union[str, int]]] = ...,
+ ) -> Invoice: ...
@staticmethod
- def list(billing: str=..., customer: str=...,
- status: str=..., limit: Optional[int]=...,
- starting_after: Optional[Invoice]=...,
- ) -> List[Invoice]:
- ...
-
+ def list(
+ billing: str = ...,
+ customer: str = ...,
+ status: str = ...,
+ limit: Optional[int] = ...,
+ starting_after: Optional[Invoice] = ...,
+ ) -> List[Invoice]: ...
@staticmethod
- def create(auto_advance: bool=..., billing: str=..., customer: str=...,
- days_until_due: Optional[int]=..., statement_descriptor: str=...) -> Invoice:
- ...
-
+ def create(
+ auto_advance: bool = ...,
+ billing: str = ...,
+ customer: str = ...,
+ days_until_due: Optional[int] = ...,
+ statement_descriptor: str = ...,
+ ) -> Invoice: ...
@staticmethod
- def finalize_invoice(invoice: Invoice) -> Invoice:
- ...
-
+ def finalize_invoice(invoice: Invoice) -> Invoice: ...
@staticmethod
- def pay(invoice: Invoice, paid_out_of_band: bool=False) -> Invoice:
- ...
-
+ def pay(invoice: Invoice, paid_out_of_band: bool = False) -> Invoice: ...
@staticmethod
- def void_invoice(id: str) -> None:
- ...
-
- def get(self, key: str) -> Any:
- ...
-
+ def void_invoice(id: str) -> None: ...
+ def get(self, key: str) -> Any: ...
@staticmethod
- def refresh(invoice: Invoice) -> Invoice:
- ...
+ def refresh(invoice: Invoice) -> Invoice: ...
class Subscription:
created: int
@@ -103,24 +92,21 @@ class Subscription:
days_until_due: Optional[int]
proration_date: int
quantity: int
-
@staticmethod
- def create(customer: str=..., billing: str=..., days_until_due: Optional[int]=...,
- items: List[Dict[str, Any]]=...,
- prorate: bool=..., tax_percent: float=...) -> Subscription:
- ...
-
+ def create(
+ customer: str = ...,
+ billing: str = ...,
+ days_until_due: Optional[int] = ...,
+ items: List[Dict[str, Any]] = ...,
+ prorate: bool = ...,
+ tax_percent: float = ...,
+ ) -> Subscription: ...
@staticmethod
- def save(subscription: Subscription, idempotency_key: str=...) -> Subscription:
- ...
-
+ def save(subscription: Subscription, idempotency_key: str = ...) -> Subscription: ...
@staticmethod
- def delete(subscription: Subscription) -> Subscription:
- ...
-
+ def delete(subscription: Subscription) -> Subscription: ...
@staticmethod
- def retrieve(subscription_id: str) -> Subscription:
- ...
+ def retrieve(subscription_id: str) -> Subscription: ...
class Source:
id: str
@@ -135,18 +121,23 @@ class Card:
class Plan:
id: str
-
@staticmethod
- def create(currency: str=..., interval: str=..., product: str=..., amount: int=...,
- billing_scheme: str=..., nickname: str=..., usage_type: str=...) -> Plan:
- ...
+ def create(
+ currency: str = ...,
+ interval: str = ...,
+ product: str = ...,
+ amount: int = ...,
+ billing_scheme: str = ...,
+ nickname: str = ...,
+ usage_type: str = ...,
+ ) -> Plan: ...
class Product:
id: str
-
@staticmethod
- def create(name: str=..., type: str=..., statement_descriptor: str=..., unit_label: str=...) -> Product:
- ...
+ def create(
+ name: str = ..., type: str = ..., statement_descriptor: str = ..., unit_label: str = ...
+ ) -> Product: ...
class Discount:
coupon: Coupon
@@ -154,16 +145,13 @@ class Discount:
class Coupon:
id: str
percent_off: int
-
@staticmethod
- def create(duration: str=..., name: str=..., percent_off: int=...) -> Coupon:
- ...
+ def create(duration: str = ..., name: str = ..., percent_off: int = ...) -> Coupon: ...
class Token:
id: str
@staticmethod
- def create(card: Dict[str, Any]) -> Token:
- ...
+ def create(card: Dict[str, Any]) -> Token: ...
class Charge:
amount: int
@@ -172,29 +160,34 @@ class Charge:
receipt_email: str
source: Source
statement_descriptor: str
-
@staticmethod
- def list(customer: Optional[str]) -> List[Charge]:
- ...
-
+ def list(customer: Optional[str]) -> List[Charge]: ...
@staticmethod
- def create(amount: int=..., currency: str=..., customer: str=..., description: str=...,
- receipt_email: str=..., statement_descriptor: str=...) -> Charge:
- ...
+ def create(
+ amount: int = ...,
+ currency: str = ...,
+ customer: str = ...,
+ description: str = ...,
+ receipt_email: str = ...,
+ statement_descriptor: str = ...,
+ ) -> Charge: ...
class InvoiceItem:
@staticmethod
- def create(amount: int=..., currency: str=..., customer: str=..., description: str=...,
- discountable: bool=..., period: Dict[str, int]=..., quantity: int=...,
- unit_amount: int=..., idempotency_key: Optional[str]=...) -> InvoiceItem:
- ...
-
+ def create(
+ amount: int = ...,
+ currency: str = ...,
+ customer: str = ...,
+ description: str = ...,
+ discountable: bool = ...,
+ period: Dict[str, int] = ...,
+ quantity: int = ...,
+ unit_amount: int = ...,
+ idempotency_key: Optional[str] = ...,
+ ) -> InvoiceItem: ...
@staticmethod
- def list(customer: Optional[str]) -> List[InvoiceItem]:
- ...
+ def list(customer: Optional[str]) -> List[InvoiceItem]: ...
class InvoiceLineItem:
amount: int
-
- def get(self, key: str) -> Any:
- ...
+ def get(self, key: str) -> Any: ...
diff --git a/stubs/stripe/api_requestor/__init__.pyi b/stubs/stripe/api_requestor/__init__.pyi
index 8bef5e85f06..a43809f54a7 100644
--- a/stubs/stripe/api_requestor/__init__.pyi
+++ b/stubs/stripe/api_requestor/__init__.pyi
@@ -1,5 +1,6 @@
from typing import Any, Dict
class APIRequestor:
- def interpret_response(self, http_body: str, http_status: int, http_headers: Dict[str, Any]) -> None:
- ...
+ def interpret_response(
+ self, http_body: str, http_status: int, http_headers: Dict[str, Any]
+ ) -> None: ...
diff --git a/stubs/stripe/api_resources/list_object/__init__.pyi b/stubs/stripe/api_resources/list_object/__init__.pyi
index d1e87884a02..a2263df1347 100644
--- a/stubs/stripe/api_resources/list_object/__init__.pyi
+++ b/stubs/stripe/api_resources/list_object/__init__.pyi
@@ -3,6 +3,4 @@ from typing import Optional, Any, Dict, List, Iterator
class SubscriptionListObject:
data: List[Subscription]
-
- def __iter__(self) -> Iterator[Subscription]:
- ...
+ def __iter__(self) -> Iterator[Subscription]: ...
diff --git a/stubs/stripe/error/__init__.pyi b/stubs/stripe/error/__init__.pyi
index 55a9ea80dd9..a1d53918a81 100644
--- a/stubs/stripe/error/__init__.pyi
+++ b/stubs/stripe/error/__init__.pyi
@@ -4,35 +4,54 @@ from typing import Any, Dict, Optional
# and https://github.com/stripe/stripe-python/blob/master/stripe/error.py
class StripeError(Exception):
- def __init__(self, message: Optional[str]=None, http_body: Optional[str]=None,
- http_status: Optional[int]=None, json_body: Optional[Dict[str, Any]]=None,
- headers: Optional[Dict[str, Any]]=None, code: Optional[str]=None) -> None:
- ...
-
+ def __init__(
+ self,
+ message: Optional[str] = None,
+ http_body: Optional[str] = None,
+ http_status: Optional[int] = None,
+ json_body: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, Any]] = None,
+ code: Optional[str] = None,
+ ) -> None: ...
http_status: str
json_body: Dict[str, Any]
class CardError(StripeError):
- def __init__(self, message: str, param: str, code: str, http_body: Optional[str]=None,
- http_status: Optional[int]=None, json_body: Optional[Dict[str, Any]]=None,
- headers: Optional[Dict[str, Any]]=None) -> None:
- ...
-
-class RateLimitError(StripeError):
- ...
+ def __init__(
+ self,
+ message: str,
+ param: str,
+ code: str,
+ http_body: Optional[str] = None,
+ http_status: Optional[int] = None,
+ json_body: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, Any]] = None,
+ ) -> None: ...
+
+class RateLimitError(StripeError): ...
class InvalidRequestError(StripeError):
- def __init__(self, message: str, param: str, code: str, http_body: Optional[str]=None,
- http_status: Optional[int]=None, json_body: Optional[Dict[str, Any]]=None,
- headers: Optional[Dict[str, Any]]=None) -> None:
- ...
-
-class AuthenticationError(StripeError):
- ...
+ def __init__(
+ self,
+ message: str,
+ param: str,
+ code: str,
+ http_body: Optional[str] = None,
+ http_status: Optional[int] = None,
+ json_body: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, Any]] = None,
+ ) -> None: ...
+
+class AuthenticationError(StripeError): ...
class APIConnectionError(StripeError):
- def __init__(self, message: Optional[str]=None, http_body: Optional[str]=None,
- http_status: Optional[int]=None, json_body: Optional[Dict[str, Any]]=None,
- headers: Optional[Dict[str, Any]]=None, code: Optional[str]=None,
- should_retry: bool=False) -> None:
- ...
+ def __init__(
+ self,
+ message: Optional[str] = None,
+ http_body: Optional[str] = None,
+ http_status: Optional[int] = None,
+ json_body: Optional[Dict[str, Any]] = None,
+ headers: Optional[Dict[str, Any]] = None,
+ code: Optional[str] = None,
+ should_retry: bool = False,
+ ) -> None: ...
diff --git a/stubs/stripe/util/__init__.pyi b/stubs/stripe/util/__init__.pyi
index 101a4099a95..45db9a9d862 100644
--- a/stubs/stripe/util/__init__.pyi
+++ b/stubs/stripe/util/__init__.pyi
@@ -1,4 +1,3 @@
from typing import Any, Dict
-def convert_to_stripe_object(fixture_data: Dict[Any, Any]) -> Any:
- ...
+def convert_to_stripe_object(fixture_data: Dict[Any, Any]) -> Any: ...