1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
U
L±dÓzã@s@ddlZddlZddlZddlZddlZddlZddlmZddlm    Z    m
Z
m Z ddl    m Z m Z mZmZddlmZmZmZmZejZdZdZd    Zd
Ze i¡ZeƒZe  e j e j!¡Z"Gd d „d ej#ƒZ$e$j%Z%Gd d„de&ƒZ'e%ddddddddddddddfdd„Z(dydd„Z)dd„Z*dd„Z+e+ddddgƒZ,dd„Z-d d!„Z.d"d#„Z/d$d%„Z0d&d'„Z1d(d)„Z2d*d+„Z3d,d-„Z4Gd.d/„d/ƒZ5d0d1„Z6d2d3„Z7dzd4d5„Z8d{d6d„Z9e9Z:d7d8„Z;d9d:„Z<d;d<„Z=d=d>„Z>d?d@„Z?dAdB„Z@dCdD„ZAd|dEdF„ZBdGdH„ZCd}dIdJ„ZDdKdL„ZEdMdN„ZFdOdP„Z!dQdR„ZGdSdT„ZHdUdV„ZIdWdX„ZJdYdZ„ZKd[d\„ZLd]d^„ZMd_d`„ZNeOeOdaœdbdc„ZPGddde„deƒZQdfdg„eQjRDƒZSe>eBeDeQeSdhdidg„eSDƒdhdjdg„eSDƒdhZQGdkdl„dlƒZTeBeDeTƒƒZTGdmdn„dnƒZUdodg„eUjRDƒZVe>eBeDeUeVdheVdheVdhZUeffdpdq„ZWe9dddrGdsdt„dtƒƒZXdudv„ZYdwdx„ZdS)~éN)Ú
itemgetteré)Ú_compatÚ_configÚsetters)ÚPY310Ú_AnnotationExtractorÚget_generic_baseÚset_closure_cell)ÚDefaultAlreadySetErrorÚFrozenInstanceErrorÚNotAnAttrsClassErrorÚUnannotatedAttributeErrorz__attr_converter_%sz__attr_factory_%s)ztyping.ClassVarz
t.ClassVarÚClassVarztyping_extensions.ClassVarZ_attrs_cached_hashc@s(eZdZdZe ¡Zdd„Zdd„ZdS)Ú_NothingaH
    Sentinel to indicate the lack of a value when ``None`` is ambiguous.
 
    If extending attrs, you can use ``typing.Literal[NOTHING]`` to show
    that a value may be ``NOTHING``.
 
    .. versionchanged:: 21.1.0 ``bool(NOTHING)`` is now False.
    .. versionchanged:: 22.2.0 ``NOTHING`` is now an ``enum.Enum`` variant.
    cCsdS)NÚNOTHING©©ÚselfrrúAd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\attr/_make.pyÚ__repr__Asz_Nothing.__repr__cCsdS)NFrrrrrÚ__bool__Dsz_Nothing.__bool__N)    Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚenumÚautorrrrrrrr4s
rc@s"eZdZdZedƒdfdd„ZdS)Ú_CacheHashWrappera
    An integer subclass that pickles / copies as None
 
    This is used for non-slots classes with ``cache_hash=True``, to avoid
    serializing a potentially (even likely) invalid hash value. Since ``None``
    is the default value for uncalculated hashes, whenever this is copied,
    the copy's value for the hash should automatically reset.
 
    See GH #613 for more details.
    NrcCs||fS©Nr)rZ_none_constructorÚ_argsrrrÚ
__reduce__Zsz_CacheHashWrapper.__reduce__)rrrrÚtyper!rrrrrNs rTFcCsæt|| | dƒ\} }} }|dk    r6|dk    r6|dk    r6tdƒ‚|    dk    rf|tk    rNtdƒ‚t|    ƒs^tdƒ‚t|    ƒ}|dkrri}t| ttfƒrŠt    j
| Ž} |r¤t|ttfƒr¤t |Ž}|r¾t|ttfƒr¾t
|Ž}t |||d||||||
| || || |dS)aä
    Create a new attribute on a class.
 
    ..  warning::
 
        Does *not* do anything unless the class is also decorated with
        `attr.s` / `attrs.define` / et cetera!
 
    Please consider using `attrs.field` in new code (``attr.ib`` will *never*
    go away, though).
 
    :param default: A value that is used if an *attrs*-generated ``__init__``
        is used and no value is passed while instantiating or the attribute is
        excluded using ``init=False``.
 
        If the value is an instance of `attrs.Factory`, its callable will be
        used to construct a new value (useful for mutable data types like lists
        or dicts).
 
        If a default is not set (or set manually to `attrs.NOTHING`), a value
        *must* be supplied when instantiating; otherwise a `TypeError`
        will be raised.
 
        The default can also be set using decorator notation as shown below.
 
    :type default: Any value
 
    :param callable factory: Syntactic sugar for
        ``default=attr.Factory(factory)``.
 
    :param validator: `callable` that is called by *attrs*-generated
        ``__init__`` methods after the instance has been initialized.  They
        receive the initialized instance, the :func:`~attrs.Attribute`, and the
        passed value.
 
        The return value is *not* inspected so the validator has to throw an
        exception itself.
 
        If a `list` is passed, its items are treated as validators and must
        all pass.
 
        Validators can be globally disabled and re-enabled using
        `attrs.validators.get_disabled` / `attrs.validators.set_disabled`.
 
        The validator can also be set using decorator notation as shown below.
 
    :type validator: `callable` or a `list` of `callable`\ s.
 
    :param repr: Include this attribute in the generated ``__repr__``
        method. If ``True``, include the attribute; if ``False``, omit it. By
        default, the built-in ``repr()`` function is used. To override how the
        attribute value is formatted, pass a ``callable`` that takes a single
        value and returns a string. Note that the resulting string is used
        as-is, i.e. it will be used directly *instead* of calling ``repr()``
        (the default).
    :type repr: a `bool` or a `callable` to use a custom function.
 
    :param eq: If ``True`` (default), include this attribute in the
        generated ``__eq__`` and ``__ne__`` methods that check two instances
        for equality. To override how the attribute value is compared,
        pass a ``callable`` that takes a single value and returns the value
        to be compared.
    :type eq: a `bool` or a `callable`.
 
    :param order: If ``True`` (default), include this attributes in the
        generated ``__lt__``, ``__le__``, ``__gt__`` and ``__ge__`` methods.
        To override how the attribute value is ordered,
        pass a ``callable`` that takes a single value and returns the value
        to be ordered.
    :type order: a `bool` or a `callable`.
 
    :param cmp: Setting *cmp* is equivalent to setting *eq* and *order* to the
        same value. Must not be mixed with *eq* or *order*.
    :type cmp: a `bool` or a `callable`.
 
    :param Optional[bool] hash: Include this attribute in the generated
        ``__hash__`` method.  If ``None`` (default), mirror *eq*'s value.  This
        is the correct behavior according the Python spec.  Setting this value
        to anything else than ``None`` is *discouraged*.
    :param bool init: Include this attribute in the generated ``__init__``
        method.  It is possible to set this to ``False`` and set a default
        value.  In that case this attributed is unconditionally initialized
        with the specified default value or factory.
    :param callable converter: `callable` that is called by
        *attrs*-generated ``__init__`` methods to convert attribute's value
        to the desired format.  It is given the passed-in value, and the
        returned value will be used as the new value of the attribute.  The
        value is converted before being passed to the validator, if any.
    :param metadata: An arbitrary mapping, to be used by third-party
        components.  See `extending-metadata`.
 
    :param type: The type of the attribute. Nowadays, the preferred method to
        specify the type is using a variable annotation (see :pep:`526`).
        This argument is provided for backward compatibility.
        Regardless of the approach used, the type will be stored on
        ``Attribute.type``.
 
        Please note that *attrs* doesn't do anything with this metadata by
        itself. You can use it as part of your own code or for
        `static type checking <types>`.
    :param kw_only: Make this attribute keyword-only in the generated
        ``__init__`` (if ``init`` is ``False``, this parameter is ignored).
    :param on_setattr: Allows to overwrite the *on_setattr* setting from
        `attr.s`. If left `None`, the *on_setattr* value from `attr.s` is used.
        Set to `attrs.setters.NO_OP` to run **no** `setattr` hooks for this
        attribute -- regardless of the setting in `attr.s`.
    :type on_setattr: `callable`, or a list of callables, or `None`, or
        `attrs.setters.NO_OP`
    :param Optional[str] alias: Override this attribute's parameter name in the
        generated ``__init__`` method. If left `None`, default to ``name``
        stripped of leading underscores. See `private-attributes`.
 
    .. versionadded:: 15.2.0 *convert*
    .. versionadded:: 16.3.0 *metadata*
    .. versionchanged:: 17.1.0 *validator* can be a ``list`` now.
    .. versionchanged:: 17.1.0
       *hash* is ``None`` and therefore mirrors *eq* by default.
    .. versionadded:: 17.3.0 *type*
    .. deprecated:: 17.4.0 *convert*
    .. versionadded:: 17.4.0 *converter* as a replacement for the deprecated
       *convert* to achieve consistency with other noun-based arguments.
    .. versionadded:: 18.1.0
       ``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.
    .. versionadded:: 18.2.0 *kw_only*
    .. versionchanged:: 19.2.0 *convert* keyword argument removed.
    .. versionchanged:: 19.2.0 *repr* also accepts a custom callable.
    .. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.
    .. versionadded:: 19.2.0 *eq* and *order*
    .. versionadded:: 20.1.0 *on_setattr*
    .. versionchanged:: 20.3.0 *kw_only* backported to Python 2
    .. versionchanged:: 21.1.0
       *eq*, *order*, and *cmp* also accept a custom callable
    .. versionchanged:: 21.1.0 *cmp* undeprecated
    .. versionadded:: 22.2.0 *alias*
    TNFú6Invalid value for hash.  Must be True, False, or None.z=The `default` and `factory` arguments are mutually exclusive.z*The `factory` argument must be a callable.)ÚdefaultÚ    validatorÚreprÚcmpÚhashÚinitÚ    converterÚmetadatar"Úkw_onlyÚeqÚeq_keyÚorderÚ    order_keyÚ
