MCPcopy
hub / github.com/python-attrs/attrs / _CountingAttr

Class _CountingAttr

src/attr/_make.py:2696–2841  ·  view source on GitHub ↗

Intermediate representation of attributes that uses a counter to preserve the order in which the attributes have been defined. *Internal* data structure of the attrs library. Running into is most likely the result of a bug like a forgotten `@attr.s` decorator.

Source from the content-addressed store, hash-verified

2694
2695
2696class _CountingAttr:
2697 """
2698 Intermediate representation of attributes that uses a counter to preserve
2699 the order in which the attributes have been defined.
2700
2701 *Internal* data structure of the attrs library. Running into is most
2702 likely the result of a bug like a forgotten `@attr.s` decorator.
2703 """
2704
2705 __slots__ = (
2706 "_default",
2707 "_validator",
2708 "alias",
2709 "converter",
2710 "counter",
2711 "eq",
2712 "eq_key",
2713 "hash",
2714 "init",
2715 "kw_only",
2716 "metadata",
2717 "on_setattr",
2718 "order",
2719 "order_key",
2720 "repr",
2721 "type",
2722 )
2723 __attrs_attrs__ = (
2724 *tuple(
2725 Attribute(
2726 name=name,
2727 alias=_default_init_alias_for(name),
2728 default=NOTHING,
2729 validator=None,
2730 repr=True,
2731 cmp=None,
2732 hash=True,
2733 init=True,
2734 kw_only=False,
2735 eq=True,
2736 eq_key=None,
2737 order=False,
2738 order_key=None,
2739 inherited=False,
2740 on_setattr=None,
2741 )
2742 for name in (
2743 "counter",
2744 "_default",
2745 "repr",
2746 "eq",
2747 "order",
2748 "hash",
2749 "init",
2750 "on_setattr",
2751 "alias",
2752 )
2753 ),

Callers 1

attribFunction · 0.85

Calls 2

AttributeClass · 0.85
_default_init_alias_forFunction · 0.85

Tested by

no test coverage detected