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 #889

Merged
merged 2 commits into from
Oct 6, 2023
Merged
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
args:
Expand Down
8 changes: 5 additions & 3 deletions pyfakefs/fake_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def getmtime(self, path: AnyStr) -> float:
file_obj = self.filesystem.resolve(path)
return file_obj.st_mtime
except OSError:
self.filesystem.raise_os_error(errno.ENOENT, winerror=3)
self.filesystem.raise_os_error(
errno.ENOENT, winerror=3
) # pytype: disable=bad-return-type

def getatime(self, path: AnyStr) -> float:
"""Returns the last access time of the fake file.
Expand All @@ -242,7 +244,7 @@ def getatime(self, path: AnyStr) -> float:
file_obj = self.filesystem.resolve(path)
except OSError:
self.filesystem.raise_os_error(errno.ENOENT)
return file_obj.st_atime
return file_obj.st_atime # pytype: disable=name-error

def getctime(self, path: AnyStr) -> float:
"""Returns the creation time of the fake file.
Expand All @@ -261,7 +263,7 @@ def getctime(self, path: AnyStr) -> float:
file_obj = self.filesystem.resolve(path)
except OSError:
self.filesystem.raise_os_error(errno.ENOENT)
return file_obj.st_ctime
return file_obj.st_ctime # pytype: disable=name-error

def abspath(self, path: AnyStr) -> AnyStr:
"""Return the absolute version of a path."""
Expand Down
Loading