on_setattrÚalias) Ú_determine_attrib_eq_orderÚ    TypeErrorrÚ
ValueErrorÚcallableÚFactoryÚ
isinstanceÚlistÚtuplerÚpipeÚand_Ú _CountingAttr)r$r%r&r'r(r)r+r"r*Úfactoryr,r-r/r1r2r.r0rrrÚattrib^sZÿ ÿÿ
ðr?ÚcCst||dƒ}t|||ƒdS)zU
    "Exec" the script with the given global (globs) and local (locs) variables.
    ÚexecN)ÚcompileÚeval)ÚscriptÚglobsÚlocsÚfilenameÚbytecoderrrÚ_compile_and_eval*s rIc    Csti}d}|}t|ƒd| d¡|f}tj ||¡}||kr<q^q |dd…›d|›d}|d7}q t||||ƒ||S)zO
    Create the method with the script given and return the method object.
    rNTéÿÿÿÿú-ú>)ÚlenÚ
splitlinesÚ    linecacheÚcacheÚ
setdefaultrI)    ÚnamerDrGrErFÚcountÚ base_filenameZlinecache_tupleZold_valrrrÚ _make_method2sü
rUcCsv|›d}d|›ddg}|rJt|ƒD] \}}| d|›d|›d¡q&n
| d¡ttd    œ}td
 |¡|ƒ||S) zé
    Create a tuple subclass to hold `Attribute`s for an `attrs` class.
 
    The subclass is a bare tuple with properties for names.
 
    class MyClassAttributes(tuple):
        __slots__ = ()
        x = property(itemgetter(0))
    Z
Attributeszclass z(tuple):z    __slots__ = ()ú    z% = _attrs_property(_attrs_itemgetter(ú))z    pass)Z_attrs_itemgetterZ_attrs_propertyÚ
)Ú    enumerateÚappendrÚpropertyrIÚjoin)Zcls_nameÚ
attr_namesZattr_class_nameZattr_class_templateÚiÚ    attr_namerErrrÚ_make_attr_tuple_classOs
 
 
þÿ
 
r`Ú _AttributesÚattrsÚ
base_attrsZbase_attrs_mapcCs2t|ƒ}| d¡r(| d¡r(|dd…}| t¡S)zñ
    Check whether *annot* is a typing.ClassVar.
 
    The string comparison hack is used to avoid evaluating all string
    annotations which would put attrs-based classes at a performance
    disadvantage compared to plain old classes.
    )ú'ú"rrJ)ÚstrÚ
startswithÚendswithÚ_classvar_prefixes)ZannotrrrÚ _is_class_varys rjcCsJt||tƒ}|tkrdS|jdd…D]}t||dƒ}||kr&dSq&dS)zR
    Check whether *cls* defines *attrib_name* (and doesn't just inherit it).
    FrNT)ÚgetattrÚ    _sentinelÚ__mro__)ÚclsZ attrib_nameÚattrÚbase_clsÚarrrÚ_has_own_attributeŠs  rrcCst|dƒr|jSiS)z$
    Get annotations for *cls*.
    Ú__annotations__)rrrs©rnrrrÚ_get_annotationsšs
rucCs¨g}i}t|jdd…ƒD]H}t|dgƒD]6}|js*|j|kr@q*|jdd}| |¡|||j<q*qg}tƒ}t|ƒD](}|j|kr†qv| d|¡|     |j¡qv||fS)zQ
    Collect attr.ibs from base classes of *cls*, except *taken_attr_names*.
    rrJÚ__attrs_attrs__T©Ú    inheritedr)
ÚreversedrmrkrxrRÚevolverZÚsetÚinsertÚadd)rnÚtaken_attr_namesrcÚ base_attr_maprprqÚfilteredÚseenrrrÚ_collect_base_attrs¤s" 
 
 r‚cCsng}i}|jdd…D]N}t|dgƒD]<}|j|kr6q&|jdd}| |j¡| |¡|||j<q&q||fS)a-
    Collect attr.ibs from base classes of *cls*, except *taken_attr_names*.
 
    N.B. *taken_attr_names* will be mutated.
 
    Adhere to the old incorrect behavior.
 
    Notably it collects from the front and considers inherited attributes which
    leads to the buggy behavior reported in #428.
    rrJrvTrw)rmrkrRrzr}rZ)rnr~rcrrprqrrrÚ_collect_base_attrs_brokenÃs 
 
rƒc    s&|j‰t|ƒ‰|dk    r*dd„| ¡Dƒ}nâ|dkrîdd„ˆ ¡Dƒ}g}tƒ}ˆ ¡D]Z\}    }
t|
ƒrhqV| |    ¡ˆ |    t¡} t| t    ƒs¢| tkr˜t
ƒ} n
t
| d} |  |    | f¡qV||} t | ƒdkrìt d    d
 t| ‡fd d „d ¡dƒ‚ntdd„ˆ ¡Dƒdd „d }‡fdd„|Dƒ} |r>t|dd„| Dƒƒ\}}nt|dd„| Dƒƒ\}}|rxdd„| Dƒ} dd„|Dƒ}|| }d}dd„|DƒD]D} |dkrº| jtkrºtd| ›ƒ‚|dkr’| jtk    r’d}q’|dk    rì|||ƒ}dd„|Dƒ}dd„|Dƒ}t|j|ƒ}t||ƒ||fƒS)a0
    Transform all `_CountingAttr`s on a class into `Attribute`s.
 
    If *these* is passed, use that and don't look for them on the class.
 
    *collect_by_mro* is True, collect them in the correct MRO order, otherwise
    use the old -- incorrect -- order.  See #428.
 
    Return an `_Attributes`.
    NcSsg|]\}}||f‘qSrr)Ú.0rRÚcarrrÚ
<listcomp>ðsz$_transform_attrs.<locals>.<listcomp>TcSsh|]\}}t|tƒr|’qSr©r8r=©r„rRrorrrÚ    <setcomp>òs
þz#_transform_attrs.<locals>.<setcomp>©r$rz1The following `attr.ib`s lack a type annotation: ú, cs ˆ |¡jSr)ÚgetÚcounter)Ún)ÚcdrrÚ<lambda> óz"_transform_attrs.<locals>.<lambda>)ÚkeyÚ.css$|]\}}t|tƒr||fVqdSrr‡rˆrrrÚ    <genexpr>s
þz#_transform_attrs.<locals>.<genexpr>cSs
|djS©Nr)r)Úerrrrr‘cs&g|]\}}tj||ˆ |¡d‘qS))rRr…r")Ú    AttributeÚfrom_counting_attrrŒ)r„r_r…)Úannsrrr†s ýÿcSsh|]
}|j’qSr©rR©r„rqrrrr‰"scSsh|]
}|j’qSrršr›rrrr‰&scSsg|]}|jdd‘qS©T)r,©rzr›rrrr†*scSsg|]}|jdd‘qSrœrr›rrrr†+sFcss&|]}|jdk    r|jdkr|VqdS)FN)r)r,r›rrrr”4s
 
zlNo mandatory attributes allowed after an attribute with a default value or factory.  Attribute in question: cSs(g|] }|js |jt|jƒdn|‘qS))r2)r2rzÚ_default_init_alias_forrRr›rrrr†DsÿcSsg|]
}|j‘qSrršr›rrrr†Ks)Ú__dict__ruÚitemsr{rjr}rŒrr8r=r?rZrMrr\Úsortedr‚rƒr$r5r`rra)rnÚtheseÚ auto_attribsr,Úcollect_by_mroÚfield_transformerZca_listZca_namesZ annot_namesr_r"rqZ unannotatedZ    own_attrsrcrrbZ had_defaultr]Z
AttrsClassr)r™rrÚ_transform_attrsßsŠ þ
 
 
 ÿÿüÿþú    
