add : docstring added to save_fig_file.

pull/58/head
sadrasabouri 2021-10-15 18:42:45 +03:30
rodzic 25004edf97
commit 9780de2c90
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -121,13 +121,15 @@ def save_fig_file(figure, file_adr, depth):
:type figure: matplotlib.figure.Figure
:param file_adr: file addresses
:type file_adr: str
:param depth: image depth
:type depth: float
:return: result as dict
"""
if figure is None:
return {"status": False, "message": NO_FIG_ERROR_MESSAGE}
result = {"status": True, "message": FIG_SAVE_SUCCESS_MESSAGE}
try:
figure.savefig(file_adr,dpi=depth*figure.dpi)
figure.savefig(file_adr, dpi=depth * figure.dpi)
return result
except Exception as e:
result["status"] = False