File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -73,24 +73,24 @@ def _field_split(path):
73
73
que = path
74
74
fields = []
75
75
# regex match dotted values and square brackets
76
- regex = re .compile (r' ^[^\[\].]+|^\[[\'\"].+?[\'\"]\]|^\[.*?\]' )
77
- while ( regex .match (que ) ):
76
+ regex = re .compile (r" ^[^\[\].]+|^\[[\'\"].+?[\'\"]\]|^\[.*?\]" )
77
+ while regex .match (que ):
78
78
m = regex .match (que )
79
79
# remove outer square brackets
80
- field = re .sub (r' (^\[)|(\]$)' , "" , que [m .start (): m .end ()])
80
+ field = re .sub (r" (^\[)|(\]$)" , "" , que [m .start () : m .end ()])
81
81
try :
82
82
# make numbers numbers
83
83
fields .append (ast .literal_eval (field ))
84
84
except Exception :
85
85
# or strip the quotes
86
86
fields .append (re .sub ("['\" ]" , "" , field ))
87
87
try :
88
- if que [m .end ()] == '.' :
89
- que = que [m .end () + 1 :]
88
+ if que [m .end ()] == "." :
89
+ que = que [m .end () + 1 :]
90
90
else :
91
- que = que [m .end ():]
91
+ que = que [m .end () :]
92
92
except IndexError :
93
- que = ''
93
+ que = ""
94
94
return fields
95
95
96
96
def set_value (self , obj , path , val ):
You can’t perform that action at this time.
0 commit comments