MCPcopy Create free account
hub / github.com/facebook/PathPicker / output

Method output

src/pathpicker/line_format.py:40–50  ·  view source on GitHub ↗
(self, printer: ColorPrinter)

Source from the content-addressed store, hash-verified

38 self.index = index
39
40 def output(self, printer: ColorPrinter) -> None:
41 assert self.controller is not None
42 (min_x, min_y, max_x, max_y) = self.controller.get_chrome_boundaries()
43 max_len = min(max_x - min_x, len(str(self)))
44 y_pos = min_y + self.index + self.controller.get_scroll_offset()
45
46 if y_pos < min_y or y_pos >= max_y:
47 # wont be displayed!
48 return
49
50 self.formatted_line.print_text(y_pos, min_x, printer, max_len)
51
52 def __str__(self) -> str:
53 return str(self.formatted_line)

Callers

nothing calls this directly

Calls 3

get_chrome_boundariesMethod · 0.80
get_scroll_offsetMethod · 0.80
print_textMethod · 0.80

Tested by

no test coverage detected