Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c22fced

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

File tree

1 file changed

+2
-3
lines changed
Filter options

1 file changed

+2
-3
lines changed

‎Tools/clinic/clinic.py

Copy file name to clipboardExpand all lines: Tools/clinic/clinic.py
+2-3Lines changed: 2 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.