You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentionned in one previous pull request, the code could benefit from more structured data. Where it might be overkill to create and entire struct just to get rid of one replace(':', '/'), there are places in omc3 where it would actually make sense and improve usability of the code.
One important place to start would be InputFiles .
Possible Implementation
First of all, InputFiles should go into a separate file (right now it's even used before it's defined in measure_optics.py).
Then, the data should not be stored as dict for 'X' and 'Y', but have members .x_files/.y_files. If access to those members is desired from the outside, for convenience and to keep compatibility, the [] operator can be overriden.
The text was updated successfully, but these errors were encountered:
InputFiles is not used before it is defined, in the sense that this is a bug. It is used after it's definition Runtime wise, i.e. a readability problem, not an operational one.
There are no structs in Python, at least none that IMHO make sense here. I guess you mean dataclass?
Feature Description
As mentionned in one previous pull request, the code could benefit from more structured data. Where it might be overkill to create and entire struct just to get rid of one
replace(':', '/')
, there are places in omc3 where it would actually make sense and improve usability of the code.One important place to start would be
InputFiles
.Possible Implementation
First of all,
InputFiles
should go into a separate file (right now it's even used before it's defined inmeasure_optics.py
).Then, the data should not be stored as dict for
'X'
and'Y'
, but have members.x_files
/.y_files
. If access to those members is desired from the outside, for convenience and to keep compatibility, the[]
operator can be overriden.The text was updated successfully, but these errors were encountered: