@@ -38,11 +38,11 @@ def current_task(loop=None):
3838 """Return a currently executed task."""
3939 if loop is None :
4040 loop = events .get_running_loop ()
41-
41+
4242 # If we have a C implementation, prefer it
4343 if current_task is not _py_current_task :
4444 return _c_current_task (loop )
45-
45+
4646 # Fall back to Python state
4747 return _current_tasks .get (loop )
4848
@@ -1093,7 +1093,7 @@ def _enter_task(loop, task):
10931093 f"task { current_task !r} is being executed." )
10941094 _current_tasks [loop ] = task
10951095 if _c_swap_current_task is not _py_swap_current_task :
1096- # keep the C task state in sync
1096+ # Keep the C task state in sync
10971097 _c_swap_current_task (loop , task )
10981098
10991099
@@ -1104,7 +1104,7 @@ def _leave_task(loop, task):
11041104 f"the current task { current_task !r} ." )
11051105 del _current_tasks [loop ]
11061106 if _c_swap_current_task is not _py_swap_current_task :
1107- # keep the C task state in sync
1107+ # Keep the C task state in sync
11081108 _c_swap_current_task (loop , None )
11091109
11101110
@@ -1115,7 +1115,7 @@ def _swap_current_task(loop, task):
11151115 else :
11161116 _current_tasks [loop ] = task
11171117 if _c_swap_current_task is not _py_swap_current_task :
1118- # keep the C task state in sync
1118+ # Keep the C task state in sync
11191119 _c_swap_current_task (loop , task )
11201120 return prev_task
11211121
0 commit comments