mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Merge pull request #3884 from laloch/fix-v39-fstrings
Fix f-string parsing in Python 3.9
This commit is contained in:
commit
03be9161b3
2 changed files with 24 additions and 1 deletions
23
news/fix-v39-fstrings.rst
Normal file
23
news/fix-v39-fstrings.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* Fixed f-strings parsing in Python 3.9
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
|
@ -67,7 +67,7 @@ class FStringAdaptor:
|
|||
# expression, e.g. "($HOME)" for f"{$HOME}" string.
|
||||
if e.text is None or e.text[0] != "(":
|
||||
raise
|
||||
error_expr = e.text[1:-1]
|
||||
error_expr = e.text.strip()[1:-1]
|
||||
epos = template.find(error_expr)
|
||||
if epos < 0:
|
||||
raise
|
||||
|
|
Loading…
Add table
Reference in a new issue