Skip to content

Commit

Permalink
Update define typing defs for new param
Browse files Browse the repository at this point in the history
  • Loading branch information
RNKuhns committed Apr 11, 2024
1 parent 2305452 commit a8f80ca
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/attrs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import sys

from typing import (
Any,
Callable,
Mapping,
Sequence,
overload,
TypeVar,
)
from typing import Any, Callable, Mapping, Sequence, TypeVar, overload

# Because we need to type our own stuff, we have to make everything from
# attr explicitly public too.
from attr import NOTHING as NOTHING
from attr import Attribute as Attribute
from attr import AttrsInstance as AttrsInstance
from attr import Factory as Factory
from attr import __author__ as __author__
from attr import __copyright__ as __copyright__
from attr import __description__ as __description__
Expand All @@ -20,25 +16,23 @@ 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 asdict as asdict
from attr import assoc as assoc
from attr import Attribute as Attribute
from attr import AttrsInstance as AttrsInstance
from attr import astuple as astuple
from attr import attrib
from attr import cmp_using as cmp_using
from attr import converters as converters
from attr import evolve as evolve
from attr import exceptions as exceptions
from attr import Factory as Factory
from attr import fields as fields
from attr import fields_dict as fields_dict
from attr import filters as filters
from attr import has as has
from attr import make_class as make_class
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
from attr import attrib, asdict as asdict, astuple as astuple

if sys.version_info >= (3, 11):
from typing import dataclass_transform
Expand Down Expand Up @@ -167,6 +161,7 @@ def define(
on_setattr: _OnSetAttrArgType | None = ...,
field_transformer: _FieldTransformer | None = ...,
match_args: bool = ...,
only_non_default_attr_in_repr: bool = ...,
) -> _C: ...
@overload
@dataclass_transform(field_specifiers=(attrib, field))
Expand All @@ -193,6 +188,7 @@ def define(
on_setattr: _OnSetAttrArgType | None = ...,
field_transformer: _FieldTransformer | None = ...,
match_args: bool = ...,
only_non_default_attr_in_repr: bool = ...,
) -> Callable[[_C], _C]: ...

mutable = define
Expand Down

0 comments on commit a8f80ca

Please sign in to comment.