an initial idea for parsing and storing defaults#16
Draft
bernt-matthias wants to merge 4 commits intoaCLImatise:masterfrom
Draft
an initial idea for parsing and storing defaults#16bernt-matthias wants to merge 4 commits intoaCLImatise:masterfrom
bernt-matthias wants to merge 4 commits intoaCLImatise:masterfrom
Conversation
multimeric
requested changes
Jul 23, 2020
Collaborator
multimeric
left a comment
There was a problem hiding this comment.
Please also add a test case, following the same points from #15.
acclimatise/cli_types.py
Outdated
| A data type used in the command-line | ||
| """ | ||
|
|
||
| default: object = None |
Collaborator
There was a problem hiding this comment.
- Firstly, can this type annotation be optional please? e.g.
Optional[object] - Secondly, and this is annoying I know, but could you add a type annotation override for the subclasses, such that
CliInthasdefault: Optional[int]etc?
Contributor
Author
Can do, but I never found the time to learn these python testing frameworks. If you could provide me the framework I can fill in the details I guess. |
Collaborator
|
The framework is pytest, which is the simplest testing framework. You just define a |
and use them as fallback
7e681b1 to
35241ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Just an idea. No idea if useful / correct. Might be better to do it at another place.
I guess also regular expressions testing if the extracted value is really an integer, float, list, ... would be a good idea.