From 03535d3e8d2bf822c0623f4a39fe2ffd45743510 Mon Sep 17 00:00:00 2001 From: Scoder12 <34356756+Scoder12@users.noreply.github.com> Date: Tue, 28 Jul 2020 12:12:15 -0700 Subject: [PATCH] Add docstrings --- src/replit/maqpy/files.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/replit/maqpy/files.py b/src/replit/maqpy/files.py index b4a55ea..ce3a874 100644 --- a/src/replit/maqpy/files.py +++ b/src/replit/maqpy/files.py @@ -6,6 +6,7 @@ class FileCache: """A simple cache for files.""" def __init__(self) -> None: + """Initialize the class.""" self.data = {} def add_to_cache(self, filename: str, content: str) -> None: @@ -51,6 +52,13 @@ class File(flask.Response): """Represents a static file.""" def __init__(self, filename: str, no_cache: bool = False) -> None: + """Initialize the file. + + Args: + filename (str): The filename to read from. + no_cache (bool): Whether to skip caching the file. Defaults to + False. + """ self.filename = str(filename) self.no_cache = no_cache