Skip to content

Commit

Permalink
Unnecessary "else" after "return", remove the "else"
Browse files Browse the repository at this point in the history
  • Loading branch information
emcek committed Dec 3, 2023
1 parent b481ff3 commit 3028550
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions dcspy/qt_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ def _is_dir_exists(self, text: str, widget_name: str) -> bool:
if dir_exists:
getattr(self, widget_name).setStyleSheet('')
return True
else:
getattr(self, widget_name).setStyleSheet('color: red;')
return False
getattr(self, widget_name).setStyleSheet('color: red;')
return False

def _is_dir_dcs_bios(self, text: Union[Path, str], widget_name: str) -> bool:
"""
Expand All @@ -332,9 +331,8 @@ def _is_dir_dcs_bios(self, text: Union[Path, str], widget_name: str) -> bool:
if all([text.is_dir(), bios_lua.is_file(), metadata_json.is_file()]):
getattr(self, widget_name).setStyleSheet('')
return True
else:
getattr(self, widget_name).setStyleSheet('color: red;')
return False
getattr(self, widget_name).setStyleSheet('color: red;')
return False

# <=><=><=><=><=><=><=><=><=><=><=> g-keys tab <=><=><=><=><=><=><=><=><=><=><=>
def _load_table_gkeys(self) -> None:
Expand Down Expand Up @@ -584,9 +582,8 @@ def _is_git_object_exists(self, text: str) -> bool:
self.le_bios_live.setStyleSheet('')
self._set_completer_for_git_ref()
return True
else:
self.le_bios_live.setStyleSheet('color: red;')
return False
self.le_bios_live.setStyleSheet('color: red;')
return False

def _get_bios_full_version(self, silence=True) -> str:
"""
Expand Down

0 comments on commit 3028550

Please sign in to comment.