parameters: (
      maybe_cls=None,
      these=None,
      repr_ns=None,
      repr=True,
      cmp=None,
      hash=None,
      init=True,
      slots=False,
      frozen=False,
      weakref_slot=True,
      str=False,
      auto_attribs=False,
      kw_only=False,
      cache_hash=False,
      auto_exc=False,
      eq=None,
      order=None,
  )
docstring: r"""
      A class decorator that adds `dunder
      <https://wiki.python.org/moin/DunderAlias>`_\ -methods according to the
      specified attributes using `attr.ib` or the *these* argument.
  
      :param these: A dictionary of name to `attr.ib` mappings.  This is
          useful to avoid the definition of your attributes within the class body
          because you can't (e.g. if you want to add ``__repr__`` methods to
          Django models) or don't want to.
  
          If *these* is not ``None``, ``attrs`` will *not* search the class body
          for attributes and will *not* remove any attributes from it.
  
          If *these* is an ordered dict (`dict` on Python 3.6+,
          `collections.OrderedDict` otherwise), the order is deduced from
          the order of the attributes inside *these*.  Otherwise the order
          of the definition of the attributes is used.
  
      :type these: `dict` of `str` to `attr.ib`
  
      :param str repr_ns: When using nested classes, there's no way in Python 2
          to automatically detect that.  Therefore it's possible to set the
          namespace explicitly for a more meaningful ``repr`` output.
      :param bool repr: Create a ``__repr__`` method with a human readable
          representation of ``attrs`` attributes..
      :param bool str: Create a ``__str__`` method that is identical to
          ``__repr__``.  This is usually not necessary except for
          `Exception`\ s.
      :param bool eq: If ``True`` or ``None`` (default), add ``__eq__`` and
          ``__ne__`` methods that check two instances for equality.
  
          They compare the instances as if they were tuples of their ``attrs``
          attributes, but only iff the types of both classes are *identical*!
      :type eq: `bool` or `None`
      :param bool order: If ``True``, add ``__lt__``, ``__le__``, ``__gt__``,
          and ``__ge__`` methods that behave like *eq* above and allow instances
          to be ordered. If ``None`` (default) mirror value of *eq*.
      :type order: `bool` or `None`
      :param cmp: Setting to ``True`` is equivalent to setting ``eq=True,
          order=True``. Deprecated in favor of *eq* and *order*, has precedence
          over them for backward-compatibility though. Must not be mixed with
          *eq* or *order*.
      :type cmp: `bool` or `None`
      :param hash: If ``None`` (default), the ``__hash__`` method is generated
          according how *eq* and *frozen* are set.
  
          1. If *both* are True, ``attrs`` will generate a ``__hash__`` for you.
          2. If *eq* is True and *frozen* is False, ``__hash__`` will be set to
             None, marking it unhashable (which it is).
          3. If *eq* is False, ``__hash__`` will be left untouched meaning the
             ``__hash__`` method of the base class will be used (if base class is
             ``object``, this means it will fall back to id-based hashing.).
  
          Although not recommended, you can decide for yourself and force
          ``attrs`` to create one (e.g. if the class is immutable even though you
          didn't freeze it programmatically) by passing ``True`` or not.  Both of
          these cases are rather special and should be used carefully.
  
          See our documentation on `hashing`, Python's documentation on
          `object.__hash__`, and the `GitHub issue that led to the default \
          behavior <https://github.com/python-attrs/attrs/issues/136>`_ for more
          details.
      :type hash: ``bool`` or ``None``
      :param bool init: Create a ``__init__`` method that initializes the
          ``attrs`` attributes.  Leading underscores are stripped for the
          argument name.  If a ``__attrs_post_init__`` method exists on the
          class, it will be called after the class is fully initialized.
      :param bool slots: Create a `slotted class <slotted classes>` that's more
          memory-efficient.
      :param bool frozen: Make instances immutable after initialization.  If
          someone attempts to modify a frozen instance,
          `attr.exceptions.FrozenInstanceError` is raised.
  
          Please note:
  
              1. This is achieved by installing a custom ``__setattr__`` method
                 on your class, so you can't implement your own.
  
              2. True immutability is impossible in Python.
  
              3. This *does* have a minor a runtime performance `impact
                 <how-frozen>` when initializing new instances.  In other words:
                 ``__init__`` is slightly slower with ``frozen=True``.
  
              4. If a class is frozen, you cannot modify ``self`` in
                 ``__attrs_post_init__`` or a self-written ``__init__``. You can
                 circumvent that limitation by using
                 ``object.__setattr__(self, "attribute_name", value)``.
  
      :param bool weakref_slot: Make instances weak-referenceable.  This has no
          effect unless ``slots`` is also enabled.
      :param bool auto_attribs: If True, collect `PEP 526`_-annotated attributes
          (Python 3.6 and later only) from the class body.
  
          In this case, you **must** annotate every field.  If ``attrs``
          encounters a field that is set to an `attr.ib` but lacks a type
          annotation, an `attr.exceptions.UnannotatedAttributeError` is
          raised.  Use ``field_name: typing.Any = attr.ib(...)`` if you don't
          want to set a type.
  
          If you assign a value to those attributes (e.g. ``x: int = 42``), that
          value becomes the default value like if it were passed using
          ``attr.ib(default=42)``.  Passing an instance of `Factory` also
          works as expected.
  
          Attributes annotated as `typing.ClassVar`, and attributes that are
          neither annotated nor set to an `attr.ib` are **ignored**.
  
          .. _`PEP 526`: https://www.python.org/dev/peps/pep-0526/
      :param bool kw_only: Make all attributes keyword-only (Python 3+)
          in the generated ``__init__`` (if ``init`` is ``False``, this
          parameter is ignored).
      :param bool cache_hash: Ensure that the object's hash code is computed
          only once and stored on the object.  If this is set to ``True``,
          hashing must be either explicitly or implicitly enabled for this
          class.  If the hash code is cached, avoid any reassignments of
          fields involved in hash code computation or mutations of the objects
          those fields point to after object creation.  If such changes occur,
          the behavior of the object's hash code is undefined.
      :param bool auto_exc: If the class subclasses `BaseException`
          (which implicitly includes any subclass of any exception), the
          following happens to behave like a well-behaved Python exceptions
          class:
  
          - the values for *eq*, *order*, and *hash* are ignored and the
            instances compare and hash by the instance's ids (N.B. ``attrs`` will
            *not* remove existing implementations of ``__hash__`` or the equality
            methods. It just won't add own ones.),
          - all attributes that are either passed into ``__init__`` or have a
            default value are additionally available as a tuple in the ``args``
            attribute,
          - the value of *str* is ignored leaving ``__str__`` to base classes.
  
      .. versionadded:: 16.0.0 *slots*
      .. versionadded:: 16.1.0 *frozen*
      .. versionadded:: 16.3.0 *str*
      .. versionadded:: 16.3.0 Support for ``__attrs_post_init__``.
      .. versionchanged:: 17.1.0
         *hash* supports ``None`` as value which is also the default now.
      .. versionadded:: 17.3.0 *auto_attribs*
      .. versionchanged:: 18.1.0
         If *these* is passed, no attributes are deleted from the class body.
      .. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.
      .. versionadded:: 18.2.0 *weakref_slot*
      .. deprecated:: 18.2.0
         ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now raise a
         `DeprecationWarning` if the classes compared are subclasses of
         each other. ``__eq`` and ``__ne__`` never tried to compared subclasses
         to each other.
      .. versionchanged:: 19.2.0
         ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now do not consider
         subclasses comparable anymore.
      .. versionadded:: 18.2.0 *kw_only*
      .. versionadded:: 18.2.0 *cache_hash*
      .. versionadded:: 19.1.0 *auto_exc*
      .. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.
      .. versionadded:: 19.2.0 *eq* and *order*
docstring_summary: r"""
      A class decorator that adds `dunder
      <https://wiki.python.org/moin/DunderAlias>`_\ -methods according to the
      specified attributes using `attr.ib` or the *these* argument.
