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 Apr 1, 2024
1 parent 7154552 commit 4fd6837
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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 @@ -642,9 +642,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

0 comments on commit 4fd6837

Please sign in to comment.