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

Improve Inventory.__repr__ (and DataObjXyz.__repr__?) completeness #203

Open
bskinn opened this issue Jul 1, 2021 · 0 comments
Open

Improve Inventory.__repr__ (and DataObjXyz.__repr__?) completeness #203

bskinn opened this issue Jul 1, 2021 · 0 comments
Labels
area: api 🤖 issue: planned ⌚ Assigned to a specific version's milestone type: enhancement ✨ Something to add
Milestone

Comments

@bskinn
Copy link
Owner

bskinn commented Jul 1, 2021

Is your feature request related to a problem? Please describe.
Per the Python docs, if possible __repr__() should provide a representation that can be used to recreate the object. Right now, I'm pretty sure it doesn't do this for either Inventory or the SuperDataObj subtypes.

Describe the solution you'd like
Revise the __repr__ output suitably. Instantiation of each type is probably straightforward enough that this would be feasible, and relatively readable.

A __repr__ for Inventory with all object details is obviously not feasible, due to the massive output it would generate. Thus, SourceType.Manual instances, as well as those created directly from strings, would just not have a recreation-usable __repr__. It should be possible with the other source types.... though the Inventory data model might have to be revised in order to store the source location (file path or URL).

Describe alternatives you've considered
N/A

Additional context
N/A

@bskinn bskinn added type: enhancement ✨ Something to add issue: maybe 🤔 Being considered, but not certain pr: needs tests ✔️ labels Jul 1, 2021
@bskinn bskinn added this to the Sooner milestone Jul 1, 2021
@bskinn bskinn modified the milestones: Sooner, v3.0 Dec 12, 2021
@bskinn bskinn added issue: planned ⌚ Assigned to a specific version's milestone area: api 🤖 and removed issue: maybe 🤔 Being considered, but not certain pr: needs tests ✔️ labels Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api 🤖 issue: planned ⌚ Assigned to a specific version's milestone type: enhancement ✨ Something to add
Projects
None yet
Development

No branches or pull requests

1 participant