MCPcopy Index your code
hub / github.com/idank/explainshell / empty

Method empty

explainshell/extraction/report.py:72–87  ·  view source on GitHub ↗

Zero-everything summary, used when the histogram is unavailable. Old reports written before option-count tracking existed migrate to this shape rather than ``null`` so analysis tools can rely on the field always being a populated struct.

(cls)

Source from the content-addressed store, hash-verified

70
71 @classmethod
72 def empty(cls) -> OptionCountSummary:
73 """Zero-everything summary, used when the histogram is unavailable.
74
75 Old reports written before option-count tracking existed migrate
76 to this shape rather than ``null`` so analysis tools can rely on
77 the field always being a populated struct.
78 """
79 return cls(
80 n=0,
81 total=0,
82 mean=0.0,
83 median=0.0,
84 p90=0.0,
85 max=0,
86 buckets={"0": 0, "1-5": 0, "6-15": 0, "16-50": 0, "50+": 0},
87 )
88
89 @classmethod
90 def from_counts(cls, counts: list[int]) -> OptionCountSummary:

Callers 8

from_countsMethod · 0.80
brushFunction · 0.80
brushendFunction · 0.80
erFunction · 0.80
nFunction · 0.80
dFunction · 0.80
jquery.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected