File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ def main():
173
173
tl .log_debug ("line 3" )
174
174
175
175
del tl .LogContext .dest_levels ["varied" ]
176
- tl .LogContext .dest_levels [None ] = "warning"
176
+ tl .LogContext .dest_levels [None ] = "warning" # type:ignore
177
177
tl .LogContext .dest_levels ["" ] = "warning"
178
178
tl .log ("line 4" )
179
179
@@ -214,11 +214,7 @@ async def run_task1():
214
214
tl .logging .start_logging (file = log_output , destination_label = label )
215
215
tl .LogContext .dest_levels ["mixed1" ] = "info"
216
216
217
- tl .LogContext .dest_levels ["mixed2" ] = {
218
- "root" : "debug" ,
219
- "task1" : "info" ,
220
- "task2" : "" ,
221
- }[task ]
217
+ tl .LogContext .dest_levels ["mixed2" ] = "debug" if task == "root" else "info"
222
218
223
219
task2 = tl .Task (on_run = run_task2 )
224
220
tl .log ("line 2" )
@@ -239,11 +235,7 @@ async def run_task2():
239
235
tl .logging .start_logging (file = log_output , destination_label = label )
240
236
tl .LogContext .dest_levels ["mixed1" ] = "debug"
241
237
242
- tl .LogContext .dest_levels ["mixed2" ] = {
243
- "root" : "error" ,
244
- "task1" : "debug" ,
245
- "task2" : "error" ,
246
- }[task ]
238
+ tl .LogContext .dest_levels ["mixed2" ] = "debug" if task == "task1" else "error"
247
239
248
240
tl .log_debug ("line 3" )
249
241
You can’t perform that action at this time.
0 commit comments