ü ÿ
 ÿÿ
 
þ r¦cCs.t|tƒr$|dkr$t |||¡dStƒ‚dS)z4
    Attached to frozen classes as __setattr__.
    )Ú    __cause__Ú __context__Ú __traceback__N)r8Ú BaseExceptionÚ __setattr__r ©rrRÚvaluerrrÚ_frozen_setattrsQsr®cCs
tƒ‚dS)z4
    Attached to frozen classes as __delattr__.
    N©r )rrRrrrÚ_frozen_delattrs`sr°c@s²eZdZdZdZdd„Zdd„Zer6ddlZd    d
„Z    nd d
„Z    d d „Z
dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„ZdS)(Ú _ClassBuilderz(
    Iteratively build *one* class.
    )Ú _attr_namesÚ_attrsÚ_base_attr_mapÚ _base_namesÚ _cache_hashÚ_clsÚ    _cls_dictÚ_delete_attribsÚ_frozenÚ _has_pre_initÚ_has_post_initÚ_is_excÚ _on_setattrÚ_slotsÚ _weakref_slotÚ_wrote_own_setattrÚ_has_custom_setattrcCsªt||||| |ƒ\}}}||_|r,t|jƒni|_||_dd„|Dƒ|_||_tdd„|Dƒƒ|_    ||_
||_ ||_ |    |_ tt|ddƒƒ|_tt|ddƒƒ|_t|ƒ |_|
|_| |_| |_d|_|j|jd<|rît|jd    <t|jd
<d |_nš| ttjtjfkrˆd}}|D]8}|jdk    r"d }|jdk    r2d }|r|rqHq| tkr^|s^|r‚| tjkrp|r‚| tjkrˆ|sˆd|_|r¦| ¡\|jd <|jd <dS)NcSsh|]
}|j’qSrršr›rrrr‰sz)_ClassBuilder.__init__.<locals>.<setcomp>css|] }|jVqdSrršr›rrrr”Ÿsz)_ClassBuilder.__init__.<locals>.<genexpr>Ú__attrs_pre_init__FÚ__attrs_post_init__rvr«Ú __delattr__TÚ __getstate__Ú __setstate__) r¦r·ÚdictrŸr¸r³rµr´r:r²r¿rºrÀr¶Úboolrkr»r¼r¹r½r¾rÂrÁr®r°Ú_ng_default_on_setattrrÚvalidateÚconvertr%r*Ú_make_getstate_setstate)rrnr¢ÚslotsÚfrozenÚ weakref_slotÚgetstate_setstater£r,Ú
cache_hashÚis_excr¤r1Zhas_custom_setattrr¥rbrcZbase_mapZ has_validatorZ has_converterrqrrrÚ__init__€s€ú
      
 
ý   
þýýûûúú ýþz_ClassBuilder.__init__cCsd|jj›dS)Nz<_ClassBuilder(cls=z)>)r·rrrrrrÕsz_ClassBuilder.__repr__rNcCs"|jdkr| ¡S|j | ¡¡S©z
            Finalize class based on the accumulated configuration.
 
            Builder cannot be used after calling this method.
            T)r¿Ú_create_slots_classÚabcZupdate_abstractmethodsÚ_patch_original_classrrrrÚ build_classÛs
 
ÿz_ClassBuilder.build_classcCs|jdkr| ¡S| ¡SrÕ)r¿rÖrØrrrrrÙês
c    Cs¢|j}|j}|jrZ|jD]@}||krt||tƒtk    rzt||ƒWqtk
rVYqXq|j     ¡D]\}}t
|||ƒqd|j sžt|ddƒržd|_ |j sžt|_|S)zA
        Apply accumulated methods and return the class.
        Ú__attrs_own_setattr__F)r·rµr¹r²rkrlÚdelattrÚAttributeErrorr¸r ÚsetattrrÁrÚrÂÚ _obj_setattrr«)rrnÚ
base_namesrRr­rrrrØõs.
ÿþÿz#_ClassBuilder._patch_original_classc
 
s‡fdd„ˆj ¡Dƒ}ˆjsTd|d<ˆjsTˆjjD]‰ˆj dd¡r4t|d<qTq4t    ƒ}d}ˆjj
dd…D]:‰ˆj dd    ¡d    k    rˆd
}|  ‡fd d„t ˆd gƒDƒ¡qnt ˆjƒ‰ˆj}ˆjrædt ˆjd d ƒkræd|kræ|sæ|d7}‡fdd„|Dƒ‰‡fdd„| ¡Dƒ‰‡fdd„ˆDƒ‰|  ˆ¡ˆjr<ˆ t¡tˆƒ|d <ˆjj|d<tˆjƒˆjjˆjj|ƒ}|j ¡D]œ}t|ttfƒrœt |jdd    ƒ}n(t|tƒr¸t |jdd    ƒ}n t |dd    ƒ}|sΐqx|D]>}z|jˆjk}    Wnt k
rüYnX|    rÒt!||ƒqҐqx|S)zL
        Build and return a new class with a `__slots__` attribute.
        cs(i|] \}}|tˆjƒdkr||“qS))rŸÚ __weakref__)r:r²)r„ÚkÚvrrrÚ
<dictcomp>sþz5_ClassBuilder._create_slots_class.<locals>.<dictcomp>FrÚr«rrJràNTcsi|]}|tˆ|ƒ“qSr©rk©r„rR)rprrrã>sÿÚ    __slots__r)ràcsg|]}|ˆkr|‘qSrrrå)rßrrr†Qsz5_ClassBuilder._create_slots_class.<locals>.<listcomp>csi|]\}}|ˆkr||“qSrr)r„ZslotZslot_descriptor)Ú
slot_namesrrrãVsþcsg|]}|ˆkr|‘qSrrrå)Ú reused_slotsrrr†[srÚ __closure__)"r¸r rÁrÂr·Ú    __bases__rŸrŒrÞrÈrmÚupdaterkr{rµr²rÀr¶rZÚ_hash_cache_fieldr:rr"rÚvaluesr8Ú classmethodÚ staticmethodÚ__func__r[ÚfgetÚ cell_contentsr5r
)
rrZexisting_slotsZweakref_inheritedÚnamesrnÚitemZ closure_cellsÚcellÚmatchr)rprßrèrrçrrÖst
þ 
 
þÿ
ÿþýü
þ
 
    z!_ClassBuilder._create_slots_classcCs | t|j||jƒ¡|jd<|S)Nr)Ú_add_method_dundersÚ
_make_reprr³r·r¸)rÚnsrrrÚadd_repr…sÿ
z_ClassBuilder.add_reprcCs8|j d¡}|dkrtdƒ‚dd„}| |¡|jd<|S)Nrz3__str__ can only be generated if a __repr__ exists.cSs| ¡Sr©rrrrrÚ__str__’sz&_ClassBuilder.add_str.<locals>.__str__rü)r¸rŒr5r÷)rr&rürrrÚadd_str‹s ÿz_ClassBuilder.add_strcs<tdd„|jDƒƒ‰‡fdd„}|j‰‡‡fdd„}||fS)zF
        Create custom __setstate__ and __getstate__ methods.
        css|]}|dkr|VqdS)ràNr)r„Zanrrrr”sz8_ClassBuilder._make_getstate_setstate.<locals>.<genexpr>cs‡fdd„ˆDƒS)ú9
            Automatically created by attrs.
            csi|]}|tˆ|ƒ“qSrrärårrrrã¥szQ_ClassBuilder._make_getstate_setstate.<locals>.slots_getstate.<locals>.<dictcomp>rr)Ústate_attr_namesrrÚslots_getstate¡sz=_ClassBuilder._make_getstate_setstate.<locals>.slots_getstatecsft |¡}t|tƒr4tˆ|ƒD]\}}|||ƒqn ˆD]}||kr8||||ƒq8ˆrb|tdƒdS)rþN)rÞÚ__get__r8r:Úziprì)rÚstateZ_ClassBuilder__bound_setattrrRr­©Zhash_caching_enabledrÿrrÚslots_setstate©s
 
z=_ClassBuilder._make_getstate_setstate.<locals>.slots_setstate)r:r²r¶)rrrrrrr͘sÿ z%_ClassBuilder._make_getstate_setstatecCsd|jd<|S)NÚ__hash__)r¸rrrrÚmake_unhashableÁs
z_ClassBuilder.make_unhashablecCs(| t|j|j|j|jd¡|jd<|S)N©rÏrÒr)r÷Ú
_make_hashr·r³rºr¶r¸rrrrÚadd_hashÅsüÿ
    z_ClassBuilder.add_hashcCsB| t|j|j|j|j|j|j|j|j    |j
|j dd ¡|j d<|S)NF©Ú
attrs_initrÔ© r÷Ú
_make_initr·r³r»r¼rºr¿r¶r´r½r¾r¸rrrrÚadd_initÑs õÿ
z_ClassBuilder.add_initcCstdd„|jDƒƒ|jd<dS)Ncss |]}|jr|js|jVqdSr)r)r,rR)r„Úfieldrrrr”åsþz/_ClassBuilder.add_match_args.<locals>.<genexpr>Ú__match_args__)r:r³r¸rrrrÚadd_match_argsäsþz_ClassBuilder.add_match_argscCsB| t|j|j|j|j|j|j|j|j    |j
|j dd ¡|j d<|S)NTr Ú__attrs_init__r rrrrÚadd_attrs_initës õÿ
z_ClassBuilder.add_attrs_initcCs2|j}| t|j|jƒ¡|d<| tƒ¡|d<|S)NÚ__eq__Ú__ne__)r¸r÷Ú_make_eqr·r³Ú_make_ne©rrrrrÚadd_eqþs  ÿz_ClassBuilder.add_eqcs>ˆj}‡fdd„tˆjˆjƒDƒ\|d<|d<|d<|d<ˆS)Nc3s|]}ˆ |¡VqdSr)r÷)r„Úmethrrrr” sÿz*_ClassBuilder.add_order.<locals>.<genexpr>Ú__lt__Ú__le__Ú__gt__Ú__ge__)r¸Ú _make_orderr·r³rrrrÚ    add_orders
 
 þz_ClassBuilder.add_ordercsˆ|jr
|Si‰|jD],}|jp"|j}|r|tjk    r||fˆ|j<qˆsJ|S|jrXtdƒ‚‡fdd„}d|j    d<| 
|¡|j    d<d|_ |S)Nz7Can't combine custom __setattr__ with on_setattr hooks.csFzˆ|\}}Wntk
r(|}YnX||||ƒ}t|||ƒdSr)ÚKeyErrorrÞ)rrRÚvalrqÚhookÚnval©Zsa_attrsrrr«&s 
 z._ClassBuilder.add_setattr.<locals>.__setattr__TrÚr«) rºr³r1r¾rÚNO_OPrRrÂr5r¸r÷rÁ)rrqr1r«rr&rÚ add_setattrs$
 ÿ
 
z_ClassBuilder.add_setattrcCs„z|jj|_Wntk
r"YnXzd |jj|jf¡|_Wntk
rRYnXzd|jj›d|_Wntk
r~YnX|S)zL
        Add __module__ and __qualname__ to a *method* if possible.
        r“z$Method generated by attrs for class )r·rrÜr\rrr)rÚmethodrrrr÷6s  ÿ
ÿz!_ClassBuilder._add_method_dunders)rrrrrærÔrrr×rÙrØrÖrúrýrÍrr
rrrrr!r(r÷rrrrr±gs,U
 &j ) 
 
$r±cCsl|dk    r$t|dk    |dk    fƒr$tdƒ‚|dk    r4||fS|dkr@|}|dkrL|}|dkrd|dkrdtdƒ‚||fS)úš
    Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
    values of eq and order.  If *eq* is None, set it to *default_eq*.
    Nú&Don't mix `cmp` with `eq' and `order`.FTú-`order` can only be True if `eq` is True too.©Úanyr5)r'r-r/Ú
