Represent

Latest version: v2.1

Safety actively analyzes 688823 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.6.0.post0

Changed
- Modernised packaging and ensure Python 3.8-3.9 are tested on CI. No
functional changes.

1.6.0

Added
- `autorepr` and `ReprHelperMixin` now use [`reprlib.recursive_repr`][rrr] if
available. (3)

Changed
- `autorepr` now assigns one `namedtuple` to `cls._represent` instead of using
three different class variables as before.

Fixed
- Deprecation warnings were always raised instead of only when deprecated
names were imported.

[rrr]: https://docs.python.org/3.5/library/reprlib.html#reprlib.recursive_repr

1.5.1

Added
- More tests for areas missing from code coverage.
- Links in the README to readthedocs and codecov.

Fixed
- `autorepr` wouldn't create methods if a subclass had the same name as its
parent. This check has been removed.

1.5.0

Added
- `autorepr` class decorator to replace `ReprMixin`. `autorepr` is a much
cleaner solution, moving errors to class creation time instead of during
`__init__`. There are no caveats with pickling anymore.

Deprecated

The following names will raise deprecation warnings. They will be removed
completely in 2.0.0.
- `ReprMixin`
- `ReprMixinBase`

1.4.1

Fixed
- `__slots__` added to `ReprHelperMixin` to allow subclasses to use `__slots__`.

1.4.0

Added
- `BaseReprHelper`, base class for `ReprHelper` and `PrettyReprHelper` to handle common functionality and enforce same API and docstrings.
- `BaseReprHelper.parantheses` tuple can be set to something other than normal brackets, e.g. `('<', '>')`

Fixed
- `BaseReprHelper.keyword_from_attr` parameter names swapped. `attr_name` used to refer to keyword name, which doesn't make sense.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.