dataclassy icon indicating copy to clipboard operation
dataclassy copied to clipboard

A fast and flexible reimplementation of data classes

Results 10 dataclassy issues
Sort by recently updated
recently updated
newest added

I found a bug when I attempt to mix metaclasses w/ `dataclassy`. Here is what I was doing: ```python @abstractdataclass class ConverterAPI(Generic[ABIType]): ... @abstractmethod def convert(self, value: str) -> ABIType:...

bug

I want to use slots in CPython using dataclassy, but I also want to be able to hide initializers for certain variables from the user. For example: ```python @dataclass(slots=True) class...

enhancement

Classes should support the PEP 622 Structural Pattern Matching feature of Python 3.10. From [reading the PEP](https://www.python.org/dev/peps/pep-0622/#runtime) it seems this should be rather simple, simply adding a `__match_args__` tuple which...

enhancement

This project looks great! I've been heavily using [dacite](https://github.com/konradhalas/dacite) - in particular, the `from_dict` method to initialise a nested data class from a nested dictionary. Have you come across this...

question

First of all thanks for a great tool! For some reason, this raises `TypeError: super(type, obj): obj must be an instance or subtype of type`: ``` from dataclassy import dataclass...

bug

I'm comparing this package to the standard dataclasses. In this case, the `__init__` method will only accepts the `wheels` argument: ```python from dataclasses import dataclass, field @dataclass(eq=False) class Vehicle: wheels:...

question

Simple example ```python from dataclassy import dataclass, as_dict @dataclass class MyClass: _my_internal_tracking_field: str = "Parent Class" my_other_field: str >>> my_instance = MyClass(my_other_field="test") >>> my_instance.__repr__ >>> as_dict(my_instance) {'_my_internal_tracking_field': 'Parent Class', 'my_other_field':...

enhancement

First of all, great work! I wondered if the verbosity of the code could be further reduced by allowing the factory function to be used without arguments. In that case,...

enhancement

In VSCode, `dataclass` from `dataclasses` allows me to see the attributes of my dataclass when creating an object. For example, if I have a dataclass called `MyClass` and I write...

Fails to pass the tests after python/cpython#119361 merged (see commit python/cpython@9b8611eeea172cd4aa626ccd1ca333dc4093cd8c): ``` EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE ====================================================================== ERROR: test_abc (__main__.Tests.test_abc) Test subclassing a class with metaclass=ABCMeta. This once caused a weird Attribute Error...