File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def __len__(self): # pyright: ignore
5656 return 1
5757
5858 def __getitem__ (self , index : int | slice ): # pyright: ignore
59- if index == 0 or index == - 1 :
59+ if index in ( 0 , - 1 ) :
6060 return self .message .result ()
6161 assert False
6262
Original file line number Diff line number Diff line change 9595 empty_block_location ,
9696)
9797from .pdl_context import ( # noqa: E402
98- PDLContext ,
9998 DependentContext ,
99+ PDLContext ,
100100 SerializeMode ,
101101 SingletonContext ,
102102 add_done_callback ,
@@ -367,7 +367,7 @@ def set_error_to_scope_for_retry(
367367 return scope
368368 if pdl_context :
369369 last_msg = pdl_context [- 1 ]
370- last_error = last_msg ["content" ] # type: ignore
370+ last_error = last_msg ["content" ] # type: ignore
371371 if last_error .endswith (error ):
372372 repeating_same_error = True
373373 if repeating_same_error :
@@ -377,9 +377,7 @@ def set_error_to_scope_for_retry(
377377 "content" : error ,
378378 "defsite" : block_id ,
379379 }
380- scope = scope | {
381- "pdl_context" : pdl_context * SingletonContext (PdlDict (err_msg ))
382- }
380+ scope = scope | {"pdl_context" : pdl_context * SingletonContext (PdlDict (err_msg ))}
383381 return scope
384382
385383
@@ -418,7 +416,9 @@ def process_advanced_block(
418416 state , scope , block , loc
419417 )
420418 result = lazy_apply (id_with_set_first_use_nanos (block .pdl__timing ), result )
421- add_done_callback (id_with_set_first_use_nanos (block .pdl__timing ), background )
419+ add_done_callback (
420+ id_with_set_first_use_nanos (block .pdl__timing ), background
421+ )
422422 trace = trace .model_copy (update = {"pdl__result" : result })
423423 if block .parser is not None :
424424 # Use partial to create a function with fixed arguments
You can’t perform that action at this time.
0 commit comments