Commit Graph

7 Commits

Author SHA1 Message Date
Hynek Schlawack a5cbd51fd9
Tighten linting (#1175)
* Tighten linting

* Consistency

* Simplify config

* Simplify
2023-08-20 12:03:53 +02:00
Alex Ford ee3ecb112f
Add Attribute.alias (#950)
* Spike `alias` implementation.

* Move default alias init to after field_transformer.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixup docs.

* Update docs/extending.rst

* Pre-commit fixes

* Partially fix doctest

* Add test docstrings.

* Add typing_example tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Tidy typing_example

* Add note in init.rst on private aliases

* Add alias example to examples.rst

* Assert to comment

* Add changelog entry

* Fixup doc error

* Tidy dataclass_transform docs

* Lil' spice for the changelog.

* Fix doctest

* Update extending.rst

* Make alias introspection more explicit

* Update src/attr/_make.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hynek Schlawack <hs@ox.cx>
2022-11-30 14:39:57 +00:00
Hynek Schlawack 046beaaaaa Apply SPDX IDs 2021-12-27 09:29:09 +01:00
Stefan Scherfke f57b6a6759
Convert transformed attrs to AttrsClass (#824)
* Convert transformed attrs to AttrsClass

Fixes: #821

* Add cangelog entry

* Only call AttrsClass once

* Calm mypy by inline the AttrsClass call

* Defer AttrsClass creation as long as possible

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2021-09-22 21:58:32 +02:00
David Euresti ce8bb4ffa9
Add attribs to resolve_types and fix test_hooks (#774) 2021-03-05 16:01:04 -08:00
Hynek Schlawack ae51f34681 Attribute.assoc → evolve 2020-10-17 07:27:36 +02:00
Stefan Scherfke 0eae613ce1
Add hooks for field transformation and for asdict serialization (#653) 2020-10-15 09:33:59 +02:00