11from http import HTTPStatus
22from pathlib import Path
3- from typing import Any , Generic , List , Optional , Sequence , Tuple , TypeVar , Union
3+ from typing import Any , Dict , Generic , List , Optional , Sequence , Tuple , TypeVar , Union
44
55import click
66from tabulate import tabulate
@@ -29,7 +29,7 @@ class SubsetResult(SubsetResultBase):
2929 duration_sec : float
3030
3131 @classmethod
32- def from_inspect_api (cls , result : dict [str , Any ], order : int ) -> "SubsetResult" :
32+ def from_inspect_api (cls , result : Dict [str , Any ], order : int ) -> "SubsetResult" :
3333 test_path = result .get ("testPath" , []) or []
3434 name = unparse_test_path (test_path )
3535 density = float (result .get ("density" ) or 0.0 )
@@ -125,7 +125,7 @@ def subsets(context: click.core.Context, file_before, file_after, subset_id_befo
125125
126126 if from_subset_id :
127127
128- client = LaunchableClient (app = context )
128+ client = LaunchableClient (app = context . obj )
129129 # for type check
130130 assert subset_id_before is not None and subset_id_after is not None
131131 _from_subset_ids (client = client , subset_id_before = subset_id_before , subset_id_after = subset_id_after )
@@ -152,7 +152,7 @@ def _from_subset_ids(client: LaunchableClient, subset_id_before: int, subset_id_
152152 for result in after_subset .results :
153153 total += 1
154154 if result .reason .startswith ("Changed file: " ):
155- affected .add (result .reason . removeprefix ("Changed file: " ))
155+ affected .add (result .reason [ len ("Changed file: " ):] )
156156
157157 test_name = result .name
158158 after_order = result .order
0 commit comments