{
    "mode": "pydoc",
    "parameter": "attr",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/attr/json",
    "generated": "2026-11-28T13:33:53Z",
    "sections": {
        "NAME": {
            "content": "attr - Classes Without Boilerplate\n",
            "subsections": []
        },
        "PACKAGE CONTENTS": {
            "content": "cmp\ncompat\nconfig\nfuncs\nmake\nnextgen\nversioninfo\nconverters\nexceptions\nfilters\nsetters\nvalidators\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nattr.make.Attribute\nattr.make.Factory\ntyping.Protocol(typing.Generic)\nAttrsInstance\n",
            "subsections": [
                {
                    "name": "class Attribute",
                    "content": "|  Attribute(name, default, validator, repr, cmp, hash, init, inherited, metadata=None, type=None, converter=None, kwonly=False, eq=None, eqkey=None, order=None, orderkey=None, onsetattr=None, alias=None)\n|\n|  *Read-only* representation of an attribute.\n|\n|  .. warning::\n|\n|     You should never instantiate this class yourself.\n|\n|  The class has *all* arguments of `attr.ib` (except for ``factory``\n|  which is only syntactic sugar for ``default=Factory(...)`` plus the\n|  following:\n|\n|  - ``name`` (`str`): The name of the attribute.\n|  - ``alias`` (`str`): The init parameter name of the attribute, after\n|    any explicit overrides and default private-attribute-name handling.\n|  - ``inherited`` (`bool`): Whether or not that attribute has been inherited\n|    from a base class.\n|  - ``eqkey`` and ``orderkey`` (`typing.Callable` or `None`): The callables\n|    that are used for comparing and ordering objects by this attribute,\n|    respectively. These are set by passing a callable to `attr.ib`'s ``eq``,\n|    ``order``, or ``cmp`` arguments. See also :ref:`comparison customization\n|    <custom-comparison>`.\n|\n|  Instances of this class are frequently used for introspection purposes\n|  like:\n|\n|  - `fields` returns a tuple of them.\n|  - Validators get them passed as the first argument.\n|  - The :ref:`field transformer <transform-fields>` hook receives a list of\n|    them.\n|  - The ``alias`` property exposes the init parameter name of the field,\n|    with any overrides and default private-attribute handling applied.\n|\n|\n|  .. versionadded:: 20.1.0 *inherited*\n|  .. versionadded:: 20.1.0 *onsetattr*\n|  .. versionchanged:: 20.2.0 *inherited* is not taken into account for\n|      equality checks and hashing anymore.\n|  .. versionadded:: 21.1.0 *eqkey* and *orderkey*\n|  .. versionadded:: 22.2.0 *alias*\n|\n|  For the full version history of the fields, see `attr.ib`.\n|\n|  Methods defined here:\n|\n|  eq(self, other)\n|\n|  getstate(self)\n|      Play nice with pickle.\n|\n|  hash(self)\n|\n|  init(self, name, default, validator, repr, cmp, hash, init, inherited, metadata=None, type=None, converter=None, kwonly=False, eq=None, eqkey=None, order=None, orderkey=None, onsetattr=None, alias=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ne(self, other) from attr.make.makene.<locals>\n|      Check equality and either forward a NotImplemented or\n|      return the result negated.\n|\n|  repr(self)\n|\n|  setattr(self, name, value)\n|      Implement setattr(self, name, value).\n|\n|  setstate(self, state)\n|      Play nice with pickle.\n|\n|  evolve(self, changes)\n|      Copy *self* and apply *changes*.\n|\n|      This works similarly to `attrs.evolve` but that function does not work\n|      with `Attribute`.\n|\n|      It is mainly meant to be used for `transform-fields`.\n|\n|      .. versionadded:: 20.3.0\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  fromcountingattr(name, ca, type=None)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  alias\n|\n|  converter\n|\n|  default\n|\n|  eq\n|\n|  eqkey\n|\n|  hash\n|\n|  inherited\n|\n|  init\n|\n|  kwonly\n|\n|  metadata\n|\n|  name\n|\n|  onsetattr\n|\n|  order\n|\n|  orderkey\n|\n|  repr\n|\n|  type\n|\n|  validator\n"
                },
                {
                    "name": "class AttrsInstance",
                    "content": "|  AttrsInstance(*args, kwargs)\n|\n|  Method resolution order:\n|      AttrsInstance\n|      typing.Protocol\n|      typing.Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init = noinitorreplaceinit(self, *args, kwargs) from typing\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  subclasshook = protohook(other) from typing\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables\n|\n|  weakref\n|      list of weak references to the object\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset()\n|\n|  annotations = {}\n|\n|  parameters = ()\n|\n|  protocolattrs = set()\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from typing.Protocol:\n|\n|  initsubclass(*args, kwargs)\n|      Function to initialize subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from typing.Generic:\n|\n|  classgetitem(...)\n|      Parameterizes a generic class.\n|\n|      At least, parameterizing a generic class is the *main* thing this\n|      method does. For example, for some generic class `Foo`, this is called\n|      when we do `Foo[int]` - there, with `cls=Foo` and `params=int`.\n|\n|      However, note that this method is also called when defining generic\n|      classes in the first place with `class Foo[T]: ...`.\n"
                },
                {
                    "name": "class Factory",
                    "content": "|  Factory(factory, takesself=False)\n|\n|  Stores a factory callable.\n|\n|  If passed as the default value to `attrs.field`, the factory is used to\n|  generate a new value.\n|\n|  :param callable factory: A callable that takes either none or exactly one\n|      mandatory positional argument depending on *takesself*.\n|  :param bool takesself: Pass the partially initialized instance that is\n|      being initialized as a positional argument.\n|\n|  .. versionadded:: 17.1.0  *takesself*\n|\n|  Methods defined here:\n|\n|  eq(self, other)\n|\n|  getstate(self)\n|      Play nice with pickle.\n|\n|  hash(self)\n|\n|  init(self, factory, takesself=False)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ne(self, other) from attr.make.makene.<locals>\n|      Check equality and either forward a NotImplemented or\n|      return the result negated.\n|\n|  repr(self)\n|\n|  setstate(self, state)\n|      Play nice with pickle.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  factory\n|\n|  takesself\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "getattr(name: str) -> str\n",
            "subsections": [
                {
                    "name": "asdict",
                    "content": "Return the *attrs* attribute values of *inst* as a dict.\n\nOptionally recurse into other *attrs*-decorated classes.\n\n:param inst: Instance of an *attrs*-decorated class.\n:param bool recurse: Recurse into classes that are also\n*attrs*-decorated.\n:param callable filter: A callable whose return code determines whether an\nattribute or element is included (``True``) or dropped (``False``).  Is\ncalled with the `attrs.Attribute` as the first argument and the\nvalue as the second argument.\n:param callable dictfactory: A callable to produce dictionaries from.  For\nexample, to produce ordered dictionaries instead of normal Python\ndictionaries, pass in ``collections.OrderedDict``.\n:param bool retaincollectiontypes: Do not convert to ``list`` when\nencountering an attribute whose type is ``tuple`` or ``set``.  Only\nmeaningful if ``recurse`` is ``True``.\n:param Optional[callable] valueserializer: A hook that is called for every\nattribute or dict key/value.  It receives the current instance, field\nand value and must return the (updated) value.  The hook is run *after*\nthe optional *filter* has been applied.\n\n:rtype: return type of *dictfactory*\n\n:raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*\nclass.\n\n..  versionadded:: 16.0.0 *dictfactory*\n..  versionadded:: 16.1.0 *retaincollectiontypes*\n..  versionadded:: 20.3.0 *valueserializer*\n..  versionadded:: 21.3.0 If a dict has a collection for a key, it is\nserialized as a tuple.\n"
                },
                {
                    "name": "assoc",
                    "content": "Copy *inst* and apply *changes*.\n\nThis is different from `evolve` that applies the changes to the arguments\nthat create the new instance.\n\n`evolve`'s behavior is preferable, but there are `edge cases` where it\ndoesn't work. Therefore `assoc` is deprecated, but will not be removed.\n\n.. `edge cases`: https://github.com/python-attrs/attrs/issues/251\n\n:param inst: Instance of a class with *attrs* attributes.\n:param changes: Keyword changes in the new copy.\n\n:return: A copy of inst with *changes* incorporated.\n\n:raise attrs.exceptions.AttrsAttributeNotFoundError: If *attrname*\ncouldn't be found on *cls*.\n:raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*\nclass.\n\n..  deprecated:: 17.1.0\nUse `attrs.evolve` instead if you can.\nThis function will not be removed du to the slightly different approach\ncompared to `attrs.evolve`.\n"
                },
                {
                    "name": "astuple",
                    "content": "Return the *attrs* attribute values of *inst* as a tuple.\n\nOptionally recurse into other *attrs*-decorated classes.\n\n:param inst: Instance of an *attrs*-decorated class.\n:param bool recurse: Recurse into classes that are also\n*attrs*-decorated.\n:param callable filter: A callable whose return code determines whether an\nattribute or element is included (``True``) or dropped (``False``).  Is\ncalled with the `attrs.Attribute` as the first argument and the\nvalue as the second argument.\n:param callable tuplefactory: A callable to produce tuples from.  For\nexample, to produce lists instead of tuples.\n:param bool retaincollectiontypes: Do not convert to ``list``\nor ``dict`` when encountering an attribute which type is\n``tuple``, ``dict`` or ``set``.  Only meaningful if ``recurse`` is\n``True``.\n\n:rtype: return type of *tuplefactory*\n\n:raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*\nclass.\n\n..  versionadded:: 16.2.0\n\nattr = attrib(default=NOTHING, validator=None, repr=True, cmp=None, hash=None, init=True, metadata=None, type=None, converter=None, factory=None, kwonly=False, eq=None, order=None, onsetattr=None, alias=None)\nCreate a new attribute on a class.\n\n..  warning::\n\nDoes *not* do anything unless the class is also decorated with `attr.s`\n/ `attrs.define` / and so on!\n\nPlease consider using `attrs.field` in new code (``attr.ib`` will *never*\ngo away, though).\n\n:param default: A value that is used if an *attrs*-generated ``init``\nis used and no value is passed while instantiating or the attribute is\nexcluded using ``init=False``.\n\nIf the value is an instance of `attrs.Factory`, its callable will be\nused to construct a new value (useful for mutable data types like lists\nor dicts).\n\nIf a default is not set (or set manually to `attrs.NOTHING`), a value\n*must* be supplied when instantiating; otherwise a `TypeError` will be\nraised.\n\nThe default can also be set using decorator notation as shown below.\n\n.. seealso:: `defaults`\n\n:param callable factory: Syntactic sugar for\n``default=attr.Factory(factory)``.\n\n:param validator: `callable` that is called by *attrs*-generated\n``init`` methods after the instance has been initialized.  They\nreceive the initialized instance, the :func:`~attrs.Attribute`, and the\npassed value.\n\nThe return value is *not* inspected so the validator has to throw an\nexception itself.\n\nIf a `list` is passed, its items are treated as validators and must all\npass.\n\nValidators can be globally disabled and re-enabled using\n`attrs.validators.getdisabled` / `attrs.validators.setdisabled`.\n\nThe validator can also be set using decorator notation as shown below.\n\n.. seealso:: :ref:`validators`\n\n:type validator: `callable` or a `list` of `callable`\\ s.\n\n:param repr: Include this attribute in the generated ``repr`` method.\nIf ``True``, include the attribute; if ``False``, omit it. By default,\nthe built-in ``repr()`` function is used. To override how the attribute\nvalue is formatted, pass a ``callable`` that takes a single value and\nreturns a string. Note that the resulting string is used as-is, i.e. it\nwill be used directly *instead* of calling ``repr()`` (the default).\n:type repr: a `bool` or a `callable` to use a custom function.\n\n:param eq: If ``True`` (default), include this attribute in the generated\n``eq`` and ``ne`` methods that check two instances for\nequality. To override how the attribute value is compared, pass a\n``callable`` that takes a single value and returns the value to be\ncompared.\n\n.. seealso:: `comparison`\n:type eq: a `bool` or a `callable`.\n\n:param order: If ``True`` (default), include this attributes in the\ngenerated ``lt``, ``le``, ``gt`` and ``ge`` methods. To\noverride how the attribute value is ordered, pass a ``callable`` that\ntakes a single value and returns the value to be ordered.\n\n.. seealso:: `comparison`\n:type order: a `bool` or a `callable`.\n\n:param cmp: Setting *cmp* is equivalent to setting *eq* and *order* to the\nsame value. Must not be mixed with *eq* or *order*.\n\n.. seealso:: `comparison`\n:type cmp: a `bool` or a `callable`.\n\n:param bool | None hash: Include this attribute in the generated\n``hash`` method.  If ``None`` (default), mirror *eq*'s value.  This\nis the correct behavior according the Python spec.  Setting this value\nto anything else than ``None`` is *discouraged*.\n\n.. seealso:: `hashing`\n:param bool init: Include this attribute in the generated ``init``\nmethod.  It is possible to set this to ``False`` and set a default\nvalue.  In that case this attributed is unconditionally initialized\nwith the specified default value or factory.\n\n.. seealso:: `init`\n:param callable converter: `callable` that is called by *attrs*-generated\n``init`` methods to convert attribute's value to the desired\nformat.  It is given the passed-in value, and the returned value will\nbe used as the new value of the attribute.  The value is converted\nbefore being passed to the validator, if any.\n\n.. seealso:: :ref:`converters`\n:param dict | None metadata: An arbitrary mapping, to be used by\nthird-party components.  See `extending-metadata`.\n\n:param type: The type of the attribute. Nowadays, the preferred method to\nspecify the type is using a variable annotation (see :pep:`526`). This\nargument is provided for backward compatibility. Regardless of the\napproach used, the type will be stored on ``Attribute.type``.\n\nPlease note that *attrs* doesn't do anything with this metadata by\nitself. You can use it as part of your own code or for `static type\nchecking <types>`.\n:param bool kwonly: Make this attribute keyword-only in the generated\n``init`` (if ``init`` is ``False``, this parameter is ignored).\n:param onsetattr: Allows to overwrite the *onsetattr* setting from\n`attr.s`. If left `None`, the *onsetattr* value from `attr.s` is used.\nSet to `attrs.setters.NOOP` to run no `setattr` hooks for this\nattribute -- regardless of the setting in `attr.s`.\n:type onsetattr: `callable`, or a list of callables, or `None`, or\n`attrs.setters.NOOP`\n:param str | None alias: Override this attribute's parameter name in the\ngenerated ``init`` method. If left `None`, default to ``name``\nstripped of leading underscores. See `private-attributes`.\n\n.. versionadded:: 15.2.0 *convert*\n.. versionadded:: 16.3.0 *metadata*\n.. versionchanged:: 17.1.0 *validator* can be a ``list`` now.\n.. versionchanged:: 17.1.0\n*hash* is ``None`` and therefore mirrors *eq* by default.\n.. versionadded:: 17.3.0 *type*\n.. deprecated:: 17.4.0 *convert*\n.. versionadded:: 17.4.0 *converter* as a replacement for the deprecated\n*convert* to achieve consistency with other noun-based arguments.\n.. versionadded:: 18.1.0\n``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.\n.. versionadded:: 18.2.0 *kwonly*\n.. versionchanged:: 19.2.0 *convert* keyword argument removed.\n.. versionchanged:: 19.2.0 *repr* also accepts a custom callable.\n.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.\n.. versionadded:: 19.2.0 *eq* and *order*\n.. versionadded:: 20.1.0 *onsetattr*\n.. versionchanged:: 20.3.0 *kwonly* backported to Python 2\n.. versionchanged:: 21.1.0\n*eq*, *order*, and *cmp* also accept a custom callable\n.. versionchanged:: 21.1.0 *cmp* undeprecated\n.. versionadded:: 22.2.0 *alias*\n"
                },
                {
                    "name": "attrib",
                    "content": "Create a new attribute on a class.\n\n..  warning::\n\nDoes *not* do anything unless the class is also decorated with `attr.s`\n/ `attrs.define` / and so on!\n\nPlease consider using `attrs.field` in new code (``attr.ib`` will *never*\ngo away, though).\n\n:param default: A value that is used if an *attrs*-generated ``init``\nis used and no value is passed while instantiating or the attribute is\nexcluded using ``init=False``.\n\nIf the value is an instance of `attrs.Factory`, its callable will be\nused to construct a new value (useful for mutable data types like lists\nor dicts).\n\nIf a default is not set (or set manually to `attrs.NOTHING`), a value\n*must* be supplied when instantiating; otherwise a `TypeError` will be\nraised.\n\nThe default can also be set using decorator notation as shown below.\n\n.. seealso:: `defaults`\n\n:param callable factory: Syntactic sugar for\n``default=attr.Factory(factory)``.\n\n:param validator: `callable` that is called by *attrs*-generated\n``init`` methods after the instance has been initialized.  They\nreceive the initialized instance, the :func:`~attrs.Attribute`, and the\npassed value.\n\nThe return value is *not* inspected so the validator has to throw an\nexception itself.\n\nIf a `list` is passed, its items are treated as validators and must all\npass.\n\nValidators can be globally disabled and re-enabled using\n`attrs.validators.getdisabled` / `attrs.validators.setdisabled`.\n\nThe validator can also be set using decorator notation as shown below.\n\n.. seealso:: :ref:`validators`\n\n:type validator: `callable` or a `list` of `callable`\\ s.\n\n:param repr: Include this attribute in the generated ``repr`` method.\nIf ``True``, include the attribute; if ``False``, omit it. By default,\nthe built-in ``repr()`` function is used. To override how the attribute\nvalue is formatted, pass a ``callable`` that takes a single value and\nreturns a string. Note that the resulting string is used as-is, i.e. it\nwill be used directly *instead* of calling ``repr()`` (the default).\n:type repr: a `bool` or a `callable` to use a custom function.\n\n:param eq: If ``True`` (default), include this attribute in the generated\n``eq`` and ``ne`` methods that check two instances for\nequality. To override how the attribute value is compared, pass a\n``callable`` that takes a single value and returns the value to be\ncompared.\n\n.. seealso:: `comparison`\n:type eq: a `bool` or a `callable`.\n\n:param order: If ``True`` (default), include this attributes in the\ngenerated ``lt``, ``le``, ``gt`` and ``ge`` methods. To\noverride how the attribute value is ordered, pass a ``callable`` that\ntakes a single value and returns the value to be ordered.\n\n.. seealso:: `comparison`\n:type order: a `bool` or a `callable`.\n\n:param cmp: Setting *cmp* is equivalent to setting *eq* and *order* to the\nsame value. Must not be mixed with *eq* or *order*.\n\n.. seealso:: `comparison`\n:type cmp: a `bool` or a `callable`.\n\n:param bool | None hash: Include this attribute in the generated\n``hash`` method.  If ``None`` (default), mirror *eq*'s value.  This\nis the correct behavior according the Python spec.  Setting this value\nto anything else than ``None`` is *discouraged*.\n\n.. seealso:: `hashing`\n:param bool init: Include this attribute in the generated ``init``\nmethod.  It is possible to set this to ``False`` and set a default\nvalue.  In that case this attributed is unconditionally initialized\nwith the specified default value or factory.\n\n.. seealso:: `init`\n:param callable converter: `callable` that is called by *attrs*-generated\n``init`` methods to convert attribute's value to the desired\nformat.  It is given the passed-in value, and the returned value will\nbe used as the new value of the attribute.  The value is converted\nbefore being passed to the validator, if any.\n\n.. seealso:: :ref:`converters`\n:param dict | None metadata: An arbitrary mapping, to be used by\nthird-party components.  See `extending-metadata`.\n\n:param type: The type of the attribute. Nowadays, the preferred method to\nspecify the type is using a variable annotation (see :pep:`526`). This\nargument is provided for backward compatibility. Regardless of the\napproach used, the type will be stored on ``Attribute.type``.\n\nPlease note that *attrs* doesn't do anything with this metadata by\nitself. You can use it as part of your own code or for `static type\nchecking <types>`.\n:param bool kwonly: Make this attribute keyword-only in the generated\n``init`` (if ``init`` is ``False``, this parameter is ignored).\n:param onsetattr: Allows to overwrite the *onsetattr* setting from\n`attr.s`. If left `None`, the *onsetattr* value from `attr.s` is used.\nSet to `attrs.setters.NOOP` to run no `setattr` hooks for this\nattribute -- regardless of the setting in `attr.s`.\n:type onsetattr: `callable`, or a list of callables, or `None`, or\n`attrs.setters.NOOP`\n:param str | None alias: Override this attribute's parameter name in the\ngenerated ``init`` method. If left `None`, default to ``name``\nstripped of leading underscores. See `private-attributes`.\n\n.. versionadded:: 15.2.0 *convert*\n.. versionadded:: 16.3.0 *metadata*\n.. versionchanged:: 17.1.0 *validator* can be a ``list`` now.\n.. versionchanged:: 17.1.0\n*hash* is ``None`` and therefore mirrors *eq* by default.\n.. versionadded:: 17.3.0 *type*\n.. deprecated:: 17.4.0 *convert*\n.. versionadded:: 17.4.0 *converter* as a replacement for the deprecated\n*convert* to achieve consistency with other noun-based arguments.\n.. versionadded:: 18.1.0\n``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.\n.. versionadded:: 18.2.0 *kwonly*\n.. versionchanged:: 19.2.0 *convert* keyword argument removed.\n.. versionchanged:: 19.2.0 *repr* also accepts a custom callable.\n.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.\n.. versionadded:: 19.2.0 *eq* and *order*\n.. versionadded:: 20.1.0 *onsetattr*\n.. versionchanged:: 20.3.0 *kwonly* backported to Python 2\n.. versionchanged:: 21.1.0\n*eq*, *order*, and *cmp* also accept a custom callable\n.. versionchanged:: 21.1.0 *cmp* undeprecated\n.. versionadded:: 22.2.0 *alias*\n\nattributes = attrs(maybecls=None, these=None, reprns=None, repr=None, cmp=None, hash=None, init=None, slots=False, frozen=False, weakrefslot=True, str=False, autoattribs=False, kwonly=False, cachehash=False, autoexc=False, eq=None, order=None, autodetect=False, collectbymro=False, getstatesetstate=None, onsetattr=None, fieldtransformer=None, matchargs=True, unsafehash=None)\nA class decorator that adds :term:`dunder methods` according to the\nspecified attributes using `attr.ib` or the *these* argument.\n\nPlease consider using `attrs.define` / `attrs.frozen` in new code\n(``attr.s`` will *never* go away, though).\n\n:param these: A dictionary of name to `attr.ib` mappings.  This is useful\nto avoid the definition of your attributes within the class body\nbecause you can't (e.g. if you want to add ``repr`` methods to\nDjango models) or don't want to.\n\nIf *these* is not ``None``, *attrs* will *not* search the class body\nfor attributes and will *not* remove any attributes from it.\n\nThe order is deduced from the order of the attributes inside *these*.\n\n:type these: `dict` of `str` to `attr.ib`\n\n:param str reprns: When using nested classes, there's no way in Python 2\nto automatically detect that.  Therefore it's possible to set the\nnamespace explicitly for a more meaningful ``repr`` output.\n:param bool autodetect: Instead of setting the *init*, *repr*, *eq*,\n*order*, and *hash* arguments explicitly, assume they are set to\n``True`` unless any of the involved methods for one of the\narguments is implemented in the *current* class (i.e. it is *not*\ninherited from some base class).\n\nSo for example by implementing ``eq`` on a class yourself, *attrs*\nwill deduce ``eq=False`` and will create *neither* ``eq`` *nor*\n``ne`` (but Python classes come with a sensible ``ne`` by\ndefault, so it *should* be enough to only implement ``eq`` in most\ncases).\n\n.. warning::\n\nIf you prevent *attrs* from creating the ordering methods for you\n(``order=False``, e.g. by implementing ``le``), it becomes\n*your* responsibility to make sure its ordering is sound. The best\nway is to use the `functools.totalordering` decorator.\n\n\nPassing ``True`` or ``False`` to *init*, *repr*, *eq*, *order*, *cmp*,\nor *hash* overrides whatever *autodetect* would determine.\n\n:param bool repr: Create a ``repr`` method with a human readable\nrepresentation of *attrs* attributes..\n:param bool str: Create a ``str`` method that is identical to\n``repr``.  This is usually not necessary except for `Exception`\\ s.\n:param bool | None eq: If ``True`` or ``None`` (default), add ``eq``\nand ``ne`` methods that check two instances for equality.\n\nThey compare the instances as if they were tuples of their *attrs*\nattributes if and only if the types of both classes are *identical*!\n\n.. seealso:: `comparison`\n:param bool | None order: If ``True``, add ``lt``, ``le``,\n``gt``, and ``ge`` methods that behave like *eq* above and\nallow instances to be ordered. If ``None`` (default) mirror value of\n*eq*.\n\n.. seealso:: `comparison`\n:param bool | None cmp: Setting *cmp* is equivalent to setting *eq* and\n*order* to the same value. Must not be mixed with *eq* or *order*.\n\n.. seealso:: `comparison`\n:param bool | None unsafehash: If ``None`` (default), the ``hash``\nmethod is generated according how *eq* and *frozen* are set.\n\n1. If *both* are True, *attrs* will generate a ``hash`` for you.\n2. If *eq* is True and *frozen* is False, ``hash`` will be set to\nNone, marking it unhashable (which it is).\n3. If *eq* is False, ``hash`` will be left untouched meaning the\n``hash`` method of the base class will be used (if base class is\n``object``, this means it will fall back to id-based hashing.).\n\nAlthough not recommended, you can decide for yourself and force *attrs*\nto create one (e.g. if the class is immutable even though you didn't\nfreeze it programmatically) by passing ``True`` or not.  Both of these\ncases are rather special and should be used carefully.\n\n.. seealso::\n\n- Our documentation on `hashing`,\n- Python's documentation on `object.hash`,\n- and the `GitHub issue that led to the default \\\nbehavior <https://github.com/python-attrs/attrs/issues/136>` for\nmore details.\n\n:param bool | None hash: Alias for *unsafehash*. *unsafehash* takes\nprecedence.\n:param bool init: Create a ``init`` method that initializes the *attrs*\nattributes. Leading underscores are stripped for the argument name. If\na ``attrspreinit`` method exists on the class, it will be called\nbefore the class is initialized. If a ``attrspostinit`` method\nexists on the class, it will be called after the class is fully\ninitialized.\n\nIf ``init`` is ``False``, an ``attrsinit`` method will be injected\ninstead. This allows you to define a custom ``init`` method that\ncan do pre-init work such as ``super().init()``, and then call\n``attrsinit()`` and ``attrspostinit()``.\n\n.. seealso:: `init`\n:param bool slots: Create a :term:`slotted class <slotted classes>` that's\nmore memory-efficient. Slotted classes are generally superior to the\ndefault dict classes, but have some gotchas you should know about, so\nwe encourage you to read the :term:`glossary entry <slotted classes>`.\n:param bool frozen: Make instances immutable after initialization.  If\nsomeone attempts to modify a frozen instance,\n`attrs.exceptions.FrozenInstanceError` is raised.\n\n.. note::\n\n1. This is achieved by installing a custom ``setattr`` method\non your class, so you can't implement your own.\n\n2. True immutability is impossible in Python.\n\n3. This *does* have a minor a runtime performance `impact\n<how-frozen>` when initializing new instances.  In other words:\n``init`` is slightly slower with ``frozen=True``.\n\n4. If a class is frozen, you cannot modify ``self`` in\n``attrspostinit`` or a self-written ``init``. You can\ncircumvent that limitation by using ``object.setattr(self,\n\"attributename\", value)``.\n\n5. Subclasses of a frozen class are frozen too.\n\n:param bool weakrefslot: Make instances weak-referenceable.  This has no\neffect unless ``slots`` is also enabled.\n:param bool autoattribs: If ``True``, collect :pep:`526`-annotated\nattributes from the class body.\n\nIn this case, you must annotate every field.  If *attrs* encounters\na field that is set to an `attr.ib` but lacks a type annotation, an\n`attr.exceptions.UnannotatedAttributeError` is raised.  Use\n``fieldname: typing.Any = attr.ib(...)`` if you don't want to set a\ntype.\n\nIf you assign a value to those attributes (e.g. ``x: int = 42``), that\nvalue becomes the default value like if it were passed using\n``attr.ib(default=42)``.  Passing an instance of `attrs.Factory` also\nworks as expected in most cases (see warning below).\n\nAttributes annotated as `typing.ClassVar`, and attributes that are\nneither annotated nor set to an `attr.ib` are ignored.\n\n.. warning::\nFor features that use the attribute name to create decorators (e.g.\n:ref:`validators <validators>`), you still *must* assign `attr.ib`\nto them. Otherwise Python will either not find the name or try to\nuse the default value to call e.g. ``validator`` on it.\n\nThese errors can be quite confusing and probably the most common bug\nreport on our bug tracker.\n\n:param bool kwonly: Make all attributes keyword-only in the generated\n``init`` (if ``init`` is ``False``, this parameter is ignored).\n:param bool cachehash: Ensure that the object's hash code is computed only\nonce and stored on the object.  If this is set to ``True``, hashing\nmust be either explicitly or implicitly enabled for this class.  If the\nhash code is cached, avoid any reassignments of fields involved in hash\ncode computation or mutations of the objects those fields point to\nafter object creation.  If such changes occur, the behavior of the\nobject's hash code is undefined.\n:param bool autoexc: If the class subclasses `BaseException` (which\nimplicitly includes any subclass of any exception), the following\nhappens to behave like a well-behaved Python exceptions class:\n\n- the values for *eq*, *order*, and *hash* are ignored and the\ninstances compare and hash by the instance's ids (N.B. *attrs* will\n*not* remove existing implementations of ``hash`` or the equality\nmethods. It just won't add own ones.),\n- all attributes that are either passed into ``init`` or have a\ndefault value are additionally available as a tuple in the ``args``\nattribute,\n- the value of *str* is ignored leaving ``str`` to base classes.\n:param bool collectbymro: Setting this to `True` fixes the way *attrs*\ncollects attributes from base classes.  The default behavior is\nincorrect in certain cases of multiple inheritance.  It should be on by\ndefault but is kept off for backward-compatibility.\n\n.. seealso::\nIssue `#428 <https://github.com/python-attrs/attrs/issues/428>`\n\n:param bool | None getstatesetstate:\n.. note::\nThis is usually only interesting for slotted classes and you should\nprobably just set *autodetect* to `True`.\n\nIf `True`, ``getstate`` and ``setstate`` are generated and\nattached to the class. This is necessary for slotted classes to be\npickleable. If left `None`, it's `True` by default for slotted classes\nand ``False`` for dict classes.\n\nIf *autodetect* is `True`, and *getstatesetstate* is left `None`, and\neither ``getstate`` or ``setstate`` is detected directly on\nthe class (i.e. not inherited), it is set to `False` (this is usually\nwhat you want).\n\n:param onsetattr: A callable that is run whenever the user attempts to set\nan attribute (either by assignment like ``i.x = 42`` or by using\n`setattr` like ``setattr(i, \"x\", 42)``). It receives the same arguments\nas validators: the instance, the attribute that is being modified, and\nthe new value.\n\nIf no exception is raised, the attribute is set to the return value of\nthe callable.\n\nIf a list of callables is passed, they're automatically wrapped in an\n`attrs.setters.pipe`.\n:type onsetattr: `callable`, or a list of callables, or `None`, or\n`attrs.setters.NOOP`\n\n:param callable | None fieldtransformer:\nA function that is called with the original class object and all fields\nright before *attrs* finalizes the class.  You can use this, e.g., to\nautomatically add converters or validators to fields based on their\ntypes.\n\n.. seealso:: `transform-fields`\n\n:param bool matchargs:\nIf `True` (default), set ``matchargs`` on the class to support\n:pep:`634` (Structural Pattern Matching). It is a tuple of all\nnon-keyword-only ``init`` parameter names on Python 3.10 and later.\nIgnored on older Python versions.\n\n.. versionadded:: 16.0.0 *slots*\n.. versionadded:: 16.1.0 *frozen*\n.. versionadded:: 16.3.0 *str*\n.. versionadded:: 16.3.0 Support for ``attrspostinit``.\n.. versionchanged:: 17.1.0\n*hash* supports ``None`` as value which is also the default now.\n.. versionadded:: 17.3.0 *autoattribs*\n.. versionchanged:: 18.1.0\nIf *these* is passed, no attributes are deleted from the class body.\n.. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.\n.. versionadded:: 18.2.0 *weakrefslot*\n.. deprecated:: 18.2.0\n``lt``, ``le``, ``gt``, and ``ge`` now raise a\n`DeprecationWarning` if the classes compared are subclasses of\neach other. ``eq`` and ``ne`` never tried to compared subclasses\nto each other.\n.. versionchanged:: 19.2.0\n``lt``, ``le``, ``gt``, and ``ge`` now do not consider\nsubclasses comparable anymore.\n.. versionadded:: 18.2.0 *kwonly*\n.. versionadded:: 18.2.0 *cachehash*\n.. versionadded:: 19.1.0 *autoexc*\n.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.\n.. versionadded:: 19.2.0 *eq* and *order*\n.. versionadded:: 20.1.0 *autodetect*\n.. versionadded:: 20.1.0 *collectbymro*\n.. versionadded:: 20.1.0 *getstatesetstate*\n.. versionadded:: 20.1.0 *onsetattr*\n.. versionadded:: 20.3.0 *fieldtransformer*\n.. versionchanged:: 21.1.0\n``init=False`` injects ``attrsinit``\n.. versionchanged:: 21.1.0 Support for ``attrspreinit``\n.. versionchanged:: 21.1.0 *cmp* undeprecated\n.. versionadded:: 21.3.0 *matchargs*\n.. versionadded:: 22.2.0\n*unsafehash* as an alias for *hash* (for :pep:`681` compliance).\n"
                },
                {
                    "name": "attrs",
                    "content": "A class decorator that adds :term:`dunder methods` according to the\nspecified attributes using `attr.ib` or the *these* argument.\n\nPlease consider using `attrs.define` / `attrs.frozen` in new code\n(``attr.s`` will *never* go away, though).\n\n:param these: A dictionary of name to `attr.ib` mappings.  This is useful\nto avoid the definition of your attributes within the class body\nbecause you can't (e.g. if you want to add ``repr`` methods to\nDjango models) or don't want to.\n\nIf *these* is not ``None``, *attrs* will *not* search the class body\nfor attributes and will *not* remove any attributes from it.\n\nThe order is deduced from the order of the attributes inside *these*.\n\n:type these: `dict` of `str` to `attr.ib`\n\n:param str reprns: When using nested classes, there's no way in Python 2\nto automatically detect that.  Therefore it's possible to set the\nnamespace explicitly for a more meaningful ``repr`` output.\n:param bool autodetect: Instead of setting the *init*, *repr*, *eq*,\n*order*, and *hash* arguments explicitly, assume they are set to\n``True`` unless any of the involved methods for one of the\narguments is implemented in the *current* class (i.e. it is *not*\ninherited from some base class).\n\nSo for example by implementing ``eq`` on a class yourself, *attrs*\nwill deduce ``eq=False`` and will create *neither* ``eq`` *nor*\n``ne`` (but Python classes come with a sensible ``ne`` by\ndefault, so it *should* be enough to only implement ``eq`` in most\ncases).\n\n.. warning::\n\nIf you prevent *attrs* from creating the ordering methods for you\n(``order=False``, e.g. by implementing ``le``), it becomes\n*your* responsibility to make sure its ordering is sound. The best\nway is to use the `functools.totalordering` decorator.\n\n\nPassing ``True`` or ``False`` to *init*, *repr*, *eq*, *order*, *cmp*,\nor *hash* overrides whatever *autodetect* would determine.\n\n:param bool repr: Create a ``repr`` method with a human readable\nrepresentation of *attrs* attributes..\n:param bool str: Create a ``str`` method that is identical to\n``repr``.  This is usually not necessary except for `Exception`\\ s.\n:param bool | None eq: If ``True`` or ``None`` (default), add ``eq``\nand ``ne`` methods that check two instances for equality.\n\nThey compare the instances as if they were tuples of their *attrs*\nattributes if and only if the types of both classes are *identical*!\n\n.. seealso:: `comparison`\n:param bool | None order: If ``True``, add ``lt``, ``le``,\n``gt``, and ``ge`` methods that behave like *eq* above and\nallow instances to be ordered. If ``None`` (default) mirror value of\n*eq*.\n\n.. seealso:: `comparison`\n:param bool | None cmp: Setting *cmp* is equivalent to setting *eq* and\n*order* to the same value. Must not be mixed with *eq* or *order*.\n\n.. seealso:: `comparison`\n:param bool | None unsafehash: If ``None`` (default), the ``hash``\nmethod is generated according how *eq* and *frozen* are set.\n\n1. If *both* are True, *attrs* will generate a ``hash`` for you.\n2. If *eq* is True and *frozen* is False, ``hash`` will be set to\nNone, marking it unhashable (which it is).\n3. If *eq* is False, ``hash`` will be left untouched meaning the\n``hash`` method of the base class will be used (if base class is\n``object``, this means it will fall back to id-based hashing.).\n\nAlthough not recommended, you can decide for yourself and force *attrs*\nto create one (e.g. if the class is immutable even though you didn't\nfreeze it programmatically) by passing ``True`` or not.  Both of these\ncases are rather special and should be used carefully.\n\n.. seealso::\n\n- Our documentation on `hashing`,\n- Python's documentation on `object.hash`,\n- and the `GitHub issue that led to the default \\\nbehavior <https://github.com/python-attrs/attrs/issues/136>` for\nmore details.\n\n:param bool | None hash: Alias for *unsafehash*. *unsafehash* takes\nprecedence.\n:param bool init: Create a ``init`` method that initializes the *attrs*\nattributes. Leading underscores are stripped for the argument name. If\na ``attrspreinit`` method exists on the class, it will be called\nbefore the class is initialized. If a ``attrspostinit`` method\nexists on the class, it will be called after the class is fully\ninitialized.\n\nIf ``init`` is ``False``, an ``attrsinit`` method will be injected\ninstead. This allows you to define a custom ``init`` method that\ncan do pre-init work such as ``super().init()``, and then call\n``attrsinit()`` and ``attrspostinit()``.\n\n.. seealso:: `init`\n:param bool slots: Create a :term:`slotted class <slotted classes>` that's\nmore memory-efficient. Slotted classes are generally superior to the\ndefault dict classes, but have some gotchas you should know about, so\nwe encourage you to read the :term:`glossary entry <slotted classes>`.\n:param bool frozen: Make instances immutable after initialization.  If\nsomeone attempts to modify a frozen instance,\n`attrs.exceptions.FrozenInstanceError` is raised.\n\n.. note::\n\n1. This is achieved by installing a custom ``setattr`` method\non your class, so you can't implement your own.\n\n2. True immutability is impossible in Python.\n\n3. This *does* have a minor a runtime performance `impact\n<how-frozen>` when initializing new instances.  In other words:\n``init`` is slightly slower with ``frozen=True``.\n\n4. If a class is frozen, you cannot modify ``self`` in\n``attrspostinit`` or a self-written ``init``. You can\ncircumvent that limitation by using ``object.setattr(self,\n\"attributename\", value)``.\n\n5. Subclasses of a frozen class are frozen too.\n\n:param bool weakrefslot: Make instances weak-referenceable.  This has no\neffect unless ``slots`` is also enabled.\n:param bool autoattribs: If ``True``, collect :pep:`526`-annotated\nattributes from the class body.\n\nIn this case, you must annotate every field.  If *attrs* encounters\na field that is set to an `attr.ib` but lacks a type annotation, an\n`attr.exceptions.UnannotatedAttributeError` is raised.  Use\n``fieldname: typing.Any = attr.ib(...)`` if you don't want to set a\ntype.\n\nIf you assign a value to those attributes (e.g. ``x: int = 42``), that\nvalue becomes the default value like if it were passed using\n``attr.ib(default=42)``.  Passing an instance of `attrs.Factory` also\nworks as expected in most cases (see warning below).\n\nAttributes annotated as `typing.ClassVar`, and attributes that are\nneither annotated nor set to an `attr.ib` are ignored.\n\n.. warning::\nFor features that use the attribute name to create decorators (e.g.\n:ref:`validators <validators>`), you still *must* assign `attr.ib`\nto them. Otherwise Python will either not find the name or try to\nuse the default value to call e.g. ``validator`` on it.\n\nThese errors can be quite confusing and probably the most common bug\nreport on our bug tracker.\n\n:param bool kwonly: Make all attributes keyword-only in the generated\n``init`` (if ``init`` is ``False``, this parameter is ignored).\n:param bool cachehash: Ensure that the object's hash code is computed only\nonce and stored on the object.  If this is set to ``True``, hashing\nmust be either explicitly or implicitly enabled for this class.  If the\nhash code is cached, avoid any reassignments of fields involved in hash\ncode computation or mutations of the objects those fields point to\nafter object creation.  If such changes occur, the behavior of the\nobject's hash code is undefined.\n:param bool autoexc: If the class subclasses `BaseException` (which\nimplicitly includes any subclass of any exception), the following\nhappens to behave like a well-behaved Python exceptions class:\n\n- the values for *eq*, *order*, and *hash* are ignored and the\ninstances compare and hash by the instance's ids (N.B. *attrs* will\n*not* remove existing implementations of ``hash`` or the equality\nmethods. It just won't add own ones.),\n- all attributes that are either passed into ``init`` or have a\ndefault value are additionally available as a tuple in the ``args``\nattribute,\n- the value of *str* is ignored leaving ``str`` to base classes.\n:param bool collectbymro: Setting this to `True` fixes the way *attrs*\ncollects attributes from base classes.  The default behavior is\nincorrect in certain cases of multiple inheritance.  It should be on by\ndefault but is kept off for backward-compatibility.\n\n.. seealso::\nIssue `#428 <https://github.com/python-attrs/attrs/issues/428>`\n\n:param bool | None getstatesetstate:\n.. note::\nThis is usually only interesting for slotted classes and you should\nprobably just set *autodetect* to `True`.\n\nIf `True`, ``getstate`` and ``setstate`` are generated and\nattached to the class. This is necessary for slotted classes to be\npickleable. If left `None`, it's `True` by default for slotted classes\nand ``False`` for dict classes.\n\nIf *autodetect* is `True`, and *getstatesetstate* is left `None`, and\neither ``getstate`` or ``setstate`` is detected directly on\nthe class (i.e. not inherited), it is set to `False` (this is usually\nwhat you want).\n\n:param onsetattr: A callable that is run whenever the user attempts to set\nan attribute (either by assignment like ``i.x = 42`` or by using\n`setattr` like ``setattr(i, \"x\", 42)``). It receives the same arguments\nas validators: the instance, the attribute that is being modified, and\nthe new value.\n\nIf no exception is raised, the attribute is set to the return value of\nthe callable.\n\nIf a list of callables is passed, they're automatically wrapped in an\n`attrs.setters.pipe`.\n:type onsetattr: `callable`, or a list of callables, or `None`, or\n`attrs.setters.NOOP`\n\n:param callable | None fieldtransformer:\nA function that is called with the original class object and all fields\nright before *attrs* finalizes the class.  You can use this, e.g., to\nautomatically add converters or validators to fields based on their\ntypes.\n\n.. seealso:: `transform-fields`\n\n:param bool matchargs:\nIf `True` (default), set ``matchargs`` on the class to support\n:pep:`634` (Structural Pattern Matching). It is a tuple of all\nnon-keyword-only ``init`` parameter names on Python 3.10 and later.\nIgnored on older Python versions.\n\n.. versionadded:: 16.0.0 *slots*\n.. versionadded:: 16.1.0 *frozen*\n.. versionadded:: 16.3.0 *str*\n.. versionadded:: 16.3.0 Support for ``attrspostinit``.\n.. versionchanged:: 17.1.0\n*hash* supports ``None`` as value which is also the default now.\n.. versionadded:: 17.3.0 *autoattribs*\n.. versionchanged:: 18.1.0\nIf *these* is passed, no attributes are deleted from the class body.\n.. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.\n.. versionadded:: 18.2.0 *weakrefslot*\n.. deprecated:: 18.2.0\n``lt``, ``le``, ``gt``, and ``ge`` now raise a\n`DeprecationWarning` if the classes compared are subclasses of\neach other. ``eq`` and ``ne`` never tried to compared subclasses\nto each other.\n.. versionchanged:: 19.2.0\n``lt``, ``le``, ``gt``, and ``ge`` now do not consider\nsubclasses comparable anymore.\n.. versionadded:: 18.2.0 *kwonly*\n.. versionadded:: 18.2.0 *cachehash*\n.. versionadded:: 19.1.0 *autoexc*\n.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.\n.. versionadded:: 19.2.0 *eq* and *order*\n.. versionadded:: 20.1.0 *autodetect*\n.. versionadded:: 20.1.0 *collectbymro*\n.. versionadded:: 20.1.0 *getstatesetstate*\n.. versionadded:: 20.1.0 *onsetattr*\n.. versionadded:: 20.3.0 *fieldtransformer*\n.. versionchanged:: 21.1.0\n``init=False`` injects ``attrsinit``\n.. versionchanged:: 21.1.0 Support for ``attrspreinit``\n.. versionchanged:: 21.1.0 *cmp* undeprecated\n.. versionadded:: 21.3.0 *matchargs*\n.. versionadded:: 22.2.0\n*unsafehash* as an alias for *hash* (for :pep:`681` compliance).\n"
                },
                {
                    "name": "cmp_using",
                    "content": "Create a class that can be passed into `attrs.field`'s ``eq``, ``order``,\nand ``cmp`` arguments to customize field comparison.\n\nThe resulting class will have a full set of ordering methods if at least\none of ``{lt, le, gt, ge}`` and ``eq``  are provided.\n\n:param Optional[callable] eq: `callable` used to evaluate equality of two\nobjects.\n:param Optional[callable] lt: `callable` used to evaluate whether one\nobject is less than another object.\n:param Optional[callable] le: `callable` used to evaluate whether one\nobject is less than or equal to another object.\n:param Optional[callable] gt: `callable` used to evaluate whether one\nobject is greater than another object.\n:param Optional[callable] ge: `callable` used to evaluate whether one\nobject is greater than or equal to another object.\n\n:param bool requiresametype: When `True`, equality and ordering methods\nwill return `NotImplemented` if objects are not of the same type.\n\n:param Optional[str] classname: Name of class. Defaults to 'Comparable'.\n\nSee `comparison` for more details.\n\n.. versionadded:: 21.1.0\n"
                },
                {
                    "name": "define",
                    "content": "Define an *attrs* class.\n\nDifferences to the classic `attr.s` that it uses underneath:\n\n- Automatically detect whether or not *autoattribs* should be `True` (c.f.\n*autoattribs* parameter).\n- Converters and validators run when attributes are set by default -- if\n*frozen* is `False`.\n- *slots=True*\n\n.. caution::\n\nUsually this has only upsides and few visible effects in everyday\nprogramming. But it *can* lead to some surprising behaviors, so please\nmake sure to read :term:`slotted classes`.\n- *autoexc=True*\n- *autodetect=True*\n- *order=False*\n- Some options that were only relevant on Python 2 or were kept around for\nbackwards-compatibility have been removed.\n\nPlease note that these are all defaults and you can change them as you\nwish.\n\n:param Optional[bool] autoattribs: If set to `True` or `False`, it behaves\nexactly like `attr.s`. If left `None`, `attr.s` will try to guess:\n\n1. If any attributes are annotated and no unannotated `attrs.fields`\\ s\nare found, it assumes *autoattribs=True*.\n2. Otherwise it assumes *autoattribs=False* and tries to collect\n`attrs.fields`\\ s.\n\nFor now, please refer to `attr.s` for the rest of the parameters.\n\n.. versionadded:: 20.1.0\n.. versionchanged:: 21.3.0 Converters are also run ``onsetattr``.\n.. versionadded:: 22.2.0\n*unsafehash* as an alias for *hash* (for :pep:`681` compliance).\n"
                },
                {
                    "name": "evolve",
                    "content": "Create a new instance, based on the first positional argument with\n*changes* applied.\n\n:param inst: Instance of a class with *attrs* attributes.\n:param changes: Keyword changes in the new copy.\n\n:return: A copy of inst with *changes* incorporated.\n\n:raise TypeError: If *attrname* couldn't be found in the class\n``init``.\n:raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*\nclass.\n\n.. versionadded:: 17.1.0\n.. deprecated:: 23.1.0\nIt is now deprecated to pass the instance using the keyword argument\n*inst*. It will raise a warning until at least April 2024, after which\nit will become an error. Always pass the instance as a positional\nargument.\n"
                },
                {
                    "name": "field",
                    "content": "Identical to `attr.ib`, except keyword-only and with some arguments\nremoved.\n\n.. versionadded:: 23.1.0\nThe *type* parameter has been re-added; mostly for `attrs.makeclass`.\nPlease note that type checkers ignore this metadata.\n.. versionadded:: 20.1.0\n"
                },
                {
                    "name": "fields",
                    "content": "Return the tuple of *attrs* attributes for a class.\n\nThe tuple also allows accessing the fields by their names (see below for\nexamples).\n\n:param type cls: Class to introspect.\n\n:raise TypeError: If *cls* is not a class.\n:raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*\nclass.\n\n:rtype: tuple (with name accessors) of `attrs.Attribute`\n\n.. versionchanged:: 16.2.0 Returned tuple allows accessing the fields\nby name.\n.. versionchanged:: 23.1.0 Add support for generic classes.\n"
                },
                {
                    "name": "fields_dict",
                    "content": "Return an ordered dictionary of *attrs* attributes for a class, whose\nkeys are the attribute names.\n\n:param type cls: Class to introspect.\n\n:raise TypeError: If *cls* is not a class.\n:raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*\nclass.\n\n:rtype: dict\n\n.. versionadded:: 18.1.0\n"
                },
                {
                    "name": "get_run_validators",
                    "content": "Return whether or not validators are run.\n\n.. deprecated:: 21.3.0 It will not be removed, but it also will not be\nmoved to new ``attrs`` namespace. Use `attrs.validators.getdisabled()`\ninstead.\n"
                },
                {
                    "name": "has",
                    "content": "Check whether *cls* is a class with *attrs* attributes.\n\n:param type cls: Class to introspect.\n:raise TypeError: If *cls* is not a class.\n\n:rtype: bool\n\nib = attrib(default=NOTHING, validator=None, repr=True, cmp=None, hash=None, init=True, metadata=None, type=None, converter=None, factory=None, kwonly=False, eq=None, order=None, onsetattr=None, alias=None)\nCreate a new attribute on a class.\n\n..  warning::\n\nDoes *not* do anything unless the class is also decorated with `attr.s`\n/ `attrs.define` / and so on!\n\nPlease consider using `attrs.field` in new code (``attr.ib`` will *never*\ngo away, though).\n\n:param default: A value that is used if an *attrs*-generated ``init``\nis used and no value is passed while instantiating or the attribute is\nexcluded using ``init=False``.\n\nIf the value is an instance of `attrs.Factory`, its callable will be\nused to construct a new value (useful for mutable data types like lists\nor dicts).\n\nIf a default is not set (or set manually to `attrs.NOTHING`), a value\n*must* be supplied when instantiating; otherwise a `TypeError` will be\nraised.\n\nThe default can also be set using decorator notation as shown below.\n\n.. seealso:: `defaults`\n\n:param callable factory: Syntactic sugar for\n``default=attr.Factory(factory)``.\n\n:param validator: `callable` that is called by *attrs*-generated\n``init`` methods after the instance has been initialized.  They\nreceive the initialized instance, the :func:`~attrs.Attribute`, and the\npassed value.\n\nThe return value is *not* inspected so the validator has to throw an\nexception itself.\n\nIf a `list` is passed, its items are treated as validators and must all\npass.\n\nValidators can be globally disabled and re-enabled using\n`attrs.validators.getdisabled` / `attrs.validators.setdisabled`.\n\nThe validator can also be set using decorator notation as shown below.\n\n.. seealso:: :ref:`validators`\n\n:type validator: `callable` or a `list` of `callable`\\ s.\n\n:param repr: Include this attribute in the generated ``repr`` method.\nIf ``True``, include the attribute; if ``False``, omit it. By default,\nthe built-in ``repr()`` function is used. To override how the attribute\nvalue is formatted, pass a ``callable`` that takes a single value and\nreturns a string. Note that the resulting string is used as-is, i.e. it\nwill be used directly *instead* of calling ``repr()`` (the default).\n:type repr: a `bool` or a `callable` to use a custom function.\n\n:param eq: If ``True`` (default), include this attribute in the generated\n``eq`` and ``ne`` methods that check two instances for\nequality. To override how the attribute value is compared, pass a\n``callable`` that takes a single value and returns the value to be\ncompared.\n\n.. seealso:: `comparison`\n:type eq: a `bool` or a `callable`.\n\n:param order: If ``True`` (default), include this attributes in the\ngenerated ``lt``, ``le``, ``gt`` and ``ge`` methods. To\noverride how the attribute value is ordered, pass a ``callable`` that\ntakes a single value and returns the value to be ordered.\n\n.. seealso:: `comparison`\n:type order: a `bool` or a `callable`.\n\n:param cmp: Setting *cmp* is equivalent to setting *eq* and *order* to the\nsame value. Must not be mixed with *eq* or *order*.\n\n.. seealso:: `comparison`\n:type cmp: a `bool` or a `callable`.\n\n:param bool | None hash: Include this attribute in the generated\n``hash`` method.  If ``None`` (default), mirror *eq*'s value.  This\nis the correct behavior according the Python spec.  Setting this value\nto anything else than ``None`` is *discouraged*.\n\n.. seealso:: `hashing`\n:param bool init: Include this attribute in the generated ``init``\nmethod.  It is possible to set this to ``False`` and set a default\nvalue.  In that case this attributed is unconditionally initialized\nwith the specified default value or factory.\n\n.. seealso:: `init`\n:param callable converter: `callable` that is called by *attrs*-generated\n``init`` methods to convert attribute's value to the desired\nformat.  It is given the passed-in value, and the returned value will\nbe used as the new value of the attribute.  The value is converted\nbefore being passed to the validator, if any.\n\n.. seealso:: :ref:`converters`\n:param dict | None metadata: An arbitrary mapping, to be used by\nthird-party components.  See `extending-metadata`.\n\n:param type: The type of the attribute. Nowadays, the preferred method to\nspecify the type is using a variable annotation (see :pep:`526`). This\nargument is provided for backward compatibility. Regardless of the\napproach used, the type will be stored on ``Attribute.type``.\n\nPlease note that *attrs* doesn't do anything with this metadata by\nitself. You can use it as part of your own code or for `static type\nchecking <types>`.\n:param bool kwonly: Make this attribute keyword-only in the generated\n``init`` (if ``init`` is ``False``, this parameter is ignored).\n:param onsetattr: Allows to overwrite the *onsetattr* setting from\n`attr.s`. If left `None`, the *onsetattr* value from `attr.s` is used.\nSet to `attrs.setters.NOOP` to run no `setattr` hooks for this\nattribute -- regardless of the setting in `attr.s`.\n:type onsetattr: `callable`, or a list of callables, or `None`, or\n`attrs.setters.NOOP`\n:param str | None alias: Override this attribute's parameter name in the\ngenerated ``init`` method. If left `None`, default to ``name``\nstripped of leading underscores. See `private-attributes`.\n\n.. versionadded:: 15.2.0 *convert*\n.. versionadded:: 16.3.0 *metadata*\n.. versionchanged:: 17.1.0 *validator* can be a ``list`` now.\n.. versionchanged:: 17.1.0\n*hash* is ``None`` and therefore mirrors *eq* by default.\n.. versionadded:: 17.3.0 *type*\n.. deprecated:: 17.4.0 *convert*\n.. versionadded:: 17.4.0 *converter* as a replacement for the deprecated\n*convert* to achieve consistency with other noun-based arguments.\n.. versionadded:: 18.1.0\n``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.\n.. versionadded:: 18.2.0 *kwonly*\n.. versionchanged:: 19.2.0 *convert* keyword argument removed.\n.. versionchanged:: 19.2.0 *repr* also accepts a custom callable.\n.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.\n.. versionadded:: 19.2.0 *eq* and *order*\n.. versionadded:: 20.1.0 *onsetattr*\n.. versionchanged:: 20.3.0 *kwonly* backported to Python 2\n.. versionchanged:: 21.1.0\n*eq*, *order*, and *cmp* also accept a custom callable\n.. versionchanged:: 21.1.0 *cmp* undeprecated\n.. versionadded:: 22.2.0 *alias*\n"
                },
                {
                    "name": "make_class",
                    "content": "A quick way to create a new class called *name* with *attrs*.\n\n:param str name: The name for the new class.\n\n:param attrs: A list of names or a dictionary of mappings of names to\n`attr.ib`\\ s / `attrs.field`\\ s.\n\nThe order is deduced from the order of the names or attributes inside\n*attrs*.  Otherwise the order of the definition of the attributes is\nused.\n:type attrs: `list` or `dict`\n\n:param tuple bases: Classes that the new class will subclass.\n\n:param dict classbody: An optional dictionary of class attributes for the new class.\n\n:param attributesarguments: Passed unmodified to `attr.s`.\n\n:return: A new class with *attrs*.\n:rtype: type\n\n.. versionadded:: 17.1.0 *bases*\n.. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.\n.. versionchanged:: 23.2.0 *classbody*\n\nmutable = define(maybecls=None, *, these=None, repr=None, unsafehash=None, hash=None, init=None, slots=True, frozen=False, weakrefslot=True, str=False, autoattribs=None, kwonly=False, cachehash=False, autoexc=True, eq=None, order=False, autodetect=True, getstatesetstate=None, onsetattr=None, fieldtransformer=None, matchargs=True)\nDefine an *attrs* class.\n\nDifferences to the classic `attr.s` that it uses underneath:\n\n- Automatically detect whether or not *autoattribs* should be `True` (c.f.\n*autoattribs* parameter).\n- Converters and validators run when attributes are set by default -- if\n*frozen* is `False`.\n- *slots=True*\n\n.. caution::\n\nUsually this has only upsides and few visible effects in everyday\nprogramming. But it *can* lead to some surprising behaviors, so please\nmake sure to read :term:`slotted classes`.\n- *autoexc=True*\n- *autodetect=True*\n- *order=False*\n- Some options that were only relevant on Python 2 or were kept around for\nbackwards-compatibility have been removed.\n\nPlease note that these are all defaults and you can change them as you\nwish.\n\n:param Optional[bool] autoattribs: If set to `True` or `False`, it behaves\nexactly like `attr.s`. If left `None`, `attr.s` will try to guess:\n\n1. If any attributes are annotated and no unannotated `attrs.fields`\\ s\nare found, it assumes *autoattribs=True*.\n2. Otherwise it assumes *autoattribs=False* and tries to collect\n`attrs.fields`\\ s.\n\nFor now, please refer to `attr.s` for the rest of the parameters.\n\n.. versionadded:: 20.1.0\n.. versionchanged:: 21.3.0 Converters are also run ``onsetattr``.\n.. versionadded:: 22.2.0\n*unsafehash* as an alias for *hash* (for :pep:`681` compliance).\n"
                },
                {
                    "name": "resolve_types",
                    "content": "Resolve any strings and forward annotations in type annotations.\n\nThis is only required if you need concrete types in `Attribute`'s *type*\nfield. In other words, you don't need to resolve your types if you only\nuse them for static type checking.\n\nWith no arguments, names will be looked up in the module in which the class\nwas created. If this is not what you want, e.g. if the name only exists\ninside a method, you may pass *globalns* or *localns* to specify other\ndictionaries in which to look up these names. See the docs of\n`typing.gettypehints` for more details.\n\n:param type cls: Class to resolve.\n:param Optional[dict] globalns: Dictionary containing global variables.\n:param Optional[dict] localns: Dictionary containing local variables.\n:param Optional[list] attribs: List of attribs for the given class.\nThis is necessary when calling from inside a ``fieldtransformer``\nsince *cls* is not an *attrs* class yet.\n:param bool includeextras: Resolve more accurately, if possible.\nPass ``includeextras`` to ``typing.gethints``, if supported by the\ntyping module. On supported Python versions (3.9+), this resolves the\ntypes more accurately.\n\n:raise TypeError: If *cls* is not a class.\n:raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*\nclass and you didn't pass any attribs.\n:raise NameError: If types cannot be resolved because of missing variables.\n\n:returns: *cls* so you can use this function also as a class decorator.\nPlease note that you have to apply it after `attrs.define`. That\nmeans the decorator has to come in the line before `attrs.define`.\n\n..  versionadded:: 20.1.0\n..  versionadded:: 21.1.0 *attribs*\n..  versionadded:: 23.1.0 *includeextras*\n\ns = attrs(maybecls=None, these=None, reprns=None, repr=None, cmp=None, hash=None, init=None, slots=False, frozen=False, weakrefslot=True, str=False, autoattribs=False, kwonly=False, cachehash=False, autoexc=False, eq=None, order=None, autodetect=False, collectbymro=False, getstatesetstate=None, onsetattr=None, fieldtransformer=None, matchargs=True, unsafehash=None)\nA class decorator that adds :term:`dunder methods` according to the\nspecified attributes using `attr.ib` or the *these* argument.\n\nPlease consider using `attrs.define` / `attrs.frozen` in new code\n(``attr.s`` will *never* go away, though).\n\n:param these: A dictionary of name to `attr.ib` mappings.  This is useful\nto avoid the definition of your attributes within the class body\nbecause you can't (e.g. if you want to add ``repr`` methods to\nDjango models) or don't want to.\n\nIf *these* is not ``None``, *attrs* will *not* search the class body\nfor attributes and will *not* remove any attributes from it.\n\nThe order is deduced from the order of the attributes inside *these*.\n\n:type these: `dict` of `str` to `attr.ib`\n\n:param str reprns: When using nested classes, there's no way in Python 2\nto automatically detect that.  Therefore it's possible to set the\nnamespace explicitly for a more meaningful ``repr`` output.\n:param bool autodetect: Instead of setting the *init*, *repr*, *eq*,\n*order*, and *hash* arguments explicitly, assume they are set to\n``True`` unless any of the involved methods for one of the\narguments is implemented in the *current* class (i.e. it is *not*\ninherited from some base class).\n\nSo for example by implementing ``eq`` on a class yourself, *attrs*\nwill deduce ``eq=False`` and will create *neither* ``eq`` *nor*\n``ne`` (but Python classes come with a sensible ``ne`` by\ndefault, so it *should* be enough to only implement ``eq`` in most\ncases).\n\n.. warning::\n\nIf you prevent *attrs* from creating the ordering methods for you\n(``order=False``, e.g. by implementing ``le``), it becomes\n*your* responsibility to make sure its ordering is sound. The best\nway is to use the `functools.totalordering` decorator.\n\n\nPassing ``True`` or ``False`` to *init*, *repr*, *eq*, *order*, *cmp*,\nor *hash* overrides whatever *autodetect* would determine.\n\n:param bool repr: Create a ``repr`` method with a human readable\nrepresentation of *attrs* attributes..\n:param bool str: Create a ``str`` method that is identical to\n``repr``.  This is usually not necessary except for `Exception`\\ s.\n:param bool | None eq: If ``True`` or ``None`` (default), add ``eq``\nand ``ne`` methods that check two instances for equality.\n\nThey compare the instances as if they were tuples of their *attrs*\nattributes if and only if the types of both classes are *identical*!\n\n.. seealso:: `comparison`\n:param bool | None order: If ``True``, add ``lt``, ``le``,\n``gt``, and ``ge`` methods that behave like *eq* above and\nallow instances to be ordered. If ``None`` (default) mirror value of\n*eq*.\n\n.. seealso:: `comparison`\n:param bool | None cmp: Setting *cmp* is equivalent to setting *eq* and\n*order* to the same value. Must not be mixed with *eq* or *order*.\n\n.. seealso:: `comparison`\n:param bool | None unsafehash: If ``None`` (default), the ``hash``\nmethod is generated according how *eq* and *frozen* are set.\n\n1. If *both* are True, *attrs* will generate a ``hash`` for you.\n2. If *eq* is True and *frozen* is False, ``hash`` will be set to\nNone, marking it unhashable (which it is).\n3. If *eq* is False, ``hash`` will be left untouched meaning the\n``hash`` method of the base class will be used (if base class is\n``object``, this means it will fall back to id-based hashing.).\n\nAlthough not recommended, you can decide for yourself and force *attrs*\nto create one (e.g. if the class is immutable even though you didn't\nfreeze it programmatically) by passing ``True`` or not.  Both of these\ncases are rather special and should be used carefully.\n\n.. seealso::\n\n- Our documentation on `hashing`,\n- Python's documentation on `object.hash`,\n- and the `GitHub issue that led to the default \\\nbehavior <https://github.com/python-attrs/attrs/issues/136>` for\nmore details.\n\n:param bool | None hash: Alias for *unsafehash*. *unsafehash* takes\nprecedence.\n:param bool init: Create a ``init`` method that initializes the *attrs*\nattributes. Leading underscores are stripped for the argument name. If\na ``attrspreinit`` method exists on the class, it will be called\nbefore the class is initialized. If a ``attrspostinit`` method\nexists on the class, it will be called after the class is fully\ninitialized.\n\nIf ``init`` is ``False``, an ``attrsinit`` method will be injected\ninstead. This allows you to define a custom ``init`` method that\ncan do pre-init work such as ``super().init()``, and then call\n``attrsinit()`` and ``attrspostinit()``.\n\n.. seealso:: `init`\n:param bool slots: Create a :term:`slotted class <slotted classes>` that's\nmore memory-efficient. Slotted classes are generally superior to the\ndefault dict classes, but have some gotchas you should know about, so\nwe encourage you to read the :term:`glossary entry <slotted classes>`.\n:param bool frozen: Make instances immutable after initialization.  If\nsomeone attempts to modify a frozen instance,\n`attrs.exceptions.FrozenInstanceError` is raised.\n\n.. note::\n\n1. This is achieved by installing a custom ``setattr`` method\non your class, so you can't implement your own.\n\n2. True immutability is impossible in Python.\n\n3. This *does* have a minor a runtime performance `impact\n<how-frozen>` when initializing new instances.  In other words:\n``init`` is slightly slower with ``frozen=True``.\n\n4. If a class is frozen, you cannot modify ``self`` in\n``attrspostinit`` or a self-written ``init``. You can\ncircumvent that limitation by using ``object.setattr(self,\n\"attributename\", value)``.\n\n5. Subclasses of a frozen class are frozen too.\n\n:param bool weakrefslot: Make instances weak-referenceable.  This has no\neffect unless ``slots`` is also enabled.\n:param bool autoattribs: If ``True``, collect :pep:`526`-annotated\nattributes from the class body.\n\nIn this case, you must annotate every field.  If *attrs* encounters\na field that is set to an `attr.ib` but lacks a type annotation, an\n`attr.exceptions.UnannotatedAttributeError` is raised.  Use\n``fieldname: typing.Any = attr.ib(...)`` if you don't want to set a\ntype.\n\nIf you assign a value to those attributes (e.g. ``x: int = 42``), that\nvalue becomes the default value like if it were passed using\n``attr.ib(default=42)``.  Passing an instance of `attrs.Factory` also\nworks as expected in most cases (see warning below).\n\nAttributes annotated as `typing.ClassVar`, and attributes that are\nneither annotated nor set to an `attr.ib` are ignored.\n\n.. warning::\nFor features that use the attribute name to create decorators (e.g.\n:ref:`validators <validators>`), you still *must* assign `attr.ib`\nto them. Otherwise Python will either not find the name or try to\nuse the default value to call e.g. ``validator`` on it.\n\nThese errors can be quite confusing and probably the most common bug\nreport on our bug tracker.\n\n:param bool kwonly: Make all attributes keyword-only in the generated\n``init`` (if ``init`` is ``False``, this parameter is ignored).\n:param bool cachehash: Ensure that the object's hash code is computed only\nonce and stored on the object.  If this is set to ``True``, hashing\nmust be either explicitly or implicitly enabled for this class.  If the\nhash code is cached, avoid any reassignments of fields involved in hash\ncode computation or mutations of the objects those fields point to\nafter object creation.  If such changes occur, the behavior of the\nobject's hash code is undefined.\n:param bool autoexc: If the class subclasses `BaseException` (which\nimplicitly includes any subclass of any exception), the following\nhappens to behave like a well-behaved Python exceptions class:\n\n- the values for *eq*, *order*, and *hash* are ignored and the\ninstances compare and hash by the instance's ids (N.B. *attrs* will\n*not* remove existing implementations of ``hash`` or the equality\nmethods. It just won't add own ones.),\n- all attributes that are either passed into ``init`` or have a\ndefault value are additionally available as a tuple in the ``args``\nattribute,\n- the value of *str* is ignored leaving ``str`` to base classes.\n:param bool collectbymro: Setting this to `True` fixes the way *attrs*\ncollects attributes from base classes.  The default behavior is\nincorrect in certain cases of multiple inheritance.  It should be on by\ndefault but is kept off for backward-compatibility.\n\n.. seealso::\nIssue `#428 <https://github.com/python-attrs/attrs/issues/428>`\n\n:param bool | None getstatesetstate:\n.. note::\nThis is usually only interesting for slotted classes and you should\nprobably just set *autodetect* to `True`.\n\nIf `True`, ``getstate`` and ``setstate`` are generated and\nattached to the class. This is necessary for slotted classes to be\npickleable. If left `None`, it's `True` by default for slotted classes\nand ``False`` for dict classes.\n\nIf *autodetect* is `True`, and *getstatesetstate* is left `None`, and\neither ``getstate`` or ``setstate`` is detected directly on\nthe class (i.e. not inherited), it is set to `False` (this is usually\nwhat you want).\n\n:param onsetattr: A callable that is run whenever the user attempts to set\nan attribute (either by assignment like ``i.x = 42`` or by using\n`setattr` like ``setattr(i, \"x\", 42)``). It receives the same arguments\nas validators: the instance, the attribute that is being modified, and\nthe new value.\n\nIf no exception is raised, the attribute is set to the return value of\nthe callable.\n\nIf a list of callables is passed, they're automatically wrapped in an\n`attrs.setters.pipe`.\n:type onsetattr: `callable`, or a list of callables, or `None`, or\n`attrs.setters.NOOP`\n\n:param callable | None fieldtransformer:\nA function that is called with the original class object and all fields\nright before *attrs* finalizes the class.  You can use this, e.g., to\nautomatically add converters or validators to fields based on their\ntypes.\n\n.. seealso:: `transform-fields`\n\n:param bool matchargs:\nIf `True` (default), set ``matchargs`` on the class to support\n:pep:`634` (Structural Pattern Matching). It is a tuple of all\nnon-keyword-only ``init`` parameter names on Python 3.10 and later.\nIgnored on older Python versions.\n\n.. versionadded:: 16.0.0 *slots*\n.. versionadded:: 16.1.0 *frozen*\n.. versionadded:: 16.3.0 *str*\n.. versionadded:: 16.3.0 Support for ``attrspostinit``.\n.. versionchanged:: 17.1.0\n*hash* supports ``None`` as value which is also the default now.\n.. versionadded:: 17.3.0 *autoattribs*\n.. versionchanged:: 18.1.0\nIf *these* is passed, no attributes are deleted from the class body.\n.. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.\n.. versionadded:: 18.2.0 *weakrefslot*\n.. deprecated:: 18.2.0\n``lt``, ``le``, ``gt``, and ``ge`` now raise a\n`DeprecationWarning` if the classes compared are subclasses of\neach other. ``eq`` and ``ne`` never tried to compared subclasses\nto each other.\n.. versionchanged:: 19.2.0\n``lt``, ``le``, ``gt``, and ``ge`` now do not consider\nsubclasses comparable anymore.\n.. versionadded:: 18.2.0 *kwonly*\n.. versionadded:: 18.2.0 *cachehash*\n.. versionadded:: 19.1.0 *autoexc*\n.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.\n.. versionadded:: 19.2.0 *eq* and *order*\n.. versionadded:: 20.1.0 *autodetect*\n.. versionadded:: 20.1.0 *collectbymro*\n.. versionadded:: 20.1.0 *getstatesetstate*\n.. versionadded:: 20.1.0 *onsetattr*\n.. versionadded:: 20.3.0 *fieldtransformer*\n.. versionchanged:: 21.1.0\n``init=False`` injects ``attrsinit``\n.. versionchanged:: 21.1.0 Support for ``attrspreinit``\n.. versionchanged:: 21.1.0 *cmp* undeprecated\n.. versionadded:: 21.3.0 *matchargs*\n.. versionadded:: 22.2.0\n*unsafehash* as an alias for *hash* (for :pep:`681` compliance).\n"
                },
                {
                    "name": "set_run_validators",
                    "content": "Set whether or not validators are run.  By default, they are run.\n\n.. deprecated:: 21.3.0 It will not be removed, but it also will not be\nmoved to new ``attrs`` namespace. Use `attrs.validators.setdisabled()`\ninstead.\n"
                },
                {
                    "name": "validate",
                    "content": "Validate all attributes on *inst* that have a validator.\n\nLeaves all exceptions through.\n\n:param inst: Instance of a class with *attrs* attributes.\n"
                }
            ]
        },
        "DATA": {
            "content": "NOTHING = NOTHING\nall = ['Attribute', 'AttrsInstance', 'Factory', 'NOTHING', 'asdict...\nfrozen = functools.partial(<function define at 0x7fdcc880c860>, frozen...\n",
            "subsections": []
        },
        "VERSION": {
            "content": "23.2.0\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Hynek Schlawack\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/attr/init.py\n\n",
            "subsections": []
        }
    },
    "summary": "attr - Classes Without Boilerplate",
    "flags": [],
    "examples": [],
    "see_also": []
}