mirror of
https://github.com/python/cpython.git
synced 2025-09-28 19:25:27 +00:00
gh-104050: Don't star-import 'types' in Argument Clinic (#104543)
This commit is contained in:
parent
505e2954a9
commit
c22fced96c
1 changed files with 2 additions and 3 deletions
|
@ -25,10 +25,9 @@ import string
|
|||
import sys
|
||||
import textwrap
|
||||
import traceback
|
||||
import types
|
||||
|
||||
from collections.abc import Callable
|
||||
from types import *
|
||||
from types import FunctionType, NoneType
|
||||
from typing import Any, NamedTuple
|
||||
|
||||
# TODO:
|
||||
|
@ -4037,7 +4036,7 @@ def eval_ast_expr(node, globals, *, filename='-'):
|
|||
|
||||
node = ast.Expression(node)
|
||||
co = compile(node, filename, 'eval')
|
||||
fn = types.FunctionType(co, globals)
|
||||
fn = FunctionType(co, globals)
|
||||
return fn()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue