Art-em1s / csgoempire.py

Inconsistent return statements PYL-R1710
Style
Minor
a year agoa year old
Either all return statements in a function should return an expression, or none of them should.
36        self.deposit = Deposit(api_key, api_base_url)
37        self.can_refresh = False
38
39    def get_active_deposits(self):40        """
41        Retrieves a list of the user's active deposits.
42
Either all return statements in a function should return an expression, or none of them should.
63        else:
64            handle_error(status, response, "Deposits", "get_active_deposits")
65
66    def get_inventory(self, force_refresh=False):67        """
68        Retrieves the user's inventory.
69
Either all return statements in a function should return an expression, or none of them should.
 61    def __getattr__(self, attr):
 62        return self[attr]
 63
 64    def bid(self, item_id: int, amount: int): 65        """
 66        Place a bid on a listed item.
 67
Either all return statements in a function should return an expression, or none of them should.
15    def __getattr__(self, attr):
16        return self[attr]
17
18    def cancel(self):19        url = f"{self.api_base_url}trading/deposits/{self.id}/cancel"
20        response = requests.post(url, headers=self.headers)
21
Either all return statements in a function should return an expression, or none of them should.
27        else:
28            handle_error(status, response, "Deposit", "cancel")
29
30    def sell_now(self):31        url = f"{self.api_base_url}trading/deposits/{self.id}/sell"
32        response = requests.post(url, headers=self.headers)
33