docstring_tokens: r A class decorator that adds dunder <https : // wiki . python . org / moin / DunderAlias > _ \ - methods according to the specified attributes using attr . ib or the * these * argument .
function: def attrs(
      maybe_cls=None,
      these=None,
      repr_ns=None,
      repr=True,
      cmp=None,
      hash=None,
      init=True,
      slots=False,
      frozen=False,
      weakref_slot=True,
      str=False,
      auto_attribs=False,
      kw_only=False,
      cache_hash=False,
      auto_exc=False,
      eq=None,
      order=None,
  ):
      r"""
      A class decorator that adds `dunder
      <https://wiki.python.org/moin/DunderAlias>`_\ -methods according to the
      specified attributes using `attr.ib` or the *these* argument.
  
      :param these: A dictionary of name to `attr.ib` mappings.  This is
          useful to avoid the definition of your attributes within the class body
          because you can't (e.g. if you want to add ``__repr__`` methods to
          Django models) or don't want to.
  
          If *these* is not ``None``, ``attrs`` will *not* search the class body
          for attributes and will *not* remove any attributes from it.
  
          If *these* is an ordered dict (`dict` on Python 3.6+,
          `collections.OrderedDict` otherwise), the order is deduced from
          the order of the attributes inside *these*.  Otherwise the order
          of the definition of the attributes is used.
  
      :type these: `dict` of `str` to `attr.ib`
  
      :param str repr_ns: When using nested classes, there's no way in Python 2
          to automatically detect that.  Therefore it's possible to set the
          namespace explicitly for a more meaningful ``repr`` output.
      :param bool repr: Create a ``__repr__`` method with a human readable
          representation of ``attrs`` attributes..
      :param bool str: Create a ``__str__`` method that is identical to
          ``__repr__``.  This is usually not necessary except for
          `Exception`\ s.
      :param bool eq: If ``True`` or ``None`` (default), add ``__eq__`` and
          ``__ne__`` methods that check two instances for equality.
  
          They compare the instances as if they were tuples of their ``attrs``
          attributes, but only iff the types of both classes are *identical*!
      :type eq: `bool` or `None`
      :param bool order: If ``True``, add ``__lt__``, ``__le__``, ``__gt__``,
          and ``__ge__`` methods that behave like *eq* above and allow instances
          to be ordered. If ``None`` (default) mirror value of *eq*.
      :type order: `bool` or `None`
      :param cmp: Setting to ``True`` is equivalent to setting ``eq=True,
          order=True``. Deprecated in favor of *eq* and *order*, has precedence
          over them for backward-compatibility though. Must not be mixed with
          *eq* or *order*.
      :type cmp: `bool` or `None`
      :param hash: If ``None`` (default), the ``__hash__`` method is generated
          according how *eq* and *frozen* are set.
  
          1. If *both* are True, ``attrs`` will generate a ``__hash__`` for you.
          2. If *eq* is True and *frozen* is False, ``__hash__`` will be set to
             None, marking it unhashable (which it is).
          3. If *eq* is False, ``__hash__`` will be left untouched meaning the
             ``__hash__`` method of the base class will be used (if base class is
             ``object``, this means it will fall back to id-based hashing.).
  
          Although not recommended, you can decide for yourself and force
          ``attrs`` to create one (e.g. if the class is immutable even though you
          didn't freeze it programmatically) by passing ``True`` or not.  Both of
          these cases are rather special and should be used carefully.
  
          See our documentation on `hashing`, Python's documentation on
          `object.__hash__`, and the `GitHub issue that led to the default \
          behavior <https://github.com/python-attrs/attrs/issues/136>`_ for more
          details.
      :type hash: ``bool`` or ``None``
      :param bool init: Create a ``__init__`` method that initializes the
          ``attrs`` attributes.  Leading underscores are stripped for the
          argument name.  If a ``__attrs_post_init__`` method exists on the
          class, it will be called after the class is fully initialized.
      :param bool slots: Create a `slotted class <slotted classes>` that's more
          memory-efficient.
      :param bool frozen: Make instances immutable after initialization.  If
          someone attempts to modify a frozen instance,
          `attr.exceptions.FrozenInstanceError` is raised.
  
          Please note:
  
              1. This is achieved by installing a custom ``__setattr__`` method
                 on your class, so you can't implement your own.
  
              2. True immutability is impossible in Python.
  
              3. This *does* have a minor a runtime performance `impact
                 <how-frozen>` when initializing new instances.  In other words:
                 ``__init__`` is slightly slower with ``frozen=True``.
  
              4. If a class is frozen, you cannot modify ``self`` in
                 ``__attrs_post_init__`` or a self-written ``__init__``. You can
                 circumvent that limitation by using
                 ``object.__setattr__(self, "attribute_name", value)``.
  
      :param bool weakref_slot: Make instances weak-referenceable.  This has no
          effect unless ``slots`` is also enabled.
      :param bool auto_attribs: If True, collect `PEP 526`_-annotated attributes
          (Python 3.6 and later only) from the class body.
  
          In this case, you **must** annotate every field.  If ``attrs``
          encounters a field that is set to an `attr.ib` but lacks a type
          annotation, an `attr.exceptions.UnannotatedAttributeError` is
          raised.  Use ``field_name: typing.Any = attr.ib(...)`` if you don't
          want to set a type.
  
          If you assign a value to those attributes (e.g. ``x: int = 42``), that
          value becomes the default value like if it were passed using
          ``attr.ib(default=42)``.  Passing an instance of `Factory` also
          works as expected.
  
          Attributes annotated as `typing.ClassVar`, and attributes that are
          neither annotated nor set to an `attr.ib` are **ignored**.
  
          .. _`PEP 526`: https://www.python.org/dev/peps/pep-0526/
      :param bool kw_only: Make all attributes keyword-only (Python 3+)
          in the generated ``__init__`` (if ``init`` is ``False``, this
          parameter is ignored).
      :param bool cache_hash: Ensure that the object's hash code is computed
          only once and stored on the object.  If this is set to ``True``,
          hashing must be either explicitly or implicitly enabled for this
          class.  If the hash code is cached, avoid any reassignments of
          fields involved in hash code computation or mutations of the objects
          those fields point to after object creation.  If such changes occur,
          the behavior of the object's hash code is undefined.
      :param bool auto_exc: If the class subclasses `BaseException`
          (which implicitly includes any subclass of any exception), the
          following happens to behave like a well-behaved Python exceptions
          class:
  
          - the values for *eq*, *order*, and *hash* are ignored and the
            instances compare and hash by the instance's ids (N.B. ``attrs`` will
            *not* remove existing implementations of ``__hash__`` or the equality
            methods. It just won't add own ones.),
          - all attributes that are either passed into ``__init__`` or have a
            default value are additionally available as a tuple in the ``args``
            attribute,
          - the value of *str* is ignored leaving ``__str__`` to base classes.
  
      .. versionadded:: 16.0.0 *slots*
      .. versionadded:: 16.1.0 *frozen*
      .. versionadded:: 16.3.0 *str*
      .. versionadded:: 16.3.0 Support for ``__attrs_post_init__``.
      .. versionchanged:: 17.1.0
         *hash* supports ``None`` as value which is also the default now.
      .. versionadded:: 17.3.0 *auto_attribs*
      .. versionchanged:: 18.1.0
         If *these* is passed, no attributes are deleted from the class body.
      .. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.
      .. versionadded:: 18.2.0 *weakref_slot*
      .. deprecated:: 18.2.0
         ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now raise a
         `DeprecationWarning` if the classes compared are subclasses of
         each other. ``__eq`` and ``__ne__`` never tried to compared subclasses
         to each other.
      .. versionchanged:: 19.2.0
         ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now do not consider
         subclasses comparable anymore.
      .. versionadded:: 18.2.0 *kw_only*
      .. versionadded:: 18.2.0 *cache_hash*
      .. versionadded:: 19.1.0 *auto_exc*
      .. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.
      .. versionadded:: 19.2.0 *eq* and *order*
      """
      eq, order = _determine_eq_order(cmp, eq, order)
  
      def wrap(cls):
  
          if getattr(cls, "__class__", None) is None:
              raise TypeError("attrs only works with new-style classes.")
  
          is_exc = auto_exc is True and issubclass(cls, BaseException)
  
          builder = _ClassBuilder(
              cls,
              these,
              slots,
              frozen,
              weakref_slot,
              auto_attribs,
              kw_only,
              cache_hash,
              is_exc,
          )
  
          if repr is True:
              builder.add_repr(repr_ns)
          if str is True:
              builder.add_str()
          if eq is True and not is_exc:
              builder.add_eq()
          if order is True and not is_exc:
              builder.add_order()
  
          if hash is not True and hash is not False and hash is not None:
              # Can't use `hash in` because 1 == True for example.
              raise TypeError(
                  "Invalid value for hash.  Must be True, False, or None."
              )
          elif hash is False or (hash is None and eq is False) or is_exc:
              # Don't do anything. Should fall back to __object__'s __hash__
              # which is by id.
              if cache_hash:
                  raise TypeError(
                      "Invalid value for cache_hash.  To use hash caching,"
                      " hashing must be either explicitly or implicitly "
                      "enabled."
                  )
          elif hash is True or (hash is None and eq is True and frozen is True):
              # Build a __hash__ if told so, or if it's safe.
              builder.add_hash()
          else:
              # Raise TypeError on attempts to hash.
              if cache_hash:
                  raise TypeError(
                      "Invalid value for cache_hash.  To use hash caching,"
                      " hashing must be either explicitly or implicitly "
                      "enabled."
                  )
              builder.make_unhashable()
  
          if init is True:
              builder.add_init()
          else:
              if cache_hash:
                  raise TypeError(
                      "Invalid value for cache_hash.  To use hash caching,"
                      " init must be True."
                  )
  
          return builder.build_class()
  
      # maybe_cls's type depends on the usage of the decorator.  It's a class
      # if it's used as `@attrs` but ``None`` if used as `@attrs()`.
      if maybe_cls is None:
          return wrap
      else:
          return wrap(maybe_cls)
