Minor refactoring and encapsulation of constants, add .gitignore #570
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.
Hello and good day,
I refactored a small amount of repeating code and constants and encapsulated these values in their new, own
constants.py
file - a file where everything that's related to non-changing values can be placed, so if something changes in the future, there's one central place to consult and edit!For example, you do now have this handy
Platforms
class that keeps track of thesys.platform
values of the platforms that aren't yet fully supported. Once every single feature works on macOS for example, you can simply remove it from theported
tuple and it'll be reflected in all of Alpaca.Translators are also no longer in the
main.py
file but rather in theconstants.py
file, where they are in a more encapsulated space.I also added a
.gitignore
file that allows other editors than GNOME Builder to work with the project more seamlessly.Last but not least, I re-organized the imports of the files I edited.
Best greets! :)