Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #59

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,39 +16,39 @@ 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
additional_dependencies:
["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]
1 change: 1 addition & 0 deletions jupyter_server_fileid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A Jupyter Server extension providing an implementation of the File ID service."""

from .extension import FileIdExtension

__version__ = "0.9.1"
Expand Down
4 changes: 1 addition & 3 deletions jupyter_server_fileid/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading