diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2023-05-16 12:02:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-16 12:02:18 (GMT) |
commit | c22fced96c4d472221071d12e8e88b0a33f6bb4b (patch) | |
tree | 317310bc8441d82cddaac781458dbf27fcea522a | |
parent | 505e2954a9bbc843128de818bf2f3cd15e55f146 (diff) | |
download | cpython-c22fced96c4d472221071d12e8e88b0a33f6bb4b.zip cpython-c22fced96c4d472221071d12e8e88b0a33f6bb4b.tar.gz cpython-c22fced96c4d472221071d12e8e88b0a33f6bb4b.tar.bz2 |
gh-104050: Don't star-import 'types' in Argument Clinic (#104543)
-rwxr-xr-x | Tools/clinic/clinic.py | 5 |
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() |