KOSASIH / Galactic-Chain

Unnecessary else / elif used after return PYL-R1705
Style
Major
4 months ago4 months old
Unnecessary "elif" after "return", remove the leading "el" from "elif"
14        return private_key, public_key
15
16    def perform_operation(self, operation, params):
17        if operation == "add":18            point1 = self.decode_point(params["point1"])
19            point2 = self.decode_point(params["point2"])
20            result = point1 + point2
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
42
43        # Check if the combined hash meets the target difficulty
44        target_difficulty = self.blockchain.target_difficulty
45        if int(combined_hash, 16) < target_difficulty:46            return True
47        else:
48            return False