From 944ae350e652f3139361d0abc49a2c39a205dd27 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:32:13 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.6.0) - [github.com/psf/black: 23.1.0 → 24.4.0](https://github.com/psf/black/compare/23.1.0...24.4.0) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) - [github.com/pre-commit/mirrors-mypy: v1.0.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.0...v1.9.0) - [github.com/asottile/pyupgrade: v3.3.1 → v3.15.2](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.15.2) - [github.com/john-hen/Flake8-pyproject: 1.2.2 → 1.2.3](https://github.com/john-hen/Flake8-pyproject/compare/1.2.2...1.2.3) - [github.com/python-jsonschema/check-jsonschema: 0.21.0 → 0.28.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.21.0...0.28.2) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc31a28..e58aa8f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: check-case-conflict @@ -16,31 +16,31 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 24.4.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: ["--profile", "black"] files: \.py$ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.0.0 + rev: v1.9.0 hooks: - id: mypy additional_dependencies: [types-requests] - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.15.2 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/john-hen/Flake8-pyproject - rev: 1.2.2 + rev: 1.2.3 hooks: - id: Flake8-pyproject alias: flake8 @@ -48,7 +48,7 @@ repos: ["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.21.0 + rev: 0.28.2 hooks: - id: check-github-workflows stages: [manual] From 438a50044292484b9636565a6942b88f83025d67 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:32:27 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- jupyter_server_fileid/__init__.py | 1 + jupyter_server_fileid/manager.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/jupyter_server_fileid/__init__.py b/jupyter_server_fileid/__init__.py index a05208e..a7f6a23 100644 --- a/jupyter_server_fileid/__init__.py +++ b/jupyter_server_fileid/__init__.py @@ -1,4 +1,5 @@ """A Jupyter Server extension providing an implementation of the File ID service.""" + from .extension import FileIdExtension __version__ = "0.9.1" diff --git a/jupyter_server_fileid/manager.py b/jupyter_server_fileid/manager.py index 7887bb8..6872e75 100644 --- a/jupyter_server_fileid/manager.py +++ b/jupyter_server_fileid/manager.py @@ -641,9 +641,7 @@ def _parse_raw_stat(self, raw_stat): raw_stat.st_ctime_ns if os.name == "nt" # st_birthtime_ns is not supported, so we have to compute it manually - else int(raw_stat.st_birthtime * 1e9) - if hasattr(raw_stat, "st_birthtime") - else None + else int(raw_stat.st_birthtime * 1e9) if hasattr(raw_stat, "st_birthtime") else None ) stat_info.mtime = raw_stat.st_mtime_ns stat_info.is_dir = stat.S_ISDIR(raw_stat.st_mode)