-
Notifications
You must be signed in to change notification settings - Fork 0
feat: extracting valid literals from documentation #78
Conversation
…on string and the type string of a parameter
The pattern execution configuration was added.
…test_extract_valid_literals.py' Refactored the configurations in '_extract_valid_values.py' dicts -> dataclasses Deleted 'parameter_data_with_dscription.json'
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov Report
@@ Coverage Diff @@
## main #78 +/- ##
==========================================
+ Coverage 89.76% 89.96% +0.19%
==========================================
Files 83 84 +1
Lines 3998 4075 +77
==========================================
+ Hits 3589 3666 +77
Misses 409 409
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it would be beneficial if the code contained more comments, it seems to do what it is supposed to.
tests/library_analyzer/processing/annotations/test_extract_valid_literals.py
Outdated
Show resolved
Hide resolved
…n' into 46-multi-part-enumtype-extraction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing
New recognition pattern for the description string was added Detection of legal values is now interrupted only if the detection within the type string resulted in a hit.
…n' into 46-multi-part-enumtype-extraction
…e as valid values when a boolean is detected. In addition, the system checks whether there are matching string values in the description that are not True, False or None if 'str' is set in the type string. If this is not the case, 'unlistable_str' is returned. The test cases have been adapted accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks excellent, thanks!
Feel free to merge this if you're done. |
Closes #46.
Summary of Changes
Currently, valid values for the enum annotations were determined only via the type string. In order to achieve a higher recognition rate of the enum annotations, the recognition of the valid values was extended to the description.
Testing Instructions
pytest
fortest_extract_valid_literals.py
.pytest
.