Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor slz_json.py to remove metaclass and classvar abuse. #7

Open
laundmo opened this issue Oct 12, 2022 · 0 comments
Open

Refactor slz_json.py to remove metaclass and classvar abuse. #7

laundmo opened this issue Oct 12, 2022 · 0 comments
Labels
difficulty-medium A issue which is a bit harder to tackle enhancement New feature or request

Comments

@laundmo
Copy link
Owner

laundmo commented Oct 12, 2022

Currently slz_json.py uses a metaclass which sets a classvar to track object ids and references.

This is not ideal, as it requires calls to reset to clear out the classvars between writing json files.

def reset():
for typ in refable_types.values():
typ.elements = {}

the code should be refactored and re-thought completely, to start with a slz json base class which tracks the object ids for just that file, instead of globally.

Please comment on this issue if you want to work on it!

@laundmo laundmo added enhancement New feature or request difficulty-medium A issue which is a bit harder to tackle labels Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty-medium A issue which is a bit harder to tackle enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant