This repository was archived by the owner on Jul 23, 2024. It is now read-only.
Tags: GradienceTeam/Gradience
Tags
Refactor shell theming module (#806) ## Description This PR refactors a few operations to make the code handle edge cases efficiently with marginal performance improvements. ## Type of change - [ ] Bugfix (Change which fixes an issue) - [ ] New feature (Change which adds new functionality) - [x] Enhancement (Change which slightly improves existing code) - [ ] Breaking change (This change will introduce incompatibility with existing functionality) ## Changelog <!-- This is optional, but highly appreciated. --> - Stores the comma separated string representation of valid versions for later use in raising exceptions. - Uses tuple for `async_data` in `ShellTheme` since its members are immutable. - Uses tuple decomposition to assign theme variant and preset from `async_data` later. - Replaces `Gio.File.make_directory_with_parents` with Python's builtin `os.makedirs` with `exist_ok` as True to implicitly create directories when nonexistent. - Instead of relying on `KeyError`s when accessing dictionary values, the `get` method is used to supply a default value. - When a key might exist in one dictionary, the `get` method (which may return `None`) is coupled with the nullish `or` operator to use the value that is not `None`. - Uses predefined `main_source` attribute as argument to the `_compile_sass` function. - Uses the walrus operator to scope a template match to the condition when it is not `None`. - Removes unnecessary implicit `.close()`s on file handles when using context managers. ## Testing - [x] I have tested my changes and verified that they work as expected <!-- Make sure you did this step before marking your PR as ready for merge. --> ### How to test the changes <!-- Optional, it can speed up review process if you provide the information on how to test your changes. --> Just run `./local.sh`
chore: update some paths to contain information about 0.4.1 release
translate: update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: Gradience/Gradience Translate-URL: https://hosted.weblate.org/projects/GradienceTeam/gradience/
PreviousNext