8000 Update action_helpers.c · python/cpython@45316a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 45316a7

Browse files
Update action_helpers.c
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
1 parent c315120 commit 45316a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/action_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ stmt_ty
16961696
_PyPegen_checked_future_import(Parser *p, identifier module, asdl_alias_seq * names, int level,
16971697
int lineno, int col_offset, int end_lineno, int end_col_offset,
16981698
PyArena *arena) {
1699-
if (PyUnicode_CompareWithASCIIString(module, "__future__") == 0) {
1699+
if (level == 0 && PyUnicode_CompareWithASCIIString(module, "__future__") == 0) {
17001700
for (Py_ssize_t i = 0; i < asdl_seq_LEN(names); i++) {
17011701
alias_ty alias = asdl_seq_GET(names, i);
17021702
if (PyUnicode_CompareWithASCIIString(alias->name, "barry_as_FLUFL") == 0) {

0 commit comments

Comments
 (0)
0