File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 3939 (r'[\%]{2}' , '%' ),
4040 (r'\%([.\d]+)?[bcdeEfFgGnosxX]' , r'' ),
4141 (r'\%(\([^)]*\))([.\d]+)?[bcdeEfFgGnosxX]' , r'' ),
42+ ),
43+ 'python-brace' :(
4244 (r'\{([^\:\}]*)?(:[^\}]*)?\}' , r'' ),
4345 ),
4446})
Original file line number Diff line number Diff line change @@ -129,6 +129,9 @@ def test_replace_formatters_python(self):
129129 self .assertEqual (replace_formatters ('%.02f' , 'python' ), '' )
130130 self .assertEqual (replace_formatters ('%(sth)s' , 'python' ), '' )
131131 self .assertEqual (replace_formatters ('%(sth)02f' , 'python' ), '' )
132+
133+ def test_replace_formatters_python_braces (self ):
134+ """Test removal of formatters in a python braces string."""
132135 # str.format()
133136 conditions = (
134137 ('First, thou shalt count to {0}' ,
You can’t perform that action at this time.
0 commit comments