function_tokens: def attrs ( maybe_cls = None , these = None , repr_ns = None , repr = True , cmp = None , hash = None , init = True , slots = False , frozen = False , weakref_slot = True , str = False , auto_attribs = False , kw_only = False , cache_hash = False , auto_exc = False , eq = None , order = None , ) : eq , order = _determine_eq_order ( cmp , eq , order ) def wrap ( cls ) : if getattr ( cls , "__class__" , None ) is None : raise TypeError ( "attrs only works with new-style classes." ) is_exc = auto_exc is True and issubclass ( cls , BaseException ) builder = _ClassBuilder ( cls , these , slots , frozen , weakref_slot , auto_attribs , kw_only , cache_hash , is_exc , ) if repr is True : builder . add_repr ( repr_ns ) if str is True : builder . add_str ( ) if eq is True and not is_exc : builder . add_eq ( ) if order is True and not is_exc : builder . add_order ( ) if hash is not True and hash is not False and hash is not None : # Can't use `hash in` because 1 == True for example. raise TypeError ( "Invalid value for hash.  Must be True, False, or None." ) elif hash is False or ( hash is None and eq is False ) or is_exc : # Don't do anything. Should fall back to __object__'s __hash__ # which is by id. if cache_hash : raise TypeError ( "Invalid value for cache_hash.  To use hash caching," " hashing must be either explicitly or implicitly " "enabled." ) elif hash is True or ( hash is None and eq is True and frozen is True ) : # Build a __hash__ if told so, or if it's safe. builder . add_hash ( ) else : # Raise TypeError on attempts to hash. if cache_hash : raise TypeError ( "Invalid value for cache_hash.  To use hash caching," " hashing must be either explicitly or implicitly " "enabled." ) builder . make_unhashable ( ) if init is True : builder . add_init ( ) else : if cache_hash : raise TypeError ( "Invalid value for cache_hash.  To use hash caching," " init must be True." ) return builder . build_class ( ) # maybe_cls's type depends on the usage of the decorator.  It's a class # if it's used as `@attrs` but ``None`` if used as `@attrs()`. if maybe_cls is None : return wrap else : return wrap ( maybe_cls )