summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2021-01-29 10:59:11 +0100
committerHynek Schlawack <hs@ox.cx>2021-01-29 10:59:11 +0100
commitb717ad9de02777462b0956a3e48635e6967e995f (patch)
tree6a7dac3620656a99bacb132219c1a7283d13aab2
parent68b5e048da0992aa2139a4b39429352cbbdda65c (diff)
downloadattrs-b717ad9de02777462b0956a3e48635e6967e995f.tar.gz
pre-commit autoupdate
-rw-r--r--.pre-commit-config.yaml4
-rw-r--r--src/attr/__init__.pyi6
-rw-r--r--src/attr/converters.pyi4
-rw-r--r--src/attr/exceptions.pyi1
-rw-r--r--src/attr/filters.pyi4
-rw-r--r--src/attr/setters.pyi6
-rw-r--r--src/attr/validators.pyi20
7 files changed, 27 insertions, 18 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 98a22aa..cb59b3a 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,7 +7,7 @@ repos:
language_version: python3.8
- repo: https://github.com/PyCQA/isort
- rev: 5.6.4
+ rev: 5.7.0
hooks:
- id: isort
additional_dependencies: [toml]
@@ -26,7 +26,7 @@ repos:
language_version: python3.8
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v3.3.0
+ rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
diff --git a/src/attr/__init__.pyi b/src/attr/__init__.pyi
index 442d6e7..12af003 100644
--- a/src/attr/__init__.pyi
+++ b/src/attr/__init__.pyi
@@ -4,9 +4,9 @@ from typing import (
Dict,
Generic,
List,
+ Mapping,
Optional,
Sequence,
- Mapping,
Tuple,
Type,
TypeVar,
@@ -15,14 +15,14 @@ from typing import (
)
# `import X as X` is required to make these public
+from . import converters as converters
from . import exceptions as exceptions
from . import filters as filters
-from . import converters as converters
from . import setters as setters
from . import validators as validators
-
from ._version_info import VersionInfo
+
__version__: str
__version_info__: VersionInfo
__title__: str
diff --git a/src/attr/converters.pyi b/src/attr/converters.pyi
index 7b0caa1..84a5759 100644
--- a/src/attr/converters.pyi
+++ b/src/attr/converters.pyi
@@ -1,6 +1,8 @@
-from typing import TypeVar, Optional, Callable, overload
+from typing import Callable, Optional, TypeVar, overload
+
from . import _ConverterType
+
_T = TypeVar("_T")
def pipe(*validators: _ConverterType) -> _ConverterType: ...
diff --git a/src/attr/exceptions.pyi b/src/attr/exceptions.pyi
index f268011..a800fb2 100644
--- a/src/attr/exceptions.pyi
+++ b/src/attr/exceptions.pyi
@@ -1,5 +1,6 @@
from typing import Any
+
class FrozenError(AttributeError):
msg: str = ...
diff --git a/src/attr/filters.pyi b/src/attr/filters.pyi
index 68368fe..f7b63f1 100644
--- a/src/attr/filters.pyi
+++ b/src/attr/filters.pyi
@@ -1,5 +1,7 @@
-from typing import Union, Any
+from typing import Any, Union
+
from . import Attribute, _FilterType
+
def include(*what: Union[type, Attribute[Any]]) -> _FilterType[Any]: ...
def exclude(*what: Union[type, Attribute[Any]]) -> _FilterType[Any]: ...
diff --git a/src/attr/setters.pyi b/src/attr/setters.pyi
index 19bc33f..91a9455 100644
--- a/src/attr/setters.pyi
+++ b/src/attr/setters.pyi
@@ -1,5 +1,7 @@
-from . import _OnSetAttrType, Attribute
-from typing import TypeVar, Any, NewType, NoReturn, cast
+from typing import Any, NewType, NoReturn, TypeVar, cast
+
+from . import Attribute, _OnSetAttrType
+
_T = TypeVar("_T")
diff --git a/src/attr/validators.pyi b/src/attr/validators.pyi
index 9a22abb..fe92aac 100644
--- a/src/attr/validators.pyi
+++ b/src/attr/validators.pyi
@@ -1,21 +1,23 @@
from typing import (
- Container,
- List,
- Union,
- TypeVar,
- Type,
Any,
- Optional,
- Tuple,
+ AnyStr,
+ Callable,
+ Container,
Iterable,
+ List,
Mapping,
- Callable,
Match,
- AnyStr,
+ Optional,
+ Tuple,
+ Type,
+ TypeVar,
+ Union,
overload,
)
+
from . import _ValidatorType
+
_T = TypeVar("_T")
_T1 = TypeVar("_T1")
_T2 = TypeVar("_T2")