diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82da2a76..6310070a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.14 + rev: v0.15.4 hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/myst_nb/ext/execution_tables.py b/myst_nb/ext/execution_tables.py index 63b67137..7beaacc9 100644 --- a/myst_nb/ext/execution_tables.py +++ b/myst_nb/ext/execution_tables.py @@ -94,9 +94,9 @@ def run(self, **kwargs) -> None: } _key2transform: dict[str, Callable[[Any], str]] = { - "mtime": lambda x: datetime.fromtimestamp(x).strftime("%Y-%m-%d %H:%M") - if x - else "", + "mtime": lambda x: ( + datetime.fromtimestamp(x).strftime("%Y-%m-%d %H:%M") if x else "" + ), "method": str, "runtime": lambda x: "-" if x is None else str(round(x, 2)), "succeeded": lambda x: "✅" if x is True else "❌",