chore(code): Format code

This commit is contained in:
Marty Oehme 2024-02-14 16:02:21 +01:00
parent b0f7f49ebc
commit 72e11a67d7
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 10 additions and 5 deletions

View file

@ -54,11 +54,13 @@ def calculate_validities(
return vd return vd
if __name__ == "__main__": if __name__ == "__main__":
import sys import sys
import load_data import load_data
from pathlib import Path from pathlib import Path
from io import StringIO from io import StringIO
if len(sys.argv) == 2: if len(sys.argv) == 2:
df = load_data.from_yml(Path(sys.argv[1])) df = load_data.from_yml(Path(sys.argv[1]))
else: else:

View file

@ -1,12 +1,14 @@
import io import io
from pathlib import Path
import sys import sys
try: from pathlib import Path
import src.yml as yaml # for quarto document scripts
except ModuleNotFoundError:
import yml as yaml # for directly running the package
from pandas import DataFrame, read_csv from pandas import DataFrame, read_csv
try:
import src.yml as yaml # for quarto document scripts
except ModuleNotFoundError:
import yml as yaml # for directly running the package
DEFAULT_YAML_PATH = Path("02-data/processed") DEFAULT_YAML_PATH = Path("02-data/processed")
@ -43,6 +45,7 @@ if __name__ == "__main__":
res = from_yml() res = from_yml()
from io import StringIO from io import StringIO
output = StringIO() output = StringIO()
res.to_csv(output) res.to_csv(output)
output.seek(0) output.seek(0)