Skip to content

Commit 4836e71

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent b92febf commit 4836e71

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

stdlib/profiling/sampling/binary_collector.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ class BinaryCollector(Collector):
1212
filename: str
1313
sample_interval_usec: int
1414
skip_idle: bool
15-
def __init__(self, filename: str, sample_interval_usec: int, *, skip_idle: bool = False, compression: str = "auto") -> None: ...
15+
def __init__(
16+
self, filename: str, sample_interval_usec: int, *, skip_idle: bool = False, compression: str = "auto"
17+
) -> None: ...
1618
def collect(self, stack_frames: Any, timestamp_us: int | None = None) -> None: ...
1719
def collect_failed_sample(self) -> None: ...
1820
def export(self, filename: StrOrBytesPath | None = None) -> None: ...

stdlib/profiling/sampling/heatmap_collector.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import StrOrBytesPath
22
from collections import Counter
3-
from dataclasses import dataclass, field
3+
from dataclasses import dataclass
44
from typing import Any
55

66
from ._css_utils import get_combined_css as get_combined_css
@@ -23,10 +23,10 @@ class FileStats:
2323

2424
@dataclass
2525
class TreeNode:
26-
files: list[FileStats] = field(default_factory=list)
26+
files: list[FileStats] = ...
2727
samples: int = ...
2828
count: int = ...
29-
children: dict[str, "TreeNode"] = field(default_factory=dict)
29+
children: dict[str, TreeNode] = ...
3030

3131
def get_python_path_info() -> dict[str, Any]: ...
3232
def extract_module_name(filename: str, path_info: dict[str, Any]) -> str: ...

stdlib/profiling/sampling/live_collector/__init__.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
from .collector import LiveStatsCollector as LiveStatsCollector
22
from .constants import (
3+
COL_SPACING as COL_SPACING,
4+
COL_WIDTH_NSAMPLES as COL_WIDTH_NSAMPLES,
5+
COL_WIDTH_SAMPLE_PCT as COL_WIDTH_SAMPLE_PCT,
6+
COL_WIDTH_TIME as COL_WIDTH_TIME,
37
COLOR_PAIR_CYAN as COLOR_PAIR_CYAN,
48
COLOR_PAIR_GREEN as COLOR_PAIR_GREEN,
59
COLOR_PAIR_HEADER_BG as COLOR_PAIR_HEADER_BG,
610
COLOR_PAIR_MAGENTA as COLOR_PAIR_MAGENTA,
711
COLOR_PAIR_RED as COLOR_PAIR_RED,
812
COLOR_PAIR_SORTED_HEADER as COLOR_PAIR_SORTED_HEADER,
913
COLOR_PAIR_YELLOW as COLOR_PAIR_YELLOW,
10-
COL_SPACING as COL_SPACING,
11-
COL_WIDTH_NSAMPLES as COL_WIDTH_NSAMPLES,
12-
COL_WIDTH_SAMPLE_PCT as COL_WIDTH_SAMPLE_PCT,
13-
COL_WIDTH_TIME as COL_WIDTH_TIME,
1414
DEFAULT_DISPLAY_LIMIT as DEFAULT_DISPLAY_LIMIT,
1515
DEFAULT_SORT_BY as DEFAULT_SORT_BY,
1616
DISPLAY_UPDATE_HZ as DISPLAY_UPDATE_HZ,

stdlib/profiling/sampling/live_collector/collector.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import curses
22
from _typeshed import StrOrBytesPath
3-
from dataclasses import dataclass, field
3+
from dataclasses import dataclass
44
from typing import Any
55

66
from ..collector import Collector as Collector, extract_lineno as extract_lineno
@@ -49,7 +49,7 @@ from .widgets import (
4949
@dataclass
5050
class ThreadData:
5151
thread_id: int
52-
result: dict[Any, Any] = field(default_factory=dict)
52+
result: dict[Any, Any] = ...
5353
has_gil: int = ...
5454
on_cpu: int = ...
5555
gil_requested: int = ...
@@ -58,7 +58,7 @@ class ThreadData:
5858
total: int = ...
5959
sample_count: int = ...
6060
gc_frame_samples: int = ...
61-
opcode_stats: dict[Any, Any] = field(default_factory=dict)
61+
opcode_stats: dict[Any, Any] = ...
6262
def increment_status_flag(self, status_flags: int) -> None: ...
6363
def as_status_dict(self) -> dict[str, int]: ...
6464

stdlib/profiling/sampling/live_collector/widgets.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ class Widget(ABC, metaclass=abc.ABCMeta):
4343

4444
class ProgressBarWidget(Widget):
4545
def render(self, line: int, width: int, **kwargs: Any) -> None: ...
46-
def render_bar(self, filled: float, total: float, max_width: int, fill_char: str = "█", empty_char: str = "░") -> tuple[str, int]: ...
46+
def render_bar(
47+
self, filled: float, total: float, max_width: int, fill_char: str = "█", empty_char: str = "░"
48+
) -> tuple[str, int]: ...
4749

4850
class HeaderWidget(Widget):
4951
collector: LiveStatsCollector

stdlib/profiling/sampling/pstats_collector.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ class PstatsCollector(Collector):
1414
def collect(self, stack_frames: Any, timestamps_us: list[int] | None = None) -> None: ...
1515
def export(self, filename: StrOrBytesPath) -> None: ...
1616
def create_stats(self) -> None: ...
17-
def print_stats(self, sort: str | int = -1, limit: int | None = None, show_summary: bool = True, mode: int | None = None) -> None: ...
17+
def print_stats(
18+
self, sort: str | int = -1, limit: int | None = None, show_summary: bool = True, mode: int | None = None
19+
) -> None: ...

stdlib/profiling/tracing/_utils.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ class _Utils:
55
profiler: type[Any]
66
def __init__(self, profiler: type[Any]) -> None: ...
77
def run(self, statement: str, filename: str | None, sort: str | int) -> None: ...
8-
def runctx(self, statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None, sort: str | int) -> None: ...
8+
def runctx(
9+
self, statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None, sort: str | int
10+
) -> None: ...

0 commit comments

Comments
 (0)