Skip to content

Commit

Permalink
fix: fix f-strings for cpython 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Sep 18, 2023
1 parent 74b9610 commit 81db419
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
if eval("0"):
global_never_defined = 1

if sys.version_info[:2] == (3, 9):
# https://github.com/alexmojaki/executing/pull/71#issuecomment-1723634310
import asttokens.util
asttokens.util.fstring_positions_work = lambda: True


def calling_expression():
frame = inspect.currentframe().f_back.f_back
Expand Down

0 comments on commit 81db419

Please sign in to comment.