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 Aug 22, 2024
1 parent ccb2162 commit d4d13af
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions jupyter_cache/cache/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit d4d13af

Please sign in to comment.