MCPcopy Index your code
hub / github.com/dbcli/mycli / get_reserved_space

Method get_reserved_space

mycli/output.py:281–286  ·  view source on GitHub ↗

Get the number of lines to reserve for the completion menu.

(self)

Source from the content-addressed store, hash-verified

279 return output
280
281 def get_reserved_space(self) -> int:
282 """Get the number of lines to reserve for the completion menu."""
283 reserved_space_ratio = 0.45
284 max_reserved_space = 8
285 _, height = shutil.get_terminal_size()
286 return min(int(round(height * reserved_space_ratio)), max_reserved_space)

Callers 1

get_output_marginMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected