mtime = file_utils.get_file_mtime_as_datetime(filename)
now = datetime.datetime.now()
- return (
- mtime.month == now.month
- and mtime.day == now.day
- and mtime.year == now.year
- )
+ return mtime.month == now.month and mtime.day == now.day and mtime.year == now.year
def was_file_written_within_n_seconds(
# Otherwise, try to load it from persisted state.
was_loaded = False
- logger.debug(
- f'Attempting to load {cls.__name__} from persisted state.'
- )
+ logger.debug(f'Attempting to load {cls.__name__} from persisted state.')
self.instance = cls.load()
if not self.instance:
msg = 'Loading from cache failed.'
logger.warning(msg)
- logger.debug(
- f'Attempting to instantiate {cls.__name__} directly.'
- )
+ logger.debug(f'Attempting to instantiate {cls.__name__} directly.')
self.instance = cls(*args, **kwargs)
else:
logger.debug(