@@ -241,9 +241,17 @@ def _unwrap_oneof(node: Message) -> Message | None:
241241# parse function without consuming any tokens. These share the same parse
242242# offset as their inner message and must be skipped during offset matching.
243243_TRANSPARENT_WRAPPERS : set [str ] = {
244- "Declaration" , "Instruction" , "Formula" , "Construct" ,
245- "Write" , "Read" , "Data" ,
246- "Term" , "Type" , "RelTerm" , "Monoid" ,
244+ "Declaration" ,
245+ "Instruction" ,
246+ "Formula" ,
247+ "Construct" ,
248+ "Write" ,
249+ "Read" ,
250+ "Data" ,
251+ "Term" ,
252+ "Type" ,
253+ "RelTerm" ,
254+ "Monoid" ,
247255}
248256
249257
@@ -277,9 +285,7 @@ def _build_span_tree(provenance: dict[int, Any]) -> _SpanNode:
277285 Each span's children are the spans directly contained within it.
278286 Spans are sorted by start offset, with wider spans first for ties.
279287 """
280- sorted_items = sorted (
281- provenance .items (), key = lambda x : (x [0 ], - x [1 ].stop .offset )
282- )
288+ sorted_items = sorted (provenance .items (), key = lambda x : (x [0 ], - x [1 ].stop .offset ))
283289 sentinel = _SpanNode (- 1 , None )
284290 stack : list [tuple [_SpanNode , int ]] = [(sentinel , 2 ** 63 )]
285291 for offset , span in sorted_items :
0 commit comments