Skip to content

Commit df66cb2

Browse files
authored
Merge branch 'main' into cachetools
2 parents 3d3c0f3 + 4c4f999 commit df66cb2

19 files changed

+129
-21
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def foo(x: Incomplete | None) -> list[Incomplete]: ...
311311
### What to do when a project's documentation and implementation disagree
312312

313313
Type stubs are meant to be external type annotations for a given
314-
library. While they are useful documentation in its own merit, they
314+
library. While they are useful documentation in their own right, they
315315
augment the project's concrete implementation, not the project's
316316
documentation. Whenever you find them disagreeing, model the type
317317
information after the actual implementation and file an issue on the

stdlib/@tests/stubtest_allowlists/darwin-py313.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@
33
# =======
44

55
(mmap.MAP_32BIT)? # Exists locally on MacOS but not on GitHub
6+
7+
# ================
8+
# Unclear problems
9+
# ================
10+
11+
# Added in 3.11.1, flagged by stubtest on Python < 3.14 for unknown reasons
12+
errno.ENOTCAPABLE

stdlib/@tests/stubtest_allowlists/linux-py39.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
# while being inspected by stubtest. Fixed in Python 3.10.
77
select.epoll.register
88

9+
# According to stubtest, these are sometimes not present at runtime, starting
10+
# with Python 3.9.24. Which is not true.
11+
(_frozen_importlib_external.PathFinder.find_distributions)?
12+
(importlib._bootstrap_external.PathFinder.find_distributions)?
13+
(importlib.machinery.PathFinder.find_distributions)?
14+
915

1016
# =============================================================
1117
# Allowlist entries that cannot or should not be fixed; <= 3.12

stdlib/builtins.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,6 +2058,10 @@ class BaseException:
20582058
def __new__(cls, *args: Any, **kwds: Any) -> Self: ...
20592059
def __setstate__(self, state: dict[str, Any] | None, /) -> None: ...
20602060
def with_traceback(self, tb: TracebackType | None, /) -> Self: ...
2061+
# Necessary for security-focused static analyzers (e.g, pysa)
2062+
# See https://github.com/python/typeshed/pull/14900
2063+
def __str__(self) -> str: ... # noqa: Y029
2064+
def __repr__(self) -> str: ... # noqa: Y029
20612065
if sys.version_info >= (3, 11):
20622066
# only present after add_note() is called
20632067
__notes__: list[str]

stdlib/cmath.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def exp(z: _C, /) -> complex: ...
2323
def isclose(a: _C, b: _C, *, rel_tol: SupportsFloat = 1e-09, abs_tol: SupportsFloat = 0.0) -> bool: ...
2424
def isinf(z: _C, /) -> bool: ...
2525
def isnan(z: _C, /) -> bool: ...
26-
def log(x: _C, base: _C = ..., /) -> complex: ...
26+
def log(z: _C, base: _C = ..., /) -> complex: ...
2727
def log10(z: _C, /) -> complex: ...
2828
def phase(z: _C, /) -> float: ...
2929
def polar(z: _C, /) -> tuple[float, float]: ...

stdlib/turtle.pyi

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,20 @@ class Terminator(Exception): ...
221221
class TurtleGraphicsError(Exception): ...
222222

223223
class Shape:
224-
def __init__(self, type_: str, data: _PolygonCoords | PhotoImage | None = None) -> None: ...
224+
def __init__(
225+
self, type_: Literal["polygon", "image", "compound"], data: _PolygonCoords | PhotoImage | None = None
226+
) -> None: ...
225227
def addcomponent(self, poly: _PolygonCoords, fill: _Color, outline: _Color | None = None) -> None: ...
226228

227229
class TurtleScreen(TurtleScreenBase):
228-
def __init__(self, cv: Canvas, mode: str = "standard", colormode: float = 1.0, delay: int = 10) -> None: ...
230+
def __init__(
231+
self, cv: Canvas, mode: Literal["standard", "logo", "world"] = "standard", colormode: float = 1.0, delay: int = 10
232+
) -> None: ...
229233
def clear(self) -> None: ...
230234
@overload
231235
def mode(self, mode: None = None) -> str: ...
232236
@overload
233-
def mode(self, mode: str) -> None: ...
237+
def mode(self, mode: Literal["standard", "logo", "world"]) -> None: ...
234238
def setworldcoordinates(self, llx: float, lly: float, urx: float, ury: float) -> None: ...
235239
def register_shape(self, name: str, shape: _PolygonCoords | Shape | None = None) -> None: ...
236240
@overload
@@ -289,7 +293,7 @@ class TNavigator:
289293
DEFAULT_MODE: str
290294
DEFAULT_ANGLEOFFSET: int
291295
DEFAULT_ANGLEORIENT: int
292-
def __init__(self, mode: str = "standard") -> None: ...
296+
def __init__(self, mode: Literal["standard", "logo", "world"] = "standard") -> None: ...
293297
def reset(self) -> None: ...
294298
def degrees(self, fullcircle: float = 360.0) -> None: ...
295299
def radians(self) -> None: ...
@@ -333,11 +337,11 @@ class TNavigator:
333337
seth = setheading
334338

