Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 the archive exporter #4448
Refactor the archive exporter #4448
Changes from 3 commits
bb88825
124c6f6
8bc6116
2093194
797b1b9
df2bcb8
cb5d1c2
3653d82
0c8d122
b3f072d
6f9ddd5
b689f5e
06bf80f
0121c49
7b7931e
e564a59
9b9c0c9
309ef94
6f6b3e0
9151ab3
aa2144b
0a8d177
7206fdb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity - is this the suggested way to build instances of dataclasses, i.e. to build a dict and then pass it to the constructor?
E.g. couldn't you just initialize it below with
report = ExportReport(time_collect_start=..., time_collect_stop=...)
and then just add to the instance?
It's not very important here, but in general it would avoid retyping the attributes of the data class as dict keys (possibly introducing typos).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well you would have to intialise it with a dummy
time_collect_start
etc, then assume that it will get overriden later on, which I don't think is a good ideaThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, you could just initialize it once you have both
collect
timesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah potatas, potatas, both are valid 😉