Closed carlwilson closed 4 years ago
@bitsgalore this isn't to be merged yet as it will require some automated testing to ensure that nothing has changed / broken....
I'm not overly in favour of these changes, mainly because I think they will make the maintenance of the MIX module unnecessarily complicated. E.g. suppose a user reports a problem with the reported value of element mix:colorSpace
in a jpylyzer output file. Currently it is easy to find the corresponding code with a simple text search on mix:colorSpace
. If the proposed changes were applied, we would 1. need to open mix_constants.py
, 2. search for mix:colorSpace
there, 3. make a note of the corresponding constant MIX.COLOR_SPACE
, and then 4. look that up in mix.py
. It would also make the MIX code inconsistent with boxvalidator.py
, which also uses string constants that are identical to the reported output elements in the XML. So I would suggest to stick with the old string constants, even if they're not completely in line with PEP and/or PyLint.
Not a problem at all @bitsgalore that's why I kept them seperate. The one definite improvement is that it means that string constants aren't repeated but I agree with much of your argument. I'll close this for now.
mix:
string constants frommix.py
; andmix_constants.py
source file.