Fix linting

This commit is contained in:
Enzo Martin
2023-06-18 10:34:35 +02:00
parent 2f2fef50fe
commit 8b3862d94d
3 changed files with 20 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
from dataclasses import dataclass
from pathlib import Path
# This class represents a simple database that stores its data as files in a directory.
# It supports both text and binary files, and can handle directory structures.
class DB:
@@ -18,7 +19,7 @@ class DB:
# Check if the file exists before trying to open it.
if full_path.is_file():
# Open the file in text mode and return its content.
with full_path.open('r') as f:
with full_path.open("r") as f:
return f.read()
else:
# If the file doesn't exist, raise an error.
@@ -49,4 +50,4 @@ class DBs:
logs: DB
identity: DB
input: DB
workspace: DB
workspace: DB