Skip to content

Commit

Permalink
fix: linters
Browse files Browse the repository at this point in the history
  • Loading branch information
cakeinsauce committed Sep 27, 2024
1 parent 9544695 commit d2c8713
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
4 changes: 1 addition & 3 deletions annotation/annotation/annotations/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ def row_to_dict(row) -> dict:
key: (
str(value)
if isinstance(value, UUID)
else value.isoformat()
if isinstance(value, datetime)
else value
else value.isoformat() if isinstance(value, datetime) else value
)
for key, value in row.__dict__.items()
if key != "_sa_instance_state"
Expand Down
25 changes: 9 additions & 16 deletions lib/badgerdoc_storage/src/badgerdoc_storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,31 +76,24 @@ def upload_obj(
target_path: str,
file: bytes,
content_type: Optional[str] = None,
overwrite: bool = False,
**kwargs: Any,
) -> None:
pass

def exists(self, target_path: str) -> bool:
...
def exists(self, target_path: str) -> bool: ...

def download(self, target_path: str, file: str) -> None:
...
def download(self, target_path: str, file: str) -> None: ...

def gen_signed_url(self, file: str, exp: int) -> str:
...
def gen_signed_url(self, file: str, exp: int) -> str: ...

def list_objects(self, target_path: str) -> List[str]:
...
def list_objects(self, target_path: str) -> List[str]: ...

def remove(self, file: str) -> None:
...
def remove(self, file: str) -> None: ...

def create_tenant_dir(self) -> bool:
...
def create_tenant_dir(self) -> bool: ...

@property
def tenant(self) -> str:
...
def tenant(self) -> str: ...


class BadgerDocS3Storage:
Expand Down Expand Up @@ -131,7 +124,7 @@ def upload_obj(
target_path: str,
file: bytes,
content_type: Optional[str] = None,
overwrite: bool = False,
**kwargs: Any,
) -> None:
params: Dict[str, Any] = {"Fileobj": file, "Key": target_path}
if content_type:
Expand Down

0 comments on commit d2c8713

Please sign in to comment.