From 4dd703d3460d7bccc7143dd01362341515b40d4e Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Tue, 16 May 2023 13:37:06 +0200 Subject: [PATCH] gh-104050: Don't star-import 'types' in Argument Clinic --- Tools/clinic/clinic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 13fd66b0406f26..9fb71bfc321f43 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -25,10 +25,9 @@ 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()