Skip to content

Commit 32f1bf4

Browse files
authored
Merge pull request #299 from deronnax/deronnax-regex-raw-prefix
add raw prefix to invalid regex
2 parents 56fbea2 + e71633c commit 32f1bf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_preferences/preferences.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class InvalidNameError(ValueError):
2222

2323
def check_name(name, obj):
2424
error = None
25-
if not re.match("^\w+$", name):
25+
if not re.match(r"^\w+$", name):
2626
error = "Non-alphanumeric / underscore characters are forbidden in section and preferences names"
2727
if preferences_settings.SECTION_KEY_SEPARATOR in name:
2828
error = 'Sequence "{0}" is forbidden in section and preferences name, since it is used to access values via managers'.format(

0 commit comments

Comments
 (0)