Refactory of the code (#19)

* Refactory of the code

* Autoformatting with black

---------

Co-authored-by: Domefemia <domefemia@hotmail.com>
This commit is contained in:
Domenico
2023-03-24 20:26:55 +01:00
committed by GitHub
parent df45ef411a
commit 053d5791a4
11 changed files with 34 additions and 53 deletions

View File

@@ -84,9 +84,7 @@ def bottles_parser(parent_widget, action):
_("Set Bottles Location"),
).connect("response", response)
if os.path.isfile(os.path.join(bottles_dir, "library.yml")):
pass
else:
if not os.path.isfile(os.path.join(bottles_dir, "library.yml")):
bottles_not_found()
return {}
@@ -137,7 +135,7 @@ def bottles_parser(parent_widget, action):
bottles_games[values["game_id"]] = values
if len(bottles_games) == 0:
if not bottles_games:
create_dialog(
parent_widget,
_("No Games Found"),