File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1235,8 +1235,9 @@ def check_func_def(
1235
1235
new_frame .types [key ] = narrowed_type
1236
1236
self .binder .declarations [key ] = old_binder .declarations [key ]
1237
1237
with self .scope .push_function (defn ):
1238
- # We suppress reachability warnings for empty generators (return; yield), since there's
1239
- # no way to promote a function into a generator except by adding an "unreachable" yield.
1238
+ # We suppress reachability warnings for empty generator functions
1239
+ # (return; yield), since the most idiomatic way to promote a function into a
1240
+ # generator function is often to add an "unreachable" yield.
1240
1241
#
1241
1242
# We also suppress reachability warnings when we use TypeVars with value
1242
1243
# restrictions: we only want to report a warning if a certain statement is
You can’t perform that action at this time.
0 commit comments