File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ def __call__(
230230 # in pyproject.toml, then we can use it as a default;
231231 # otherwise look for a -a/--app option.
232232 if len (self .apps ) == 1 :
233- app = list ( self .apps .values ())[ 0 ]
233+ app = next ( iter ( self .apps .values ()))
234234 elif appname :
235235 try :
236236 app = self .apps [appname ]
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ def __call__(
278278 # in pyproject.toml, then we can use it as a default;
279279 # otherwise look for a -a/--app option.
280280 if len (self .apps ) == 1 :
281- app = list ( self .apps .values ())[ 0 ]
281+ app = next ( iter ( self .apps .values ()))
282282 elif appname :
283283 try :
284284 app = self .apps [appname ]
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def select_target_device(self, udid_or_device=None):
213213 if len (simulators ) == 0 :
214214 raise BriefcaseCommandError ("No iOS simulators available." )
215215 elif len (simulators ) == 1 :
216- iOS_tag = list ( simulators .keys ())[ 0 ]
216+ iOS_tag = next ( iter ( simulators .keys ()))
217217 else :
218218 iOS_tag = self .console .selection_question (
219219 intro = "Select iOS version:" ,
@@ -226,7 +226,7 @@ def select_target_device(self, udid_or_device=None):
226226 if len (devices ) == 0 :
227227 raise BriefcaseCommandError (f"No simulators available for { iOS_tag } ." )
228228 elif len (devices ) == 1 :
229- udid = list ( devices .keys ())[ 0 ]
229+ udid = next ( iter ( devices .keys ()))
230230 else :
231231 udid = self .console .selection_question (
232232 intro = "Select simulator device to use:" ,
You can’t perform that action at this time.
0 commit comments