From ff9101882e90aaaef82f8e618383f1ef2563c24f Mon Sep 17 00:00:00 2001 From: "James P. Imes" Date: Tue, 24 Jan 2023 14:47:24 -0700 Subject: [PATCH] clarify save method docstrings --- production_analyzer/data_loader.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/production_analyzer/data_loader.py b/production_analyzer/data_loader.py index c0d01ae..9458a4e 100644 --- a/production_analyzer/data_loader.py +++ b/production_analyzer/data_loader.py @@ -411,8 +411,11 @@ def get_html(self, url) -> str: def save_html(self, txt, fp): """ - Save the HTML to the specified filename (if ``.save_html_dir`` - has been configured). + Save the HTML (``txt``) to the specified filepath (``fp``). + + .. warning:: + + This will overwrite any file at ``fp`` without warning. """ fp = Path(fp) os.makedirs(fp.parent, exist_ok=True) @@ -423,7 +426,12 @@ def save_html(self, txt, fp): def save_csv(self, df, fp) -> None: """ - Save the production ``DataFrame`` to .csv. + Save the production ``DataFrame`` (``df``) to .csv at the + specified filepath ``fp``. + + .. warning:: + + This will overwrite any file at ``fp`` without warning. """ fp = Path(fp) os.makedirs(fp.parent, exist_ok=True)