gh-104050: Don't star-import 'types' in Argument Clinic (#104543)

This commit is contained in:
Erlend E. Aasland 2023-05-16 14:02:18 +02:00 committed by GitHub
parent 505e2954a9
commit c22fced96c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,10 +25,9 @@ import string
import sys import sys
import textwrap import textwrap
import traceback import traceback
import types
from collections.abc import Callable from collections.abc import Callable
from types import * from types import FunctionType, NoneType
from typing import Any, NamedTuple from typing import Any, NamedTuple
# TODO: # TODO:
@ -4037,7 +4036,7 @@ def eval_ast_expr(node, globals, *, filename='-'):
node = ast.Expression(node) node = ast.Expression(node)
co = compile(node, filename, 'eval') co = compile(node, filename, 'eval')
fn = types.FunctionType(co, globals) fn = FunctionType(co, globals)
return fn() return fn()