attrs icon indicating copy to clipboard operation
attrs copied to clipboard

Python Classes Without Boilerplate

Results 198 attrs issues
Sort by recently updated
recently updated
newest added

One can have `@validator` and `@default` but no `@convert`. Is this an oversight or by intention? If it's just an oversight, I'd be happy to send a PR for it.

Feature

Getting this message because I both have the type annotation and type defined on a custom attribute class which is reasonable considering the ambiguity. However I think the message itself...

I've been trying to upgrade `attrs` code to drop python 3.8 support (on top of https://github.com/python-attrs/attrs/pull/1270) and found that after that pytest fails in few units ```console + /usr/bin/pytest -ra...

23.2.0 is OK. ```Python Python 3.10.13 (main, Dec 6 2023, 12:01:00) [GCC 13.2.1 20230801] on linux >>> import attr >>> attr.__version__ '23.2.0' >>> @attr.define ... class A: ... abc: int...

# Summary Values given to `__init__` should now always be propagated to `__attrs_pre_init__`, regardless of default configuration. Resolves #1427. # Pull Request Check List - [x] Do **not** open pull...

# Summary Preliminary implementation of "evolving" existing `Attribute` instances back into `_CountingAttr` instances, so that users may (easily) reuse attribute definitions from already `define`d classes. Should resolve #637, #698, #829,...

Hi, I just noticed a typing problem when using factory classmethods as converters. The following code works properly with mypy when calling the constructor directly, but causes problems when calling...

Currently two test fail on 3.14: ``` FAILED tests/test_make.py::TestClassBuilder::test_no_references_to_original_when_using_cached_property - AssertionError: assert [] == [, ] At index 0 diff: != Right contains one more item: Full diff: [ ,...

Part of the reason why attrs is so appealing is that all validations are essentially just plain functions that are run at certain times. However, I find myself pining for...