summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2023-05-16 12:02:18 (GMT)
committerGitHub <noreply@github.com>2023-05-16 12:02:18 (GMT)
commitc22fced96c4d472221071d12e8e88b0a33f6bb4b (patch)
tree317310bc8441d82cddaac781458dbf27fcea522a
parent505e2954a9bbc843128de818bf2f3cd15e55f146 (diff)
downloadcpython-c22fced96c4d472221071d12e8e88b0a33f6bb4b.zip
cpython-c22fced96c4d472221071d12e8e88b0a33f6bb4b.tar.gz
cpython-c22fced96c4d472221071d12e8e88b0a33f6bb4b.tar.bz2
gh-104050: Don't star-import 'types' in Argument Clinic (#104543)
-rwxr-xr-xTools/clinic/clinic.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 6020935..0ef5deb 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -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()