Skip to content

Commit

Permalink
Merge pull request #87 from tom-pollak/deepsource-fix-bfe09f6d
Browse files Browse the repository at this point in the history
Refactor unnecessary `else` / `elif` when `if` block has a `return` statement
  • Loading branch information
tom-pollak authored Jul 2, 2021
2 parents 9433c0b + 5edfcf3 commit 68989d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion matcher/race_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_position(venue, time, horse_name):
race_id = get_race_id(venue, time)
if race_id is None:
return "Rate limit exceeded"
elif isinstance(race_id, list):
if isinstance(race_id, list):
print("\nCourse not found: %s, %s\n%s" % (venue, time, race_id))
return None

Expand Down
5 changes: 2 additions & 3 deletions matcher/sites/sporting_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ def click_horse(driver, horse_name):
if cur_odd_price != "SUSP":
horse_button.click()
return True
else:
print("Horse is SUSP")
print("Horse is SUSP")
except WebDriverException:
pass
return False
Expand Down Expand Up @@ -272,7 +271,7 @@ def make_bet(driver, race, market_ids=None, selection_id=None, lay=False):
return make_bet(
driver, race, market_ids=market_ids, selection_id=selection_id, lay=lay
)
elif bet_made:
if bet_made:
return True

close_bet(driver)
Expand Down

0 comments on commit 68989d6

Please sign in to comment.