mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-103384: Generalize the regex pattern BaseConfigurator.INDEX_PATTERN to allow spaces and non-alphanumeric characters in keys. (GH-103391)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org>
This commit is contained in:
parent
135098743a
commit
8d4052075e
4 changed files with 51 additions and 3 deletions
|
|
@ -378,7 +378,7 @@ class BaseConfigurator(object):
|
|||
|
||||
WORD_PATTERN = re.compile(r'^\s*(\w+)\s*')
|
||||
DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*')
|
||||
INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*')
|
||||
INDEX_PATTERN = re.compile(r'^\[([^\[\]]*)\]\s*')
|
||||
DIGIT_PATTERN = re.compile(r'^\d+$')
|
||||
|
||||
value_converters = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue