Closed mwootendev closed 8 months ago
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
ff47441
) 97.43% compared to head (744f5f3
) 97.45%.
Files | Patch % | Lines |
---|---|---|
src/dynamicprompts/commands/wildcard_command.py | 66.66% | 1 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This is actually a complete replacement of the work done in #110. This will replace the main source code added in that PR, but retain the test cases to ensure backwards compatibility.
After trying to refactor #110 into a cleaner solution, I came to a better understanding of how the library was structured. The original solution supported variables, but seemed like a hack.
The new solution updates wildcards to support either strings or Commands for the wildcard value. This now permits actual VariableAccessCommand or SequenceCommand instances as the value, which are resolved before resolving the wildcard. This new implementation also supports variants in the wildcard path. Wildcards of the form
__wildcard/${variable:default}__
and__wildcard/{opt1|opt2|opt3}__
are now supported.