default_eqrrrÚ_determine_attrs_eq_orderQsr0cCs°|dk    r$t|dk    |dk    fƒr$tdƒ‚dd„}|dk    rL||ƒ\}}||||fS|dkr`|d}}n ||ƒ\}}|dkr€||}}n ||ƒ\}}|dkr¤|dkr¤tdƒ‚||||fS)r*Nr+cSs t|ƒrd|}}nd}||fS)z8
        Decide whether a key function is used.
        TN)r6)r­r’rrrÚdecide_callable_or_booleanss z>_determine_attrib_eq_order.<locals>.decide_callable_or_booleanFTr,r-)r'r-r/r/r1Zcmp_keyr.r0rrrr3ks       r3cCsF|dks|dkr|S|dkr(|dkr(|S|D]}t||ƒr,dSq,|S)ap
    Check whether we should implement a set of methods for *cls*.
 
    *flag* is the argument passed into @attr.s like 'init', *auto_detect* the
    same as passed into @attr.s and *dunders* is a tuple of attribute names
    whose presence signal that the user has implemented it themselves.
 
    Return *default* if no reason for either for or against is found.
    TFN)rr)rnÚflagÚ auto_detectZdundersr$ZdunderrrrÚ_determine_whether_to_implement”s 
r4cs‚t|||dƒ\‰‰|dk    r|‰    tˆ ttfƒr6tjˆ މ ‡‡‡‡‡‡‡‡‡‡    ‡
‡ ‡ ‡ ‡‡‡‡‡‡‡fdd„}|dkrv|S||ƒSdS)a4
    A class decorator that adds :term:`dunder methods` according to the
    specified attributes using `attr.ib` or the *these* argument.
 
    Please consider using `attrs.define` / `attrs.frozen` in new code
    (``attr.s`` will *never* go away, though).
 
    :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.
 
        The order is deduced from the order of the attributes inside *these*.
 
    :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 auto_detect: Instead of setting the *init*, *repr*, *eq*,
        *order*, and *hash* arguments explicitly, assume they are set to
        ``True`` **unless any** of the involved methods for one of the
        arguments is implemented in the *current* class (i.e. it is *not*
        inherited from some base class).
 
        So for example by implementing ``__eq__`` on a class yourself,
        *attrs* will deduce ``eq=False`` and will create *neither*
        ``__eq__`` *nor* ``__ne__`` (but Python classes come with a sensible
        ``__ne__`` by default, so it *should* be enough to only implement
        ``__eq__`` in most cases).
 
        .. warning::
 
           If you prevent *attrs* from creating the ordering methods for you
           (``order=False``, e.g. by implementing ``__le__``), it becomes
           *your* responsibility to make sure its ordering is sound. The best
           way is to use the `functools.total_ordering` decorator.
 
 
        Passing ``True`` or ``False`` to *init*, *repr*, *eq*, *order*,
        *cmp*, or *hash* overrides whatever *auto_detect* would determine.
 
    :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 Optional[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 if and only if the types of both classes are *identical*!
    :param Optional[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*.
    :param Optional[bool] cmp: Setting *cmp* is equivalent to setting *eq*
        and *order* to the same value. Must not be mixed with *eq* or *order*.
    :param Optional[bool] unsafe_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.
    :param Optional[bool] hash: Alias for *unsafe_hash*. *unsafe_hash* takes
        precedence.
    :param bool init: Create a ``__init__`` method that initializes the
        *attrs* attributes. Leading underscores are stripped for the argument
        name. If a ``__attrs_pre_init__`` method exists on the class, it will
        be called before the class is initialized. If a ``__attrs_post_init__``
        method exists on the class, it will be called after the class is fully
        initialized.
 
        If ``init`` is ``False``, an ``__attrs_init__`` method will be
        injected instead. This allows you to define a custom ``__init__``
        method that can do pre-init work such as ``super().__init__()``,
        and then call ``__attrs_init__()`` and ``__attrs_post_init__()``.
    :param bool slots: Create a :term:`slotted class <slotted classes>` that's
        more memory-efficient. Slotted classes are generally superior to the
        default dict classes, but have some gotchas you should know about, so
        we encourage you to read the :term:`glossary entry <slotted classes>`.
    :param bool frozen: Make instances immutable after initialization.  If
        someone attempts to modify a frozen instance,
        `attrs.exceptions.FrozenInstanceError` is raised.
 
        .. 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)``.
 
            5. Subclasses of a frozen class are frozen too.
 
    :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 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 `attrs.Factory` also
        works as expected in most cases (see warning below).
 
        Attributes annotated as `typing.ClassVar`, and attributes that are
        neither annotated nor set to an `attr.ib` are **ignored**.
 
        .. warning::
           For features that use the attribute name to create decorators (e.g.
           :ref:`validators <validators>`), you still *must* assign `attr.ib`
           to them. Otherwise Python will either not find the name or try to
           use the default value to call e.g. ``validator`` on it.
 
           These errors can be quite confusing and probably the most common bug
           report on our bug tracker.
 
    :param bool kw_only: Make all attributes keyword-only
        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.
    :param bool collect_by_mro: Setting this to `True` fixes the way *attrs*
       collects attributes from base classes.  The default behavior is
       incorrect in certain cases of multiple inheritance.  It should be on by
       default but is kept off for backward-compatibility.
 
       See issue `#428 <https://github.com/python-attrs/attrs/issues/428>`_ for
       more details.
 
    :param Optional[bool] getstate_setstate:
       .. note::
          This is usually only interesting for slotted classes and you should
          probably just set *auto_detect* to `True`.
 
       If `True`, ``__getstate__`` and
       ``__setstate__`` are generated and attached to the class. This is
       necessary for slotted classes to be pickleable. If left `None`, it's
       `True` by default for slotted classes and ``False`` for dict classes.
 
       If *auto_detect* is `True`, and *getstate_setstate* is left `None`,
       and **either** ``__getstate__`` or ``__setstate__`` is detected directly
       on the class (i.e. not inherited), it is set to `False` (this is usually
       what you want).
 
    :param on_setattr: A callable that is run whenever the user attempts to set
        an attribute (either by assignment like ``i.x = 42`` or by using
        `setattr` like ``setattr(i, "x", 42)``). It receives the same arguments
        as validators: the instance, the attribute that is being modified, and
        the new value.
 
        If no exception is raised, the attribute is set to the return value of
        the callable.
 
        If a list of callables is passed, they're automatically wrapped in an
        `attrs.setters.pipe`.
    :type on_setattr: `callable`, or a list of callables, or `None`, or
        `attrs.setters.NO_OP`
 
    :param Optional[callable] field_transformer:
        A function that is called with the original class object and all
        fields right before *attrs* finalizes the class.  You can use
        this, e.g., to automatically add converters or validators to
        fields based on their types.  See `transform-fields` for more details.
 
    :param bool match_args:
        If `True` (default), set ``__match_args__`` on the class to support
        :pep:`634` (Structural Pattern Matching). It is a tuple of all
        non-keyword-only ``__init__`` parameter names on Python 3.10 and later.
        Ignored on older Python versions.
 
    .. 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*
    .. versionadded:: 20.1.0 *auto_detect*
    .. versionadded:: 20.1.0 *collect_by_mro*
    .. versionadded:: 20.1.0 *getstate_setstate*
    .. versionadded:: 20.1.0 *on_setattr*
    .. versionadded:: 20.3.0 *field_transformer*
    .. versionchanged:: 21.1.0
       ``init=False`` injects ``__attrs_init__``
    .. versionchanged:: 21.1.0 Support for ``__attrs_pre_init__``
    .. versionchanged:: 21.1.0 *cmp* undeprecated
    .. versionadded:: 21.3.0 *match_args*
    .. versionadded:: 22.2.0
       *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance).
    Ncsòˆp
