U aðfã@s,dZddlmZdd„Zdd„Zdd„Zd S) zA Commonly useful filters for `attrs.asdict` and `attrs.astuple`. é)Ú AttributecCs4tdd„|Dƒƒtdd„|Dƒƒtdd„|DƒƒfS)zD Returns a tuple of `frozenset`s of classes and attributes. css|]}t|tƒr|VqdS©N)Ú isinstanceÚtype©Ú.0Úcls©r ú=/opt/nydus/tmp/pip-target-53d1vnqk/lib/python/attr/filters.pyÚ s z_split_what..css|]}t|tƒr|VqdSr)rÚstrrr r r r s css|]}t|tƒr|VqdSr)rrrr r r r s )Ú frozenset)Úwhatr r r Ú _split_what sýrcs"t|ƒ\‰‰‰‡‡‡fdd„}|S)a‡ Create a filter that only allows *what*. Args: what (list[type, str, attrs.Attribute]): What to include. Can be a type, a name, or an attribute. Returns: Callable: A callable that can be passed to `attrs.asdict`'s and `attrs.astuple`'s *filter* argument. .. versionchanged:: 23.1.0 Accept strings with field names. cs|jˆkp|jˆkp|ˆkSr©Ú __class__Úname©Ú attributeÚvalue©ÚattrsrÚnamesr r Úinclude_&s  ÿýzinclude..include_©r)rrr rr Úincludesrcs"t|ƒ\‰‰‰‡‡‡fdd„}|S)a˜ Create a filter that does **not** allow *what*. Args: what (list[type, str, attrs.Attribute]): What to exclude. Can be a type, a name, or an attribute. Returns: Callable: A callable that can be passed to `attrs.asdict`'s and `attrs.astuple`'s *filter* argument. .. versionchanged:: 23.3.0 Accept field name string as input argument cs|jˆkp|jˆkp|ˆk Srrrrr r Úexclude_As  ÿýzexclude..exclude_r)rrr rr Úexclude0srN)Ú__doc__Ú_makerrrrr r r r Ús