Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2023
1 parent 9e9754c commit 2918c43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion filecluster/image_grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def move_files_to_cluster_folder(self):
if dir_name is None or isnan:
raise DateStringNoneException()
# instead, create dummy date
#dir_name = "XXXX_XX_XX"
# dir_name = "XXXX_XX_XX"

ut.create_folder_for_cluster(
config=self.config, date_string=dir_name, mode=mode
Expand Down
6 changes: 3 additions & 3 deletions filecluster/utlis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import base64
import hashlib
import logging
import math
import os
import sys
import time
Expand All @@ -15,7 +14,6 @@
from PIL import Image
from filecluster.configuration import Config
from filecluster.configuration import CopyMode
from filecluster.exceptions import DateStringNoneException

log_fmt = "%(levelname).1s %(message)s"
logging.basicConfig(format=log_fmt)
Expand Down Expand Up @@ -80,7 +78,9 @@ def create_folder_for_cluster(config: Config, date_string: str, mode: CopyMode):
if mode != CopyMode.NOP:
pth = Path(config.out_dir_name)
if not isinstance(date_string, str):
logger.error(f"Expected date string got: {date_string} of type: {type(date_string)}")
logger.error(
f"Expected date string got: {date_string} of type: {type(date_string)}"
)
dir_name = (
pth / date_string
) # fixme: can raise error: TypeError: unsupported operand type(s) for /: 'WindowsPath' and 'float'
Expand Down

0 comments on commit 2918c43

Please sign in to comment.