mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
fixes for mypy 1.11
This commit is contained in:
parent
88317ddb34
commit
a68a19d217
3 changed files with 10 additions and 21 deletions
|
|
@ -205,7 +205,7 @@ else: # pragma: no cover
|
|||
def _handle_readonly(
|
||||
func: Callable[[str], object],
|
||||
path: str,
|
||||
exc: Exception,
|
||||
exc: BaseException,
|
||||
) -> None:
|
||||
if (
|
||||
func in (os.rmdir, os.remove, os.unlink) and
|
||||
|
|
@ -223,7 +223,7 @@ if sys.version_info < (3, 12): # pragma: <3.12 cover
|
|||
def _handle_readonly_old(
|
||||
func: Callable[[str], object],
|
||||
path: str,
|
||||
excinfo: tuple[type[Exception], Exception, TracebackType],
|
||||
excinfo: tuple[type[BaseException], BaseException, TracebackType],
|
||||
) -> None:
|
||||
return _handle_readonly(func, path, excinfo[1])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue