Closed flying-sheep closed 4 years ago
Most of the changes are actually improvements of the python code:
range(len(...))
is an antipattern. Use zip
, enumerate
or other itertools
instead whenever possibleos.path
is obsolete. pathlib.Path
makes for much nicer codeif type(...) == SomeClass
is discouraged. Use isinstance
insteadshader_name += ' '
thing was hacky. Represent information at least as tuples, better NamedTuple
s or @dataclass
es. I circumvented this by just searching shaders in all directories instead of storing the information where they came from.Awesome Implementation!
Did you migrate all of them?
No, someone else did this for me I guess.
The only thing I didn’t try to get working is to refresh the shader list after the GHNS dialog closes. An alternative would be to poll it as long as the config dialog is open.
Well, I hope there is an event triggered by the dialog.
The shader_name += ' ' thing was hacky. Represent information at least as tuples, better NamedTuples or @dataclasses. I circumvented this by just searching shaders in all directories instead of storing the information where they came from.
Indeed, I will replace it with a better format.
And thanks for advice on python code, never heard pathlib before.
thank you :smile:
The only thing I didn’t try to get working is to refresh the shader list after the GHNS dialog closes. An alternative would be to poll it as long as the config dialog is open.
The shaders are now in the new “Panon Shaders” category: https://store.kde.org/browse/cat/624/order/latest/. Did you migrate all of them?
Fixes #15