Refactored config
Description
I'm not fond of the way config was written, so I changed it a bit. Now it way more readable and accessible.
- Added typing
- Added explanations
- Changed the way
checkswas provided inhandle_input - Replaced
crawl_and_checkw/nested_get&nested_set
Issue Fixes
None I guess, I just didn't like the way it was written:
- w/o typing & explanation
- the way
checkswas provided inhandle_input - the way config template was looking, it's hard to read at least
Checklist
- [x] I am pushing changes to the develop branch
- [x] I am using the recommended development environment
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have formatted and linted my code using python-black and pylint
- [x] I have cleaned up unnecessary files
- [x] My changes generate no new warnings
- [x] My changes follow the existing code-style
- [x] My changes are relevant to the project
How to test the changes
- Rename
config.tomltoconfig.toml.bak - Run the script
- Do your tests
- Delete new
config.toml - Rename
config.toml.baktoconfig.toml
Try to play w/ different scenarios, for instance, what if one field is incorrect
Actually don't even need that
Dude go through the enhancement list and do that Why fix things that aren't broken...
Besides nobody is ever supposed to actually edit that file except for a dev who can read it fine
@JasonLovesDoggo You sure you want to close it? I know it works fine, but it's not great.
- config template looks bad and is in fact unreadable, + not following toml rulebook
- 2 recursive functions is hell to debug if something will ever happen
- typings will never hurt nobody
- it's kinda bad code if the code is only for
dev who can read it fine, everyone should understand it
Just give it a look. It's not that big, I renamed lots of thing there unintentionally but it's still almost the same code. And if I'm not mistaken you were looking for a guy to refactor the code so it won't be unnecessary.
Dude go through the enhancement list and do that Why fix things that aren't broken...
Yup, I will. While I'm waiting on new-webdriver to be merged I wanted to address thing no-one would