Skip to content

Commit 24bcb9d

Browse files
committed
sync with schema-salad typeshed
1 parent 20f3a57 commit 24bcb9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4083
-429
lines changed

typeshed/black/__init__.pyi

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import asyncio
2+
from concurrent.futures import Executor
3+
from enum import Enum
4+
from pathlib import Path
5+
from typing import (
6+
Any,
7+
Iterator,
8+
List,
9+
MutableMapping,
10+
Optional,
11+
Pattern,
12+
Set,
13+
Sized,
14+
Tuple,
15+
Union,
16+
)
17+
18+
from black.mode import Mode as Mode
19+
from black.mode import TargetVersion as TargetVersion
20+
21+
FileContent = str
22+
Encoding = str
23+
NewLine = str
24+
FileMode = Mode
25+
26+
def format_str(src_contents: str, mode: Mode) -> FileContent: ...

typeshed/cachecontrol/__init__.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6+
67
from .wrapper import CacheControl as CacheControl
7-
#from .adapter import CacheControlAdapter as CacheControlAdapter
8-
#from .controller import CacheController as CacheController
8+
9+
# from .adapter import CacheControlAdapter as CacheControlAdapter
10+
# from .controller import CacheController as CacheController
911

1012
__email__ = ... # type: Any

typeshed/cachecontrol/adapter.pyi

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,28 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6+
67
from requests.adapters import HTTPAdapter
7-
from .controller import CacheController as CacheController
8+
89
from .cache import DictCache as DictCache
10+
from .controller import CacheController as CacheController
911
from .filewrapper import CallbackFileWrapper as CallbackFileWrapper
1012

1113
class CacheControlAdapter(HTTPAdapter):
1214
invalidating_methods = ... # type: Any
1315
cache = ... # type: Any
1416
heuristic = ... # type: Any
1517
controller = ... # type: Any
16-
def __init__(self, cache=None, cache_etags=True, controller_class=None, serializer=None, heuristic=None, *args, **kw): ...
18+
def __init__(
19+
self,
20+
cache=None,
21+
cache_etags=True,
22+
controller_class=None,
23+
serializer=None,
24+
heuristic=None,
25+
*args,
26+
**kw
27+
): ...
1728
def send(self, request, **kw): ...
1829
def build_response(self, request, response, from_cache=False): ...
1930
def close(self): ...

typeshed/cachecontrol/caches/__init__.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6+
67
from .file_cache import FileCache as FileCache
7-
#from .redis_cache import RedisCache as RedisCache
8+
9+
# from .redis_cache import RedisCache as RedisCache
810

911
notice = ... # type: Any

typeshed/cachecontrol/caches/file_cache.pyi

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
# Stubs for cachecontrol.caches.file_cache (Python 2)
2-
#
31
# NOTE: This dynamically typed stub was automatically generated by stubgen.
42

5-
from typing import Any, Callable
3+
from os import PathLike
4+
from typing import Any, Callable, Union
5+
66
from ..cache import BaseCache as BaseCache
77
from ..controller import CacheController as CacheController
88

99
class FileCache(BaseCache):
10-
directory = ... # type: str
10+
directory = ... # type: Union[str, PathLike[str]]
1111
forever = ... # type: bool
1212
filemode = ... # type: str
1313
dirmode = ... # type: str
1414
lock_class = ... # type: Callable
15-
def __init__(self, directory: str, forever=False, filemode=384, dirmode=448, use_dir_lock=None, lock_class=None) -> None: ...
15+
def __init__(
16+
self,
17+
directory: Union[str, PathLike[str]],
18+
forever=False,
19+
filemode=384,
20+
dirmode=448,
21+
use_dir_lock=None,
22+
lock_class=None,
23+
) -> None: ...
1624
@staticmethod
1725
def encode(x): ...
1826
def get(self, key): ...

typeshed/cachecontrol/compat.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
from typing import Any
66

7-
text_type = ... # type: Any
7+
str = ... # type: Any

typeshed/cachecontrol/controller.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6-
#from .cache import DictCache as DictCache
7-
#from .serialize import Serializer as Serializer
6+
7+
# from .cache import DictCache as DictCache
8+
# from .serialize import Serializer as Serializer
89

910
logger = ... # type: Any
1011
URI = ... # type: Any

typeshed/cachecontrol/serialize.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

5-
from .compat import HTTPResponse as HTTPResponse, pickle as pickle, text_type as text_type
5+
from .compat import HTTPResponse as HTTPResponse
6+
from .compat import pickle as pickle
7+
from .compat import str as str
68

79
class Serializer:
810
def dumps(self, request, response, body=None): ...

typeshed/cachecontrol/wrapper.pyi

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

5-
from typing import Optional, Union
6-
from .adapter import CacheControlAdapter as CacheControlAdapter
7-
from .cache import DictCache, BaseCache
8-
import requests
5+
from typing import Any, Optional
96

10-
def CacheControl(sess: requests.sessions.Session,
11-
cache: Optional[Union[DictCache, BaseCache]] = None,
12-
cache_etags: bool = True,
13-
serializer=None,
14-
heuristic=None) -> requests.sessions.Session: ...
7+
from .adapter import CacheControlAdapter
8+
from .cache import DictCache
9+
10+
def CacheControl(
11+
sess: Any,
12+
cache: Optional[Any] = ...,
13+
cache_etags: bool = ...,
14+
serializer: Optional[Any] = ...,
15+
heuristic: Optional[Any] = ...,
16+
): ...

0 commit comments

Comments
 (0)