t|ƒ}ˆdkot|tƒ}ˆo*t|dƒ}|r<|r<tdƒ‚t|ˆˆ|ˆt|ˆˆdˆdˆˆ ˆ|ˆˆ |ˆƒ}t|ˆˆdƒr„| ˆ¡ˆdkr”| ¡t|ˆˆdƒ}|s¶|dkr¶|     ¡|sÐt|ˆˆdƒrÐ| 
¡|  ¡ˆ    dkröˆdkröt|d    ƒröd
‰    ˆ    dk    rˆ    d
k    rˆ    dk    rt d ƒ‚n|ˆ    d
ksBˆ    dkr<|d
ksB|rRˆršt d ƒ‚nHˆ    dkszˆ    dkr„|dkr„|dkr„|  ¡nˆr’t d ƒ‚| ¡t|ˆ
ˆd ƒr´| ¡n| ¡ˆrÊt dƒ‚trêˆ rêt|dƒsê| ¡| ¡S)NTr«z/Can't freeze a class with a custom __setattr__.)rÆrÇrŠrû)rr)rrrrrFr#zlInvalid value for cache_hash.  To use hash caching, hashing must be either explicitly or implicitly enabled.)rÔzFInvalid value for cache_hash.  To use hash caching, init must be True.r)Ú_has_frozen_base_classÚ
issubclassrªrrr5r±r4rúrýrr!r(r4r
rrrrrrÙ)rnÚ    is_frozenrÓZhas_own_setattrZbuilderr-©r£r3Úauto_excrÒr¤Zeq_r¥rÏrÑr(r)r,Ú
match_argsr1Zorder_r&Úrepr_nsrÎrfr¢rÐrrÚwrapÑsÐ ÿûìÿ
ÿ ÿÿþýÿ$ÿ
ÿÿÿ
ÿÿ
ÿÿþýzattrs.<locals>.wrap)r0r8r9r:rr;)Z    maybe_clsr¢r;r&r'r(r)rÎrÏrÐrfr£r,rÒr9r-r/r3r¤rÑr1r¥r:Z unsafe_hashr<rr8rrb®s
4ocCs
|jtkS)zV
    Check whether *cls* has a frozen ancestor by looking at its
    __setattr__.
    )r«r®rtrrrr5Msr5c    Cs$d|›d|j›dt|d|jƒ›dS)zF
    Create a "filename" suitable for a function being generated.
    z<attrs generated ú r“rrL)rrkr)rnÚ    func_namerrrÚ_generate_unique_filenameUs"ÿr?c    stdd„ˆDƒƒ‰d}t|dƒ}t|ƒ‰i‰d}d‰d‰|sF|d7}n |d    7}|d
