Art-em1s / csgoempire.py

Unnecessary else / elif used after return PYL-R1705
Style
Major
a year agoa year old
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
56        active_deposits = []
57        app = active_deposits.append
58
59        if status == 200:60            for item in response['data']['deposits']:
61                app(Deposit(self.api_key, self.api_base_url, item))
62            return active_deposits
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
87        inventory = []
88        app = inventory.append
89
90        if status == 200:91            self.can_refresh = response['allowUpdate']
92            for item in response['data']:
93                # skip any invalid items or items that are not tradable
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
 79        status = response.status_code
 80        response = response.json()
 81
 82        if status == 200: 83            return True
 84        else:
 85            handle_error(status, response, "Withdrawal", "bid")
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
34        status = response.status_code
35        response = response.json()
36
37        if status == 200:38            return True
39        else:
40            handle_error(status, response, "Deposit", "sell_now")
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
48        status = response.status_code
49        response = response.json()
50
51        if status == 200:52            return True
53        else:
54            handle_error(status, response, "Deposit", "list_item")