mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-15 06:54:45 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
72ad6dc953
commit
f4cd1ba0d6
813 changed files with 66015 additions and 58839 deletions
|
|
@ -1,12 +1,14 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
from typing import Generator
|
||||
|
||||
import pytest
|
||||
from _pytest.config import Config
|
||||
from _pytest.config.argparsing import Parser
|
||||
from _pytest.nodes import Item
|
||||
from _pytest.stash import StashKey
|
||||
import pytest
|
||||
|
||||
|
||||
fault_handler_original_stderr_fd_key = StashKey[int]()
|
||||
|
|
@ -15,10 +17,10 @@ fault_handler_stderr_fd_key = StashKey[int]()
|
|||
|
||||
def pytest_addoption(parser: Parser) -> None:
|
||||
help = (
|
||||
"Dump the traceback of all threads if a test takes "
|
||||
"more than TIMEOUT seconds to finish"
|
||||
'Dump the traceback of all threads if a test takes '
|
||||
'more than TIMEOUT seconds to finish'
|
||||
)
|
||||
parser.addini("faulthandler_timeout", help, default=0.0)
|
||||
parser.addini('faulthandler_timeout', help, default=0.0)
|
||||
|
||||
|
||||
def pytest_configure(config: Config) -> None:
|
||||
|
|
@ -66,7 +68,7 @@ def get_stderr_fileno() -> int:
|
|||
|
||||
|
||||
def get_timeout_config_value(config: Config) -> float:
|
||||
return float(config.getini("faulthandler_timeout") or 0.0)
|
||||
return float(config.getini('faulthandler_timeout') or 0.0)
|
||||
|
||||
|
||||
@pytest.hookimpl(wrapper=True, trylast=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue