File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ include that in your requirements. Make sure the version is marked dynamic in
5454your project table. And then you specify ` version.provider ` . The other options
5555are defined by the plugin; this one takes a required ` input ` file and an
5656optional ` regex ` (which defaults to the expression you see above). The regex
57- needs to have a ` "value" ` named group, which it will set.
57+ optional ` regex ` (which defaults to the expression you see above). The regex
58+ needs to have a ` "value" ` named group (` ?P<value> ` ), which it will set.
5859
5960## For plugin authors
6061
@@ -120,6 +121,8 @@ def dynamic_metadata(
120121 raise RuntimeError (" Must set 'input' and/or 'regex' to strings" )
121122
122123 input = settings[" input" ]
124+ # If not explicitly specified in the `tool.dynamic-metadata.v1.<field-name>` table,
125+ # the default regex provided below is used.
123126 regex = settings.get(
124127 " regex" , r ' (?i) ^ ( __version__| VERSION) * = * ( [\' " ]) v? ( ?P<value> . +? ) \2 '
125128 )
You can’t perform that action at this time.
0 commit comments