nicc777 / py-animus

A python based plugable and extensible manifest processing system
GNU General Public License v3.0
0 stars 0 forks source link

Class `VersionedClassRegister` incorrectly reports version with str() call #42

Closed nicc777 closed 1 year ago

nicc777 commented 1 year ago

Describe the bug

Logic problem in to_dict() function does not report versions when clazz is added to result

To Reproduce

Run one of the examples:

$ docker run --rm -e "DEBUG=1" \
  -v $PWD/examples/hello-world/src:/tmp/src \
  -v $PWD/examples/hello-world/manifest:/tmp/data \
  -v /tmp/results:/tmp/hello-world-result \
  ghcr.io/nicc777/py-animus:latest delete -m /tmp/data/hello-v1.yaml -s /tmp/src

...lines snipped

2023-03-18 14:05:20,115 INFO - Registered classes: {"HelloWorld": {"versions": []}}

...lines snipped

Expected behavior

Produce a line like:

2023-03-18 14:05:20,115 INFO - Registered classes: {"HelloWorld": {"versions": ["v1"]}}

Development Environment (please complete the following information):

Additional context

n/a