7}d ˆ‰ˆd 7‰|g‰‡‡‡‡‡‡fd d„}|röˆ |dt›d¡|rÊ|dt›d|dƒˆ |dd ¡n|dt›d|dƒˆ |dt›¡n
|d|ƒd ˆ¡}td||ˆƒS)Ncss0|](}|jdks$|jdkr|jdkr|VqdS)TN)r(r-r›rrrr”`s
 
 
 
z_make_hash.<locals>.<genexpr>ú        r(zdef __hash__(selfzhash((rWz):z, *zC, _cache_wrapper=__import__('attr._make')._make._CacheHashWrapper):z_cache_wrapper(ú)c    s˜ˆ ||ˆ|dˆ›dg¡ˆD]Z}|jrhd|j›d}|jˆ|<ˆ |d|›d|j›d¡q&ˆ |d|j›d¡q&ˆ |dˆ¡d    S)
        Generate the code for actually computing the hash code.
        Below this will either be returned directly or used to compute
        a value which is then cached, depending on the value of cache_hash
        r@ú,Ú_Ú_keyú(self.ú),ú         self.rVN)Úextendr.rRrZ)ÚprefixÚindentrqÚcmp_name©rbZclosing_bracesrEZ    hash_funcZ method_linesZ    type_hashrrÚappend_hash_computation_lines|s
þÿ
ÿz1_make_hash.<locals>.append_hash_computation_lineszif self.z     is None:zobject.__setattr__(self, 'ú', éúself.ú = z return self.zreturn rXr)r:r?r(rZrìr\rU)    rnrbrÏrÒÚtabÚunique_filenameZhash_defrMrDrrLrr    _sHÿ
 
ÿ
ÿ
ÿ
 
r    cCst||ddd|_|S)z%
    Add a hash method to *cls*.
    Fr)r    r©rnrbrrrÚ    _add_hash©srUcCs dd„}|S)z
    Create __ne__ method.
    cSs| |¡}|tkrtS| S)zj
        Check equality and either forward a NotImplemented or
        return the result negated.
        )rÚNotImplemented)rÚotherÚresultrrrr¶s
z_make_ne.<locals>.__ne__r)rrrrr±s rc    Csòdd„|Dƒ}t|dƒ}dddg}i}|rÐ| d¡dg}|D]€}|jr–d    |j›d
}|j||<| d |›d |j›d ¡| d |›d|j›d ¡q>| d|j›d¡| d|j›d¡q>||dg7}n
| d¡d |¡}td|||ƒS)z6
    Create __eq__ method for *cls* with *attrs*.
    cSsg|]}|jr|‘qSr)r-r›rrrr†Èsz_make_eq.<locals>.<listcomp>r-zdef __eq__(self, other):z-    if other.__class__ is not self.__class__:z        return NotImplementedz     return  (z
    ) == (rCrDr@rErFz(other.rGrBz        other.z    )z    return TruerXr)r?rZr.rRr\rU)    rnrbrSÚlinesrEZothersrqrKrDrrrrÄs,
ý
 
 
 
rcsVdd„ˆDƒ‰‡fdd„‰‡fdd„}‡fdd„}‡fd    d
„}‡fd d „}||||fS) z9
    Create ordering methods for *cls* with *attrs*.
    cSsg|]}|jr|‘qSr)r/r›rrrr†ðsz_make_order.<locals>.<listcomp>cs tdd„‡fdd„ˆDƒDƒƒS)z&
        Save us some typing.
        css"|]\}}|r||ƒn|VqdSrr)r„r­r’rrrr”ösÿz6_make_order.<locals>.attrs_to_tuple.<locals>.<genexpr>c3s |]}tˆ|jƒ|jfVqdSr)rkrRr0r›©Úobjrrr”øs)r:rZ©rbrZrÚattrs_to_tupleòs
 
ÿþz#_make_order.<locals>.attrs_to_tuplecs |j|jkrˆ|ƒˆ|ƒkStS©z1
        Automatically created by attrs.
        ©Ú    __class__rV©rrW©r]rrrýs z_make_order.<locals>.__lt__cs |j|jkrˆ|ƒˆ|ƒkStSr^r_rarbrrrs z_make_order.<locals>.__le__cs |j|jkrˆ|ƒˆ|ƒkStSr^r_rarbrrrs z_make_order.<locals>.__gt__cs |j|jkrˆ|ƒˆ|ƒkStSr^r_rarbrrrs z_make_order.<locals>.__ge__r)rnrbrrrrr)rbr]rr ìs                    r cCs&|dkr|j}t||ƒ|_tƒ|_|S)z5
    Add equality methods to *cls* with *attrs*.
    N)rvrrrrrTrrrÚ_add_eq$s
 rccCst|dƒ}tdd„|Dƒƒ}dd„|Dƒ}t|d<t|d<t|d<g}|D]N\}}}    |    r`d    |n
d
|d }
|tkr€d ||
fn d |||
f} | | ¡qJd |¡} |dkr²d} n|d} ddddddddddddd| ›d| ›ddd g}td!d" |¡||d#S)$Nr&css6|].}|jdk    r|j|jdkr"tn|j|jfVqdS)FTN)r&rRr)r›rrrr”6s
þz_make_repr.<locals>.<genexpr>cSs$i|]\}}}|tkr|d|“qS)Ú_repr)r&)r„rRÚrrCrrrrã;sz_make_repr.<locals>.<dictcomp>rrÜrrPzgetattr(self, "z ", NOTHING)z    %s={%s!r}z%s={%s_repr(%s)}r‹z1{self.__class__.__qualname__.rsplit(">.", 1)[-1]}z.{self.__class__.__name__}zdef __repr__(self):z  try:z:    already_repring = _compat.repr_context.already_repringz  except AttributeError:z!    already_repring = {id(self),}z:    _compat.repr_context.already_repring = already_repringz  else:z#    if id(self) in already_repring:z      return '...'z        else:z#      already_repring.add(id(self))z     return f'ú(z)'z
  finally:z$    already_repring.remove(id(self))rrX)rE)    r?r:rrÜrr&rZr\rU)rbrùrnrSZattr_names_with_reprsrEZattribute_fragmentsrRrer^ÚaccessorÚfragmentZ repr_fragmentZcls_name_fragmentrYrrrrø1sZ
þÿÿÿ ý 
ñÿrøcCs |dkr|j}t|||ƒ|_|S)z%
    Add a repr method to *cls*.
    N)rvrør)rnrùrbrrrÚ    _add_reprjsricCsnt|ƒ}|dkr"t|tƒs"tdƒ‚t|ddƒ}|dkrj|dk    r\t|ddƒ}|dk    r\||_|St|›dƒ‚|S)a*
    Return the tuple of *attrs* attributes for a class.
 
    The tuple also allows accessing the fields by their names (see below for
    examples).
 
    :param type cls: Class to introspect.
 
    :raise TypeError: If *cls* is not a class.
    :raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*
        class.
 
    :rtype: tuple (with name accessors) of `attrs.Attribute`
 
    .. versionchanged:: 16.2.0 Returned tuple allows accessing the fields
       by name.
    .. versionchanged:: 23.1.0 Add support for generic classes.
    NúPassed object must be a class.rvú! is not an attrs-decorated class.)r    r8r"r4rkrvr )rnZ generic_baserbrrrÚfieldsus  rlcCsBt|tƒstdƒ‚t|ddƒ}|dkr4t|›dƒ‚dd„|DƒS)aX
    Return an ordered dictionary of *attrs* attributes for a class, whose
    keys are the attribute names.
 
    :param type cls: Class to introspect.
 
    :raise TypeError: If *cls* is not a class.
    :raise attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs*
        class.
 
    :rtype: dict
 
    .. versionadded:: 18.1.0
    rjrvNrkcSsi|] }|j|“qSrršr›rrrrã±szfields_dict.<locals>.<dictcomp>)r8r"r4rkr rTrrrÚ fields_dicts 
 rmcCsDtjdkrdSt|jƒD]&}|j}|dk    r|||t||jƒƒqdS)z¥
    Validate all attributes on *inst* that have a validator.
 
    Leaves all exceptions through.
 
    :param inst: Instance of a class with *attrs* attributes.
    FN)rZ_run_validatorsrlr`r%rkrR)ÚinstrqrârrrrË´s 
rËcCs
d|jkS)Nræ)rŸrtrrrÚ _is_slot_clsÅsrocCs||kot||ƒS)z>
    Check if the attribute name comes from a slot class.
    )ro)Za_namerrrrÚ _is_slot_attrÉsrpc  Cs$|    dk    o|    tjk    } |r"| r"tdƒ‚|p(|} g} i}|D]^}|jsL|jtkrLq6|  |¡|||j<|jdk    r€|dkrztdƒ‚d} q6| r6|jtjk    r6d} q6t    |dƒ}t
| |||||||| | |
ƒ \}}}|j t j krâ| t j |j j¡| t|dœ¡| rtj|d<t|
rdnd|||ƒ}||_|S)Nz$Frozen classes can't use on_setattr.Tr))rÚ    attr_dictZ_cached_setattr_getrrÔ)rr'r5r)r$rrZrRr1r?Ú_attrs_to_init_scriptrÚsysÚmodulesrërŸrÞrrUrs)rnrbÚpre_initÚ    post_initrÏrÎrÒrrÓZcls_on_setattrr Úhas_cls_on_setattrÚneeds_cached_setattrZfiltered_attrsrqrqrSrDrEÚ annotationsr)rrrrÐsZÿ
 
 
 
õ
 
 ürcCsd|›d|›dS)zJ
    Use the cached object.setattr to set *attr_name* to *value_var*.
    z
_setattr('rNrAr©r_Z    value_varÚhas_on_setattrrrrÚ_setattrsr|cCsd|t|f|fS)zk
    Use the cached object.setattr to set *attr_name* to *value_var*, but run
    its converter first.
    z_setattr('%s', %s(%s)))Ú_init_converter_patrzrrrÚ_setattr_with_converter"s
ýr~cCs |rt||dƒSd|›d|›S)zo
    Unless *attr_name* has an on_setattr hook, use normal assignment. Otherwise
    relegate to _setattr.
    TrPrQ)r|)r_r­r{rrrÚ_assign.s rcCs$|rt||dƒSd|t|f|fS)z
    Unless *attr_name* has an on_setattr hook, use normal assignment after
    conversion. Otherwise relegate to _setattr_with_converter.
    Tzself.%s = %s(%s))r~r}rzrrrÚ_assign_with_converter9s ýr€c  
s<g} |r|  d¡|r |  d¡|dkr^|dkr:t} t} qf|  d¡‡fdd„} ‡fdd„} nt} t} g}g}g}i}d    d
i}|D]~}|jr˜| |¡|j}|jd
k    p¶|jtj    k    o¶|    }|j
}t |j t ƒ}|rÜ|j jrÜd }nd }|jd krÈ|rlt|jf}|jd
k    r@|  | ||d|›d|ƒ¡t|jf}|j||<n|  | ||d|›d|ƒ¡|j j||<nX|jd
k    rª|  | |d|›d|ƒ¡t|jf}|j||<n|  | |d|›d|ƒ¡nè|j tk    rP|sP|›d|›d}|jrþ| |¡n
| |¡|jd
k    r:|  | |||ƒ¡|j|t|jf<n|  | |||ƒ¡n`|rN|›d}|jrt| |¡n
| |¡|  d|›d¡t|jf}|jd
k    rþ|  d| |||ƒ¡|  d¡|  d| ||d|d|ƒ¡|j|t|jf<nB|  d| |||ƒ¡|  d¡|  d| ||d|d|ƒ¡|j j||<nb|jrb| |¡n
| |¡|jd
k    rž|  | |||ƒ¡|j|t|jf<n|  | |||ƒ¡|jdkr‚|jd
k    rÞ|jd
krÞ|j||<q‚|jd
k    r‚t|jƒ ¡}|r‚|||<q‚|rnt|d<|  d¡|D]L}d|j}d|j}|  d|›d|›d|j›d¡|j||<|||<q |r~|  d¡|r²|rœ|r–d}nd }nd!}|  |td"f¡|rÞd# d$d%„|Dƒ¡}|  d&|›d¡d' |¡}|r|d(|rüd'nd d' |¡f7}d)|
rd*nd+|| r.d, | ¡nd-f||fS).zô
    Return a script of an initializer for *attrs* and a dict of globals.
 
    The globals are expected by the generated script.
 
    If *frozen* is True, we cannot set the attributes directly so we use
    a cached ``object.__setattr__``.
    zself.__attrs_pre_init__()z$_setattr = _cached_setattr_get(self)Tz_inst_dict = self.__dict__cs&t|ˆƒrt|||ƒSd|›d|›S)Nz _inst_dict['z'] = )rpr|rz©rrrÚ
