File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -4288,10 +4288,11 @@ def eval_ast_expr(
42884288 globals : dict [str , Any ],
42894289 * ,
42904290 filename : str = '-'
4291- ) -> FunctionType :
4291+ ) -> Any :
42924292 """
4293- Takes an ast.Expr node. Compiles and evaluates it.
4294- Returns the result of the expression.
4293+ Takes an ast.Expr node. Compiles it into a function object,
4294+ then calls the function object with 0 arguments.
4295+ Returns the result of that function call.
42954296
42964297 globals represents the globals dict the expression
42974298 should see. (There's no equivalent for "locals" here.)
Original file line number Diff line number Diff line change @@ -5,11 +5,8 @@ pretty = True
55# make sure clinic can still be run on Python 3.10
66python_version = 3.10
77
8- # be strict...
8+ # and be strict!
99strict = True
1010strict_concatenate = True
1111enable_error_code = ignore-without-code,redundant-expr
1212warn_unreachable = True
13-
14- # ...except for one extra rule we can't enable just yet
15- warn_return_any = False
You can’t perform that action at this time.
0 commit comments