mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-30 06:30:37 -08:00
doc and style: formatted the whole codebase to pep8 plus added documentation where necessary
This commit is contained in:
@@ -9,6 +9,8 @@ Cache.register("data.anime", limit=20, timeout=600)
|
||||
|
||||
|
||||
class AnimeScreenController:
|
||||
"""The controller for the anime screen
|
||||
"""
|
||||
def __init__(self, model: AnimeScreenModel):
|
||||
self.model = model
|
||||
self.view = AnimeScreenView(controller=self, model=self.model)
|
||||
@@ -17,6 +19,12 @@ class AnimeScreenController:
|
||||
return self.view
|
||||
|
||||
def update_anime_view(self, id: int, caller_screen_name: str):
|
||||
"""method called to update the anime screen when a new
|
||||
|
||||
Args:
|
||||
id (int): the anilst id of the anime
|
||||
caller_screen_name (str): the screen thats calling this method; used internally to switch back to this screen
|
||||
"""
|
||||
if self.model.anime_id != id:
|
||||
if cached_anime_data := Cache.get("data.anime", f"{id}"):
|
||||
data = cached_anime_data
|
||||
|
||||
Reference in New Issue
Block a user