Commit Notes
Bug Fixes
- Fixed *strict* attribute for `validate_args`
- Fixed `Self` type hint not working on some versions of python
- Fixed bug that was breaking ParamRow's aliases checks.
Package Changes
- Abstract classes `DeclarationsList` and `DeclListRow` are moved from `model`
to `model.abc` and renamed to `List` and `Row` respectively.
- Better index search (compare by ID, not `__eq__`). Might be a debatable
solution (essentially it now says *"this row is/isn't in this list"* instead
of showing any matching row). Might change in future, depends on requests.
- Added support to replacing/inserting values to list-likes the pythonic way
(`obj[3] = "memb =12"`).
- Implemented deep copying for rows and list-likes.
- Added tuple pairs support for both `Map` and `MapRow`.
- **BREAKING:** `Map.add(str, str)` no longer adds arguments as *key* and
*value* of a new row. Now it's interpreted as 2 ndf code snippets. To
replicate old behaviour one should call `Map.add((str, str))` (2 strings
wrapped in a tuple).
- Added `Mod.write_edit()`. This method allows to write the edit out to the
destination mod manually (previously was only possible via
`with Mod.edit( ... ) as source:`).
- Implemented dangling rows. Previously rows could not be created without a
parent list-like or unparented from a list-like. Now it is possible.
- Added `edit_ndf()` to row classes. This allows to edit any row with an ndf
snippet.
- Extended list-likes to accept ndf code snippets, kwargs, dicts etc. to
be inserted/added.
- *py-tree-sitter* compilation not needed anymore.
- Extended `remove_by_*` methods in list-likes to support *non-strict* mode.
- Added `find_by_cond()` and `match_pattern()` to list-likes for more convenient
filtering of rows.
- Added `compare()` for row classes and list-likes. This method allows for both
strict comparison and pattern matching depending on *existing_only* argument.
Docs Changes
- Docs are now cooked with [furo][1] theme.
- ``_strict`` mode for some methods documented better.
- More code examples.
[1]: https://pypi.org/project/furo/