mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-13 14:24:18 +00:00
detect_gcp_credentials hook
This commit is contained in:
parent
b73acb198e
commit
e0c61d89d0
929 changed files with 311695 additions and 0 deletions
|
|
@ -0,0 +1,46 @@
|
|||
__all__ = [
|
||||
"BaseExceptionGroup",
|
||||
"ExceptionGroup",
|
||||
"catch",
|
||||
"format_exception",
|
||||
"format_exception_only",
|
||||
"print_exception",
|
||||
"print_exc",
|
||||
"suppress",
|
||||
]
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from ._catch import catch
|
||||
from ._version import version as __version__ # noqa: F401
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from ._exceptions import BaseExceptionGroup, ExceptionGroup
|
||||
from ._formatting import (
|
||||
format_exception,
|
||||
format_exception_only,
|
||||
print_exc,
|
||||
print_exception,
|
||||
)
|
||||
|
||||
if os.getenv("EXCEPTIONGROUP_NO_PATCH") != "1":
|
||||
from . import _formatting # noqa: F401
|
||||
|
||||
BaseExceptionGroup.__module__ = __name__
|
||||
ExceptionGroup.__module__ = __name__
|
||||
else:
|
||||
from traceback import (
|
||||
format_exception,
|
||||
format_exception_only,
|
||||
print_exc,
|
||||
print_exception,
|
||||
)
|
||||
|
||||
BaseExceptionGroup = BaseExceptionGroup
|
||||
ExceptionGroup = ExceptionGroup
|
||||
|
||||
if sys.version_info < (3, 12, 1):
|
||||
from ._suppress import suppress
|
||||
else:
|
||||
from contextlib import suppress
|
||||
Loading…
Add table
Add a link
Reference in a new issue