fmt_setterts
 z)_attrs_to_init_script.<locals>.fmt_settercs.|st|ˆƒrt|||ƒSd|t|f|fS)Nz_inst_dict['%s'] = %s(%s))rpr~r}rzrrrÚfmt_setter_with_converterzsÿýz8_attrs_to_init_script.<locals>.fmt_setter_with_converterÚreturnNrr@FrfrAz attr_dict['z
'].defaultz =attr_dict['z=NOTHINGzif z is not NOTHING:rVzelse:rz#if _config._run_validators is True:Z__attr_validator_Z__attr_z(self, z, self.zself.__attrs_post_init__()z_setattr('%s', %s)z_inst_dict['%s'] = %sz self.%s = %sÚNonerBcss |]}|jrd|j›VqdS)rPN)r)rRr›rrrr”J    sz(_attrs_to_init_script.<locals>.<genexpr>zBaseException.__init__(self, r‹z%s*, %szdef %s(self, %s):
    %s
rrÔz
    Úpass)rZr|r~rr€r%rRr1rr'r2r8r$r7Ú
takes_selfr)Ú_init_factory_patr*r}r>rr,r"rÚget_first_param_typerrìr\) rbrÏrÎrurvrÒrrÓrxrwr rYr‚rƒÚargsZ kw_only_argsZattrs_to_validateZnames_for_globalsryrqr_r{Zarg_nameZ has_factoryZ
maybe_selfZinit_factory_nameZ    conv_nameÚargÚtZval_nameZinit_hash_cacheÚvalsrrrrrHs‚
ü
 
 
 
ÿ     ýÿ  ýÿ 
ýÿ  
ýÿ 
 ÿÿþ
ÿ
 
  ÿÿÿ
ýÿÿ
þ
ÿÿ
ýÿÿ 
 ÿÿþ
ÿ
 
 
 
 
 
 
 
 
 þ ýÿørr)rRr„cCs
| d¡S)zÅ
    The default __init__ parameter name for a field.
 
    This performs private-name adjustment via leading-unscore stripping,
    and is the default value of Attribute.alias if not provided.
    rC)Úlstripršrrrrža    sržc
@sTeZdZdZdZddd„Zdd„Zedd    d
„ƒZd d „Z    d d„Z
dd„Z dd„Z dS)r—a¶
    *Read-only* representation of an attribute.
 
    .. warning::
 
       You should never instantiate this class yourself.
 
    The class has *all* arguments of `attr.ib` (except for ``factory``
    which is only syntactic sugar for ``default=Factory(...)`` plus the
    following:
 
    - ``name`` (`str`): The name of the attribute.
    - ``alias`` (`str`): The __init__ parameter name of the attribute, after
      any explicit overrides and default private-attribute-name handling.
    - ``inherited`` (`bool`): Whether or not that attribute has been inherited
      from a base class.
    - ``eq_key`` and ``order_key`` (`typing.Callable` or `None`): The callables
      that are used for comparing and ordering objects by this attribute,
      respectively. These are set by passing a callable to `attr.ib`'s ``eq``,
      ``order``, or ``cmp`` arguments. See also :ref:`comparison customization
      <custom-comparison>`.
 
    Instances of this class are frequently used for introspection purposes
    like:
 
    - `fields` returns a tuple of them.
    - Validators get them passed as the first argument.
    - The :ref:`field transformer <transform-fields>` hook receives a list of
      them.
    - The ``alias`` property exposes the __init__ parameter name of the field,
      with any overrides and default private-attribute handling applied.
 
 
    .. versionadded:: 20.1.0 *inherited*
    .. versionadded:: 20.1.0 *on_setattr*
    .. versionchanged:: 20.2.0 *inherited* is not taken into account for
        equality checks and hashing anymore.
    .. versionadded:: 21.1.0 *eq_key* and *order_key*
    .. versionadded:: 22.2.0 *alias*
 
    For the full version history of the fields, see `attr.ib`.
    )rRr$r%r&r-r.r/r0r(r)r+r"r*r,rxr1r2NFcCsèt||p
| |p|dƒ\} }}}t |¡}|d|ƒ|d|ƒ|d|ƒ|d|ƒ|d| ƒ|d|ƒ|d|ƒ|d    |ƒ|d
|ƒ|d |ƒ|d | ƒ|d |    r¬t t|    ƒ¡ntƒ|d|
ƒ|d| ƒ|d|ƒ|d|ƒ|d|ƒdS)NTrRr$r%r&r-r.r/r0r(r)r*r+r"r,rxr1r2)r3rÞrÚtypesÚMappingProxyTyperÈÚ_empty_metadata_singleton)rrRr$r%r&r'r(r)rxr+r"r*r,r-r.r/r0r1r2Ú bound_setattrrrrrÔ¬    s:ÿ 
 
 
 
 
 
 
 
 
 
 
 
ÿû
 
 
 
zAttribute.__init__cCs
tƒ‚dSrr¯r¬rrrr«ã    szAttribute.__setattr__c    sV|dkrˆj}nˆjdk    r"tdƒ‚‡fdd„tjDƒ}|f|ˆjˆj|dddœ|—ŽS)Nz8Type annotation and type argument cannot both be presentcs i|]}|dkr|tˆ|ƒ“qS))rRr%r$r"rxrä)r„rá©r…rrrãï    s ÿþz0Attribute.from_counting_attr.<locals>.<dictcomp>F)rRr%r$r"r'rx)r"r5r—ræÚ
_validatorÚ_default)rnrRr…r"Ú    inst_dictrr“rr˜æ    s&
ÿ
þ úùzAttribute.from_counting_attrcKst |¡}| | ¡¡|S)zý
        Copy *self* and apply *changes*.
 
        This works similarly to `attrs.evolve` but that function does not work
        with `Attribute`.
 
        It is mainly meant to be used for `transform-fields`.
 
        .. versionadded:: 20.3.0
        )ÚcopyÚ    _setattrsr )rÚchangesÚnewrrrrz
