KOSASIH / pi-nexus-autonomous-banking-network

Unnecessary else / elif used after return PYL-R1705
Style
Major
2 occurrences in this check
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
28            "Authorization": f"Bearer {access_token}",
29        }
30        response = requests.get(f"https://api.sidra.com/chain/data", headers=headers)
31        if response.status_code == 200:32            return response.json()
33        else:
34            return None
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
17            headers=headers,
18            json={"api_secret": self.api_secret},
19        )
20        if response.status_code == 200:21            return response.json()["access_token"]
22        else:
23            return None