formatting
This commit is contained in:
@@ -1,22 +1,25 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from omegaconf import OmegaConf
|
||||
|
||||
from src.backend.database import Database
|
||||
|
||||
db = Database()
|
||||
config = OmegaConf.load("config.yaml")
|
||||
|
||||
def recreateFile(name, app_id, filetype, open=True)->Path:
|
||||
|
||||
def recreateFile(name, app_id, filetype, open=True) -> Path:
|
||||
"""
|
||||
recreateFile creates a file from the database and opens it in the respective program, if the open parameter is set to True.
|
||||
|
||||
|
||||
Args:
|
||||
----
|
||||
- name (str): The filename selected by the user.
|
||||
- app_id (str): the id of the apparatus.
|
||||
- filetype (str): the extension of the file to be created.
|
||||
- open (bool, optional): Determines if the file should be opened. Defaults to True.
|
||||
|
||||
|
||||
Returns:
|
||||
-------
|
||||
- Path: Absolute path to the file.
|
||||
@@ -30,4 +33,4 @@ def recreateFile(name, app_id, filetype, open=True)->Path:
|
||||
else:
|
||||
path = path.resolve()
|
||||
os.system(f"open {path}")
|
||||
return path
|
||||
return path
|
||||
|
||||
Reference in New Issue
Block a user