File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -406,25 +406,25 @@ def group_columns(
406406 cls , columns : List [str ], sep : str = "/" , depth : int = 2
407407 ) -> List [List [str ]]:
408408 """Groups columns to have nice display."""
409- res = {}
409+ res : Dict [ str , List [ str ]] = {}
410410 for c in columns :
411411 p = c .split ("/" )
412412 k = "/" .join (p [:depth ])
413413 if k not in res :
414414 res [k ] = []
415415 res [k ].append (c )
416- new_res = {}
416+ new_res : Dict [ str , List [ str ]] = {}
417417 for k , v in res .items ():
418418 if len (v ) >= 3 :
419419 new_res [k ] = v
420420 else :
421421 if "0" not in new_res :
422422 new_res ["0" ] = []
423423 new_res ["0" ].extend (v )
424- groups = [sorted (v ) for k , v in sorted (new_res .items ())]
424+ groups : List [ List [ str ]] = [sorted (v ) for k , v in sorted (new_res .items ())]
425425 if depth <= 1 :
426426 return groups
427- new_groups = []
427+ new_groups : List [ List [ str ]] = []
428428 for v in groups :
429429 if len (v ) >= 6 :
430430 v = cls .group_columns (v , depth = 1 , sep = sep )
You can’t perform that action at this time.
0 commit comments