#!/usr/bin/env python3
-from abc import ABC, abstractmethod
import atexit
import datetime
import enum
import functools
import logging
+from abc import ABC, abstractmethod
from typing import Any
import file_utils
return False
mtime = file_utils.get_file_mtime_as_datetime(filename)
- assert mtime
+ assert mtime is not None
now = datetime.datetime.now()
return mtime.month == now.month and mtime.day == now.day and mtime.year == now.year
return False
mtime = file_utils.get_file_mtime_as_datetime(filename)
- assert mtime
+ assert mtime is not None
now = datetime.datetime.now()
return (now - mtime).total_seconds() <= limit_seconds
self.instance = None
def __call__(self, cls: Persistent):
+ @functools.wraps(cls) # type: ignore
def _load(*args, **kwargs):
# If class has already been loaded, act like a singleton