diff --git a/jupyter_cache/cache/db.py b/jupyter_cache/cache/db.py index fd5cfc7..a2d9ba7 100644 --- a/jupyter_cache/cache/db.py +++ b/jupyter_cache/cache/db.py @@ -128,7 +128,9 @@ class NbProjectRecord(OrmBase): """A list of file assets required for the notebook to run.""" exec_data = Column(JSON(), nullable=True) """Data on how to execute the notebook.""" - created = Column(DateTime, nullable=False, default=lambda: datetime.datetime.now(datetime.UTC) ) + created = Column( + DateTime, nullable=False, default=lambda: datetime.datetime.now(datetime.UTC) + ) traceback = Column(Text(), nullable=True, default="") """A traceback is added if a notebook fails to execute fully.""" @@ -288,9 +290,14 @@ class NbCacheRecord(OrmBase): description = Column(String(255), nullable=False, default="") data = Column(JSON()) """Extra data, such as the execution time.""" - created = Column(DateTime, nullable=False, default=lambda: datetime.datetime.now(datetime.UTC)) + created = Column( + DateTime, nullable=False, default=lambda: datetime.datetime.now(datetime.UTC) + ) accessed = Column( - DateTime, nullable=False, default=lambda: datetime.datetime.now(datetime.UTC), onupdate=lambda: datetime.datetime.now(datetime.UTC) + DateTime, + nullable=False, + default=lambda: datetime.datetime.now(datetime.UTC), + onupdate=lambda: datetime.datetime.now(datetime.UTC), ) def __repr__(self):