mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-17 00:35:19 +02:00
[nodes] Use raw strings for parameters that contain regular expressions
Regular expressions in regular strings generate deprecation warnings with Python 3 ("invalid escape sequence \x"). To fix these warnings, the regex must be contained within a raw string. For nodes that have parameters whose description and/or value contain regex, the strings are transformed into raw strings. In the case of descriptions, which are generally written across several lines, regular strings are concatenated with regular strings to preserve line returns (with "\n", which becomes uneffective in raw strings).
This commit is contained in:
parent
8bef398bed
commit
189cb6be5b
3 changed files with 11 additions and 11 deletions
|
@ -57,10 +57,10 @@ The alignment can be based on:
|
|||
description='Matching regular expression for the "from_cameras_filepath" method. '
|
||||
'You should capture specific parts of the filepath with parenthesis to define matching elements.\n'
|
||||
'Some examples of patterns:\n'
|
||||
' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"\n'
|
||||
' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"\n'
|
||||
' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"\n',
|
||||
value='.*\/(.*?)\.\w{3}',
|
||||
r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' +
|
||||
r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' +
|
||||
r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"',
|
||||
value=r'.*\/(.*?)\.\w{3}',
|
||||
uid=[0],
|
||||
),
|
||||
desc.ListAttribute(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue