cattrs icon indicating copy to clipboard operation
cattrs copied to clipboard

Composable custom class converters for attrs, dataclasses and friends.

Results 110 cattrs issues
Sort by recently updated
recently updated
newest added

* cattrs version: 1.8.0 * Python version: 3.9.7 * Operating System: macOS ### Description Let's have the following test case ```py @define class X(Generic[T]): field: List[T] def pred(cls): print(f">>> {cls}")...

If I submitted pre-commit hooks for isort and black would you take it? I use them exclusively and remember to run black/isort pains me sometimes.

Hi! First, a very neat idea and a neat implementation :) As I munged with it for a bit, I was wondering if you'd consider a few potential syntactic shortcuts?...

* cattrs version: 1.8.0 * Python version: 3.8.11 * Operating System: macOS 11.5.2 ### Description I am trying to use `prefer_attrib_converters` flag to avoid the fallback of invoking converters registered...

* cattrs version: 0.9.0 * Python version: 3.7.0 * Operating System: Windows ### Description Right now cattr can only convert dictionaries back to the respective attr object if the field...

```python @attr.s class Model: field = attr.ib(type=List[str]) src_dict = {"field": "hello"} cattrs.structure(src_dict, Model) => ["h", "e", "l", "l", "o"] ``` I'd expect it to fail converting.

* cattrs version: 1.1.2 * Python version: 3.8.6 * Operating System: Linux x86-64 ### Description Run mypy on first example from readme and get error. ### What I Did ```python...

blocked-upstream

* cattrs version: 1.3.0 * Python version: 3.7+ (mostly because I use `cattrs~=1.0.0` for `python_version < 3.7`) * Operating System: macOS, Linux, Windows ### Description I have a custom unstructure...

* cattrs version: 0.9.0 * Python version: 3.5.2 * Operating System: ubuntu xenial64 ### Description On a clean ubuntu VM, I pip3 install cattrs, and import cattr doesn't seem to...

* cattrs version: 0.9.0 * Python version: 3.6.ř * Operating System: Debian 9 ### Description I want to cattrs to load complex nested data and in case some validation/conversion fails,...