File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ def pytask_execute_build(session: Session) -> bool | None:
104104def pytask_execute_task_protocol (session : Session , task : PTask ) -> ExecutionReport :
105105 """Follow the protocol to execute each task."""
106106 # Initialize explanation for this task if in explain mode
107- if session .config . get ( "explain" , False ) :
107+ if session .config [ "explain" ] :
108108 task .attributes ["explanation" ] = TaskExplanation (reasons = [])
109109
110110 session .hook .pytask_execute_task_log_start (session = session , task = task )
@@ -136,7 +136,7 @@ def pytask_execute_task_setup(session: Session, task: PTask) -> None: # noqa: C
136136 """
137137 if has_mark (task , "would_be_executed" ):
138138 # Add cascade reason if in explain mode
139- if session .config . get ( "explain" , False ) and "explanation" in task .attributes :
139+ if session .config [ "explain" ] and "explanation" in task .attributes :
140140 marks = [m for m in task .markers if m .name == "would_be_executed" ]
141141 if marks :
142142 preceding_task_name = marks [0 ].kwargs .get ("task_name" , "unknown" )
You can’t perform that action at this time.
0 commit comments