Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 608eca5

Browse files
authored
Improve stubs for braintree.environment (#10907)
1 parent d14c5f8 commit 608eca5

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed
Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,47 @@
1-
from typing import Any
1+
from _typeshed import Incomplete
2+
from typing import ClassVar
23

34
from braintree.exceptions.configuration_error import ConfigurationError as ConfigurationError
45

56
class Environment:
6-
__name__: Any
7-
is_ssl: Any
8-
ssl_certificate: Any
7+
Development: ClassVar[Environment]
8+
QA: ClassVar[Environment]
9+
Sandbox: ClassVar[Environment]
10+
Production: ClassVar[Environment]
11+
All: ClassVar[dict[str, Environment]]
12+
__name__: str
13+
is_ssl: bool
14+
ssl_certificate: Incomplete
915
def __init__(
10-
self, name, server, port, auth_url, is_ssl, ssl_certificate, graphql_server: str = "", graphql_port: str = ""
16+
self,
17+
name,
18+
server: str,
19+
port,
20+
auth_url: str,
21+
is_ssl: bool,
22+
ssl_certificate,
23+
graphql_server: str = "",
24+
graphql_port: str = "",
1125
) -> None: ...
1226
@property
13-
def base_url(self): ...
27+
def base_url(self) -> str: ...
1428
@property
15-
def port(self): ...
29+
def port(self) -> int: ...
1630
@property
17-
def auth_url(self): ...
31+
def auth_url(self) -> str: ...
1832
@property
19-
def protocol(self): ...
33+
def protocol(self) -> str: ...
2034
@property
21-
def server(self): ...
35+
def server(self) -> str: ...
2236
@property
23-
def server_and_port(self): ...
37+
def server_and_port(self) -> str: ...
2438
@property
25-
def graphql_server(self): ...
39+
def graphql_server(self) -> str: ...
2640
@property
27-
def graphql_port(self): ...
41+
def graphql_port(self) -> str: ...
2842
@property
29-
def graphql_server_and_port(self): ...
43+
def graphql_server_and_port(self) -> str: ...
3044
@staticmethod
31-
def parse_environment(environment): ...
45+
def parse_environment(environment: Environment | str | None) -> Environment | None: ...
3246
@staticmethod
33-
def braintree_root(): ...
47+
def braintree_root() -> str: ...

0 commit comments

Comments
 (0)