s
zAttribute.evolvecst‡fdd„ˆjDƒƒS)ú(
        Play nice with pickle.
        c3s*|]"}|dkrtˆ|ƒntˆjƒVqdS)r+N)rkrÈr+rårrrr”
sÿz)Attribute.__getstate__.<locals>.<genexpr>©r:rærrrrrÆ
s þzAttribute.__getstate__cCs| t|j|ƒ¡dS©r›N)r˜rræ)rrrrrrÇ!
szAttribute.__setstate__cCsLt |¡}|D]8\}}|dkr*|||ƒq|||r@t t|ƒ¡ntƒqdS)Nr+)rÞrrrrÈr‘)rZname_values_pairsr’rRr­rrrr˜'
s
  ÿüzAttribute._setattrs)
NNNFNNNNNN)N) rrrrrærÔr«rîr˜rzrÆrÇr˜rrrrr—l    s(+í
7     r—cCs2g|]*}t|tddddd|dkddt|ƒd ‘qS)NTFr+) rRr$r%r&r'r-r/r(r)rxr2)r—rržrårrrr†5
sóõr†r\cCsg|]}|jdkr|‘qSrwršr›rrrr†I
s
cCs g|]}|jr|jdkr|‘qSrw)r(rRr›rrrr†K
s
c@sjeZdZdZdZedd„dDƒƒeddddddd    dd    ddd    dd    dd
fZd Zd d „Z    dd„Z
dd„Z dS)r=a
    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.
    )rr•r&r-r.r/r0r(r)r+r”r*r"r,r1r2ccs8|]0}t|t|ƒtdddddddddddddVqdS)NTF©rRr2r$r%r&r'r(r)r,r-r.r/r0rxr1)r—ržrrårrrr”j
s$ïñz_CountingAttr.<genexpr>)    rr•r&r-r/r(r)r1r2r+NTFržrcCsttjd7_tj|_||_||_||_||_| |_| |_| |_    ||_
||_ ||_ ||_ |    |_|
|_||_||_dSr•)r=Ú cls_counterrr•r”r*r&r-r.r/r0r(r)r+r"r,r1r2)rr$r%r&r'r(r)r*r+r"r,r-r.r/r0r1r2rrrrԜ
s"z_CountingAttr.__init__cCs$|jdkr||_nt|j|ƒ|_|S)zŒ
        Decorator that adds *meth* to the list of validators.
 
        Returns *meth* unchanged.
 
        .. versionadded:: 17.1.0
        N)r”r<©rrrrrr%Á
s
z_CountingAttr.validatorcCs"|jtk    rtƒ‚t|dd|_|S)zÚ
        Decorator that allows to set the default for an attribute.
 
        Returns *meth* unchanged.
 
        :raises DefaultAlreadySetError: If default has been set before.
 
        .. versionadded:: 17.1.0
        T)r‡)r•rr r7r rrrr$Ï
s
 
z_CountingAttr.default) rrrrrær:r—rvrŸrÔr%r$rrrrr=O
s8îñÿã0%r=c@s.eZdZdZdZd dd„Zdd„Zdd    „Zd
S) r7aÇ
    Stores a factory callable.
 
    If passed as the default value to `attrs.field`, the factory is used to
    generate a new value.
 
    :param callable factory: A callable that takes either none or exactly one
        mandatory positional argument depending on *takes_self*.
    :param bool takes_self: Pass the partially initialized instance that is
        being initialized as a positional argument.
 
    .. versionadded:: 17.1.0  *takes_self*
    ©r>r‡FcCs||_||_dSrr¡)rr>r‡rrrrÔõ
szFactory.__init__cst‡fdd„ˆjDƒƒS)r›c3s|]}tˆ|ƒVqdSrrärårrrr”ý
sz'Factory.__getstate__.<locals>.<genexpr>rœrrrrrÆù
szFactory.__getstate__cCs&t|j|ƒD]\}}t|||ƒq dSr)rrærÝ)rrrRr­rrrrÇÿ
szFactory.__setstate__N)F)rrrrrærÔrÆrÇrrrrr7ä
s
 
r7cCs(g|] }t|tddddddddd
‘qS)NTF)
rRr$r%r&r'r-r/r(r)rx)r—rrårrrr† s ôöc
     s"t|tƒr|}n&t|ttfƒr.dd„|Dƒ}ntdƒ‚| dd¡}| dd¡}| dd¡}i‰|dk    rn|ˆd<|dk    r~|ˆd<|dk    rŽ|ˆd<t ||i‡fdd    „¡}zt     d
¡j
  d d ¡|_ Wnt tfk
rØYnX| d d¡}    t|    |  d¡|  d¡dƒ\|d<|d<tfd|i|—Ž|ƒS)aé
    A quick way to create a new class called *name* with *attrs*.
 
    :param str name: The name for the new class.
 
    :param attrs: A list of names or a dictionary of mappings of names to
        `attr.ib`\ s / `attrs.field`\ s.
 
        The order is deduced from the order of the names or attributes inside
        *attrs*.  Otherwise the order of the definition of the attributes is
        used.
    :type attrs: `list` or `dict`
 
    :param tuple bases: Classes that the new class will subclass.
 
    :param attributes_arguments: Passed unmodified to `attr.s`.
 
    :return: A new class with *attrs*.
    :rtype: type
 
    .. versionadded:: 17.1.0 *bases*
    .. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.
    cSsi|] }|tƒ“qSr)r?r›rrrrã5 szmake_class.<locals>.<dictcomp>z(attrs argument must be a dict or a list.rÃNrÄrÔcs
| ˆ¡Sr)rë)rù©ÚbodyrrrE r‘zmake_class.<locals>.<lambda>rrÚ__main__r'r-r/Tr¢)r8rÈr9r:r4ÚpoprÚ    new_classrsÚ    _getframeÚ    f_globalsrŒrrÜr5r0r³)
rRrbÚbasesZattributes_argumentsZcls_dictrurvZ    user_initÚtype_r'rr¢rÚ
make_class sD
    ÿ
 üýr«)rÎr(c@seZdZdZeƒZdd„ZdS)Ú _AndValidatorz2
    Compose many validators to a single one.
    cCs|jD]}||||ƒqdSr)Ú _validators)rrnror­rârrrÚ__call__m s
z_AndValidator.__call__N)rrrrr?r­r®rrrrr¬e sr¬cGs6g}|D] }| t|tƒr |jn|g¡qtt|ƒƒS)zÞ
    A validator that composes multiple validators into one.
 
    When called on a value, it runs all wrapped validators.
 
    :param callables validators: Arbitrary number of validators.
 
    .. versionadded:: 17.1.0
    )rHr8r¬r­r:)Z
validatorsrr%rrrr<r s
ÿýr<csh‡fdd„}ˆs(t d¡}||dœ|_n<tˆdƒ ¡}|rF||jd<tˆdƒ ¡}|rd||jd<|S)    aY
    A converter that composes multiple converters into one.
 
    When called on a value, it runs all wrapped converters, returning the
    *last* value.
 
    Type annotations will be inferred from the wrapped converters', if
    they have any.
 
    :param callables converters: Arbitrary number of converters.
 
    .. versionadded:: 20.1.0
    csˆD] }||ƒ}q|Srr)r#r*©Ú
convertersrrÚpipe_converter– s
zpipe.<locals>.pipe_converterÚA)r#r„rr#rJr„)ÚtypingÚTypeVarrsrr‰Zget_return_type)r°r±r²rŒÚrtrr¯rr;‡ s 
 
 
r;)Nr@)T)NNNNNNNFFTFFFFFNNFFNNNTN)N)NN)Zr—rrOrsrr³Úoperatorrr@rrrrrr    r
Ú
exceptionsr r r rÚobjectr«rÞr}rˆrirìrr‘rlr;rÌrËrÊÚEnumrrÚintrr?rIrUr`rarjrrrur‚rƒr¦r®r°r±r0r3r4rbr³r5r?r    rUrrr rcrørirlrmrorprr|r~rr€rrrfržr—ræZ_ar=r7Z_fr«r¬r<rrrrÚ<module>s         
ñ
M
úþ 
rm*ÿ
è

J(8
9
(K   Jò
 þ û     # óK