-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/pip/attrs-approx-eq-21.4
- Loading branch information
Showing
93 changed files
with
1,918 additions
and
4,678 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include versioneer.py | ||
include spock/_version.py | ||
include "README.md", "LICENSE.txt", "NOTICE.txt", "CONTRIBUTING.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
black~=21.4b0 | ||
black~=22.1 ; python_version >= '3.7' | ||
black~=21.4b0 ; python_version == '3.6' | ||
coveralls~=3.3 | ||
coverage~=6.1 | ||
isort~=5.10 | ||
moto~=2.3 | ||
moto~=3.0 | ||
pydoc-markdown~=4.3 ; python_version >= '3.7' | ||
pydoc-markdown~=3.13 ; python_version == '3.6' | ||
pytest~=6.2 | ||
pytest~=7.0 | ||
pytest-cov~=3.0 | ||
pylint~=2.11 | ||
pylint~=2.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from typing import Any, Callable, List, Optional, Tuple, TypeVar, Union, overload | ||
|
||
from attr import attrib, field | ||
|
||
from spock.backend.typed import SavePath | ||
from spock.builder import ConfigArgBuilder | ||
|
||
_T = TypeVar("_T") | ||
_C = TypeVar("_C", bound=type) | ||
SavePath: SavePath | ||
|
||
# Note: from here | ||
# https://github.com/python-attrs/attrs/blob/main/src/attr/__init__.pyi | ||
|
||
# Static type inference support via __dataclass_transform__ implemented as per: | ||
# https://github.com/microsoft/pyright/blob/main/specs/dataclass_transforms.md | ||
# This annotation must be applied to all overloads of "spock_attr" | ||
|
||
# NOTE: This is a typing construct and does not exist at runtime. Extensions | ||
# wrapping attrs decorators should declare a separate __dataclass_transform__ | ||
# signature in the extension module using the specification linked above to | ||
# provide pyright support -- this currently doesn't work in PyCharm | ||
def __dataclass_transform__( | ||
*, | ||
eq_default: bool = True, | ||
order_default: bool = False, | ||
kw_only_default: bool = False, | ||
field_descriptors: Tuple[Union[type, Callable[..., Any]], ...] = (()), | ||
) -> Callable[[_T], _T]: ... | ||
@overload | ||
@__dataclass_transform__(kw_only_default=True, field_descriptors=(attrib, field)) | ||
def spock( | ||
maybe_cls: _C, | ||
kw_only: bool = True, | ||
make_init: bool = True, | ||
dynamic: bool = False, | ||
) -> _C: ... | ||
@overload | ||
@__dataclass_transform__(kw_only_default=True, field_descriptors=(attrib, field)) | ||
def spock( | ||
maybe_cls: None = ..., | ||
kw_only: bool = True, | ||
make_init: bool = True, | ||
dynamic: bool = False, | ||
) -> Callable[[_C], _C]: ... | ||
def SpockBuilder( | ||
*args: _C, | ||
configs: Optional[List] = None, | ||
desc: str = "", | ||
lazy: bool = False, | ||
no_cmd_line: bool = False, | ||
s3_config: Optional[_C] = None, | ||
**kwargs, | ||
) -> ConfigArgBuilder: ... |
Oops, something went wrong.