From c22fced96c4d472221071d12e8e88b0a33f6bb4b Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Tue, 16 May 2023 14:02:18 +0200 Subject: [PATCH] gh-104050: Don't star-import 'types' in Argument Clinic (#104543) --- 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 6020935f8304c5..0ef5deb586d6ee 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()