diff --git a/personalBestCache.py b/personalBestCache.py index 3a382598..b06fbf89 100644 --- a/personalBestCache.py +++ b/personalBestCache.py @@ -6,7 +6,8 @@ class cacheMiss(Exception): pass class personalBestCache: - def get(self, userID, fileMd5, country=False, friends=False, mods=-1): + @staticmethod + def get(userID, fileMd5, country=False, friends=False, mods=-1): """ Get cached personal best rank @@ -42,7 +43,8 @@ def get(self, userID, fileMd5, country=False, friends=False, mods=-1): log.debug("personalBestCache miss") return 0 - def set(self, userID, rank, fileMd5, country=False, friends=False, mods=-1): + @staticmethod + def set(userID, rank, fileMd5, country=False, friends=False, mods=-1): """ Set userID's redis personal best cache diff --git a/tomejerry.py b/tomejerry.py index 666d9fe8..21cc317b 100644 --- a/tomejerry.py +++ b/tomejerry.py @@ -219,7 +219,8 @@ def recycle(self, start: bool=True): if start: self.threaded_work() - def recalc_score(self, score_data: Dict) -> score: + @staticmethod + def recalc_score(score_data: Dict) -> score: """ Recalculates pp for a score diff --git a/userStatsCache.py b/userStatsCache.py index c26b75df..35ce6523 100644 --- a/userStatsCache.py +++ b/userStatsCache.py @@ -24,7 +24,8 @@ def get(self, userID, gameMode): retData = json.loads(data.decode("utf-8")) return retData - def update(self, userID, gameMode, data = None): + @staticmethod + def update(userID, gameMode, data = None): """ Update cached user stats in redis with new values