335339
class TPen:
336-
def __init__(self, resizemode: str = "noresize") -> None: ...
340+
def __init__(self, resizemode: Literal["auto", "user", "noresize"] = "noresize") -> None: ...
337341
@overload
338342
def resizemode(self, rmode: None = None) -> str: ...
339343
@overload
340-
def resizemode(self, rmode: str) -> None: ...
344+
def resizemode(self, rmode: Literal["auto", "user", "noresize"]) -> None: ...
341345
@overload
342346
def pensize(self, width: None = None) -> int: ...
343347
@overload
@@ -389,7 +393,7 @@ class TPen:
389393
fillcolor: _Color = ...,
390394
pensize: int = ...,
391395
speed: int = ...,
392-
resizemode: str = ...,
396+
resizemode: Literal["auto", "user", "noresize"] = ...,
393397
stretchfactor: tuple[float, float] = ...,
394398
outline: int = ...,
395399
tilt: float = ...,
@@ -524,7 +528,7 @@ def clear() -> None: ...
524528
@overload
525529
def mode(mode: None = None) -> str: ...
526530
@overload
527-
def mode(mode: str) -> None: ...
531+
def mode(mode: Literal["standard", "logo", "world"]) -> None: ...
528532
def setworldcoordinates(llx: float, lly: float, urx: float, ury: float) -> None: ...
529533
def register_shape(name: str, shape: _PolygonCoords | Shape | None = None) -> None: ...
530534
@overload
@@ -634,7 +638,7 @@ seth = setheading
634638
@overload
635639
def resizemode(rmode: None = None) -> str: ...
636640
@overload
637-
def resizemode(rmode: str) -> None: ...
641+
def resizemode(rmode: Literal["auto", "user", "noresize"]) -> None: ...
638642
@overload
639643
def pensize(width: None = None) -> int: ...
640644
@overload
@@ -683,7 +687,7 @@ def pen(
683687
fillcolor: _Color = ...,
684688
pensize: int = ...,
685689
speed: int = ...,
686-
resizemode: str = ...,
690+
resizemode: Literal["auto", "user", "noresize"] = ...,
687691
stretchfactor: tuple[float, float] = ...,
688692
outline: int = ...,
689693
tilt: float = ...,

stubs/braintree/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "4.38.*"
1+
version = "4.39.*"
22
upstream_repository = "https://github.com/braintree/braintree_python"

stubs/braintree/braintree/__init__.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ from braintree.amex_express_checkout_card import AmexExpressCheckoutCard as Amex
77
from braintree.android_pay_card import AndroidPayCard as AndroidPayCard
88
from braintree.apple_pay_card import ApplePayCard as ApplePayCard
99
from braintree.apple_pay_gateway import ApplePayGateway as ApplePayGateway
10+
from braintree.bank_account_instant_verification_gateway import (
11+
BankAccountInstantVerificationGateway as BankAccountInstantVerificationGateway,
12+
)
13+
from braintree.bank_account_instant_verification_jwt import BankAccountInstantVerificationJwt as BankAccountInstantVerificationJwt
14+
from braintree.bank_account_instant_verification_jwt_request import (
15+
BankAccountInstantVerificationJwtRequest as BankAccountInstantVerificationJwtRequest,
16+
)
1017
from braintree.blik_alias import BlikAlias as BlikAlias
1118
from braintree.braintree_gateway import BraintreeGateway as BraintreeGateway
1219
from braintree.client_token import ClientToken as ClientToken
@@ -62,10 +69,12 @@ from braintree.paypal_payment_resource import PayPalPaymentResource as PayPalPay
6269
from braintree.plan import Plan as Plan
6370
from braintree.plan_gateway import PlanGateway as PlanGateway
6471
from braintree.processor_response_types import ProcessorResponseTypes as ProcessorResponseTypes
72+
from braintree.receiver import Receiver as Receiver
6573
from braintree.resource_collection import ResourceCollection as ResourceCollection
6674
from braintree.risk_data import RiskData as RiskData
6775
from braintree.samsung_pay_card import SamsungPayCard as SamsungPayCard
6876
from braintree.search import Search as Search
77+
from braintree.sender import Sender as Sender
6978
from braintree.sepa_direct_debit_account import SepaDirectDebitAccount as SepaDirectDebitAccount
7079
from braintree.settlement_batch_summary import SettlementBatchSummary as SettlementBatchSummary
7180
from braintree.signature_service import SignatureService as SignatureService
@@ -84,9 +93,11 @@ from braintree.transaction_details import TransactionDetails as TransactionDetai
8493
from braintree.transaction_gateway import TransactionGateway as TransactionGateway
8594
from braintree.transaction_line_item import TransactionLineItem as TransactionLineItem
8695
from braintree.transaction_search import TransactionSearch as TransactionSearch
96+
from braintree.transaction_us_bank_account_request import TransactionUsBankAccountRequest as TransactionUsBankAccountRequest
8797
from braintree.transfer import Transfer as Transfer
8898
from braintree.unknown_payment_method import UnknownPaymentMethod as UnknownPaymentMethod
8999
from braintree.us_bank_account import UsBankAccount as UsBankAccount
100+
from braintree.us_bank_account_verification import UsBankAccountVerification as UsBankAccountVerification
90101
from braintree.validation_error_collection import ValidationErrorCollection as ValidationErrorCollection
91102
from braintree.venmo_account import VenmoAccount as VenmoAccount
92103
from braintree.venmo_profile_data import VenmoProfileData as VenmoProfileData
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from _typeshed import Incomplete
2+
from typing import Final
3+
4+
from braintree.error_result import ErrorResult
5+
from braintree.successful_result import SuccessfulResult
6+
7+
class BankAccountInstantVerificationGateway:
8+
gateway: Incomplete
9+
config: Incomplete
10+
graphql_client: Incomplete
11+
CREATE_JWT_MUTATION: Final[str]
12+
def __init__(self, gateway) -> None: ...
13+
def create_jwt(self, request) -> SuccessfulResult | ErrorResult: ...
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from braintree.attribute_getter import AttributeGetter
2+
3+
class BankAccountInstantVerificationJwt(AttributeGetter):
4+
def __init__(self, jwt) -> None: ...
5+
@property
6+
def jwt(self): ...
7+
@jwt.setter
8+
def jwt(self, value) -> None: ...

0 commit comments

Comments
 (0)