diff options
author | morpheus65535 <[email protected]> | 2022-09-22 06:33:33 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2022-09-22 06:33:33 -0400 |
commit | a338de147e8a4d74ca266b1306997fcfc90b8941 (patch) | |
tree | 6970a11c1c6126677f00e153107c2812a37f069a /libs/attrs | |
parent | 131b4e5cde4034f78923d7eaebd49b3550f8aa13 (diff) | |
download | bazarr-a338de147e8a4d74ca266b1306997fcfc90b8941.tar.gz bazarr-a338de147e8a4d74ca266b1306997fcfc90b8941.zip |
Fixed import error after last commit.v1.1.2-beta.8
Diffstat (limited to 'libs/attrs')
-rw-r--r-- | libs/attrs/__init__.py | 70 | ||||
-rw-r--r-- | libs/attrs/__init__.pyi | 66 | ||||
-rw-r--r-- | libs/attrs/converters.py | 3 | ||||
-rw-r--r-- | libs/attrs/exceptions.py | 3 | ||||
-rw-r--r-- | libs/attrs/filters.py | 3 | ||||
-rw-r--r-- | libs/attrs/py.typed | 0 | ||||
-rw-r--r-- | libs/attrs/setters.py | 3 | ||||
-rw-r--r-- | libs/attrs/validators.py | 3 |
8 files changed, 151 insertions, 0 deletions
diff --git a/libs/attrs/__init__.py b/libs/attrs/__init__.py new file mode 100644 index 000000000..a704b8b56 --- /dev/null +++ b/libs/attrs/__init__.py @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: MIT + +from attr import ( + NOTHING, + Attribute, + Factory, + __author__, + __copyright__, + __description__, + __doc__, + __email__, + __license__, + __title__, + __url__, + __version__, + __version_info__, + assoc, + cmp_using, + define, + evolve, + field, + fields, + fields_dict, + frozen, + has, + make_class, + mutable, + resolve_types, + validate, +) +from attr._next_gen import asdict, astuple + +from . import converters, exceptions, filters, setters, validators + + +__all__ = [ + "__author__", + "__copyright__", + "__description__", + "__doc__", + "__email__", + "__license__", + "__title__", + "__url__", + "__version__", + "__version_info__", + "asdict", + "assoc", + "astuple", + "Attribute", + "cmp_using", + "converters", + "define", + "evolve", + "exceptions", + "Factory", + "field", + "fields_dict", + "fields", + "filters", + "frozen", + "has", + "make_class", + "mutable", + "NOTHING", + "resolve_types", + "setters", + "validate", + "validators", +] diff --git a/libs/attrs/__init__.pyi b/libs/attrs/__init__.pyi new file mode 100644 index 000000000..fc44de46a --- /dev/null +++ b/libs/attrs/__init__.pyi @@ -0,0 +1,66 @@ +from typing import ( + Any, + Callable, + Dict, + Mapping, + Optional, + Sequence, + Tuple, + Type, +) + +# Because we need to type our own stuff, we have to make everything from +# attr explicitly public too. +from attr import __author__ as __author__ +from attr import __copyright__ as __copyright__ +from attr import __description__ as __description__ +from attr import __email__ as __email__ +from attr import __license__ as __license__ +from attr import __title__ as __title__ +from attr import __url__ as __url__ +from attr import __version__ as __version__ +from attr import __version_info__ as __version_info__ +from attr import _FilterType +from attr import assoc as assoc +from attr import Attribute as Attribute +from attr import cmp_using as cmp_using +from attr import converters as converters +from attr import define as define +from attr import evolve as evolve +from attr import exceptions as exceptions +from attr import Factory as Factory +from attr import field as field +from attr import fields as fields +from attr import fields_dict as fields_dict +from attr import filters as filters +from attr import frozen as frozen +from attr import has as has +from attr import make_class as make_class +from attr import mutable as mutable +from attr import NOTHING as NOTHING +from attr import resolve_types as resolve_types +from attr import setters as setters +from attr import validate as validate +from attr import validators as validators + +# TODO: see definition of attr.asdict/astuple +def asdict( + inst: Any, + recurse: bool = ..., + filter: Optional[_FilterType[Any]] = ..., + dict_factory: Type[Mapping[Any, Any]] = ..., + retain_collection_types: bool = ..., + value_serializer: Optional[ + Callable[[type, Attribute[Any], Any], Any] + ] = ..., + tuple_keys: bool = ..., +) -> Dict[str, Any]: ... + +# TODO: add support for returning NamedTuple from the mypy plugin +def astuple( + inst: Any, + recurse: bool = ..., + filter: Optional[_FilterType[Any]] = ..., + tuple_factory: Type[Sequence[Any]] = ..., + retain_collection_types: bool = ..., +) -> Tuple[Any, ...]: ... diff --git a/libs/attrs/converters.py b/libs/attrs/converters.py new file mode 100644 index 000000000..edfa8d3c1 --- /dev/null +++ b/libs/attrs/converters.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.converters import * # noqa diff --git a/libs/attrs/exceptions.py b/libs/attrs/exceptions.py new file mode 100644 index 000000000..bd9efed20 --- /dev/null +++ b/libs/attrs/exceptions.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.exceptions import * # noqa diff --git a/libs/attrs/filters.py b/libs/attrs/filters.py new file mode 100644 index 000000000..52959005b --- /dev/null +++ b/libs/attrs/filters.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.filters import * # noqa diff --git a/libs/attrs/py.typed b/libs/attrs/py.typed new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libs/attrs/py.typed diff --git a/libs/attrs/setters.py b/libs/attrs/setters.py new file mode 100644 index 000000000..9b5077080 --- /dev/null +++ b/libs/attrs/setters.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.setters import * # noqa diff --git a/libs/attrs/validators.py b/libs/attrs/validators.py new file mode 100644 index 000000000..ab2c9b302 --- /dev/null +++ b/libs/attrs/validators.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.validators import * # noqa |