QuackatronHQ / Gigarepo

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
a month ago2 years old
Method doesn't use the class instance and could be converted into a static method
 9        self.html = "<h1>Hello world!</h1>"
10        self.config = self.load_config()
11
12    def load_config(self):13        with open("C:\config.json") as file:
14            file_contents = file.read()
15            config = json.loads(file_contents)
Method doesn't use the class instance and could be converted into a static method
 38    def limits(self):
 39        return self.limits
 40
 41    def get_number(self, min_max=[1, 10]): 42        """Get a random number between min and max."""
 43        assert all([isinstance(i, int) for i in min_max])
 44        return random.randint(*min_max)
Method doesn't use the class instance and could be converted into a static method
 18    def __init__(self):
 19        self.limits = (1, 10)
 20
 21    def get_number(self, min_max): 22        raise NotImplemented
 23
 24    def smethod():