-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path_report.pyi
More file actions
82 lines (69 loc) · 2.24 KB
/
_report.pyi
File metadata and controls
82 lines (69 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File generated with docstub
import dataclasses
import logging
from pathlib import Path
from textwrap import indent
from typing import Any, ClassVar, Literal, Self, TextIO
import click
from ._cli_help import should_strip_ansi
from ._utils import naive_natsort_key
logger: logging.Logger
@dataclasses.dataclass(kw_only=True, slots=True, frozen=True)
class ContextReporter:
logger: logging.Logger
path: Path | None = ...
line: int | None = ...
def copy_with(
self,
*,
logger: logging.Logger | None = ...,
path: Path | None = ...,
line: int | None = ...,
line_offset: int | None = ...
) -> Self: ...
def report(
self,
short: str,
*args: Any,
log_level: int,
details: str | None = ...,
**log_kw: Any
) -> None: ...
def debug(
self, short: str, *args: Any, details: str | None = ..., **log_kw: Any
) -> None: ...
def info(
self, short: str, *args: Any, details: str | None = ..., **log_kw: Any
) -> None: ...
def warn(
self, short: str, *args: Any, details: str | None = ..., **log_kw: Any
) -> None: ...
def error(
self, short: str, *args: Any, details: str | None = ..., **log_kw: Any
) -> None: ...
def critical(
self, short: str, *args: Any, details: str | None = ..., **log_kw: Any
) -> None: ...
def __post_init__(self) -> None: ...
@staticmethod
def underline(line: str, *, char: str = ...) -> str: ...
class ReportHandler(logging.StreamHandler):
group_errors: bool
error_count: int
warning_count: int
level_to_color: ClassVar[dict[int, str]]
def __init__(
self, stream: TextIO | None = ..., group_errors: bool = ...
) -> None: ...
def format(self, record: logging.LogRecord) -> str: ...
def handle(self, record: logging.LogRecord) -> bool: ...
def emit_grouped(self) -> None: ...
class LogCounter(logging.NullHandler):
critical_count: int
error_count: int
warning_count: int
def __init__(self) -> None: ...
def handle(self, record: logging.LogRecord) -> bool: ...
def setup_logging(
*, verbosity: Literal[-2, -1, 0, 1, 2, 3], group_errors: bool
) -> tuple[ReportHandler, LogCounter]: ...