python-pyfields
python-pyfields copied to clipboard
Define fields in python classes. Easily.
See https://github.com/tylerwince/flake8-bandit/issues/21 Today our fix is to add `bandit
```python from typing import Union from pyfields import has_fields has_fields(Union[int, float]) ``` Leads to a non-user-friendly error message: ```python Traceback (most recent call last): ... File "", line 1, in...
We need to clarify - the callback signature: probably just `(obj, field)` for get and `(obj, field, value, has_changed)` for set. - should the observer be called in the same...
Usually, I prefer dataclass-like objects to have keyword-only `__init__`. In general, I believe that invocations with more than one or two positional arguments are a risk to refactoring and make...
Aims at fixing #62
Work to fix #35
I've found myself using make_init with arguments rather than @autoclass with parameters as it is more convenient for the cases where I need to write a customise the various dunder...
The requirement is to set multiple fields which have individual validators where there could be a period where the invariants are not satisfied but at the end of the "transaction",...
It would be very convenient that anyone can use thes helper functions on any class (not necessary classes with fields). In particular when "view" properties are defined it would be...
This may not be worth the shot, but I open this ticket so as to attach the corresponding exploratory PR - this PR seemed to indicate that the cythonized version...