Skip to content

Commit c22fced

Browse files
gh-104050: Don't star-import 'types' in Argument Clinic (#104543)
1 parent 505e295 commit c22fced

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Tools/clinic/clinic.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
import sys
2626
import textwrap
2727
import traceback
28-
import types
2928

3029
from collections.abc import Callable
31-
from types import *
30+
from types import FunctionType, NoneType
3231
from typing import Any, NamedTuple
3332

3433
# TODO:
@@ -4037,7 +4036,7 @@ def eval_ast_expr(node, globals, *, filename='-'):
40374036

40384037
node = ast.Expression(node)
40394038
co = compile(node, filename, 'eval')
4040-
fn = types.FunctionType(co, globals)
4039+
fn = FunctionType(co, globals)
40414040
return fn()
40424041

40434042

0 commit comments

Comments
 (0)