Add functionality behind --dic argument in CU CLI #228
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.
As someone wanted to use the --dict in CLI and got an error, the source shows the functions
load_key_file
andload_dict_file
are not defined.After some tests, I believe the functionality does not need to be an own function, it is easier to read and understand in one block while parsing the keys.
The
if ... elif ... else
construct is not very elegant, but works better for the different types of comparing as amatch ... case
. It is good to extend, if a .dic file (or single keys from a file) needs to be converted.