File tree 2 files changed +5
-7
lines changed 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(
4288
4288
globals : dict [str , Any ],
4289
4289
* ,
4290
4290
filename : str = '-'
4291
- ) -> FunctionType :
4291
+ ) -> Any :
4292
4292
"""
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.
4295
4296
4296
4297
globals represents the globals dict the expression
4297
4298
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
5
5
# make sure clinic can still be run on Python 3.10
6
6
python_version = 3.10
7
7
8
- # be strict...
8
+ # and be strict!
9
9
strict = True
10
10
strict_concatenate = True
11
11
enable_error_code = ignore-without-code,redundant-expr
12
12
warn_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