style: exit early to reduce indentation

This commit is contained in:
Paul McCarthy
2022-04-19 16:00:12 +01:00
parent 30627ae04f
commit baf3ead650
2 changed files with 29 additions and 25 deletions
+3 -1
View File
@@ -275,8 +275,10 @@ def build(options: Options, tmp_path: Path) -> None:
options.globals.build_selector, options.globals.architectures options.globals.build_selector, options.globals.architectures
) )
if len(python_configurations) == 0:
return
try: try:
if len(python_configurations) > 0:
before_all_options_identifier = python_configurations[0].identifier before_all_options_identifier = python_configurations[0].identifier
before_all_options = options.build_options(before_all_options_identifier) before_all_options = options.build_options(before_all_options_identifier)
+3 -1
View File
@@ -234,8 +234,10 @@ def build(options: Options, tmp_path: Path) -> None:
options.globals.build_selector, options.globals.architectures options.globals.build_selector, options.globals.architectures
) )
if len(python_configurations) == 0:
return
try: try:
if len(python_configurations) > 0:
before_all_options_identifier = python_configurations[0].identifier before_all_options_identifier = python_configurations[0].identifier
before_all_options = options.build_options(before_all_options_identifier) before_all_options = options.build_options(before_all_options_identifier)