/usr/local/lib/python3.9/site-packages/pip/_vendor/rich
from typing import Optional, TYPE_CHECKING from .segment import Segment from .style import StyleType from ._loop import loop_last if TYPE_CHECKING: from .console import ( Console, ConsoleOptions, RenderResult, RenderableType, Group, ) class Screen: """A renderable that fills the terminal screen and crops excess. Args: renderable (RenderableType): Child renderable. style (StyleType, optional): Optional background style. Defaults to None. """ renderable: "RenderableType" def __init__( self, *renderables: "RenderableType", style: Optional[StyleType] = None, application_mode: bool = False, ) -> None: from pip._vendor.rich.console import Group self.renderable = Group(*renderables) self.style = style self.application_mode = application_mode def __rich_console__( self, console: "Console", options: "ConsoleOptions" ) -> "RenderResult": width, height = options.size style = console.get_style(self.style) if self.style else None render_options = options.update(width=width, height=height) lines = console.render_lines( self.renderable or "", render_options, style=style, pad=True ) lines = Segment.set_shape(lines, width, height, style=style) new_line = Segment("\n\r") if self.application_mode else Segment.line() for last, line in loop_last(lines): yield from line if not last: yield new_line
.
Edit
..
Edit
__init__.py
Edit
__main__.py
Edit
__pycache__
Edit
_cell_widths.py
Edit
_emoji_codes.py
Edit
_emoji_replace.py
Edit
_export_format.py
Edit
_extension.py
Edit
_fileno.py
Edit
_inspect.py
Edit
_log_render.py
Edit
_loop.py
Edit
_null_file.py
Edit
_palettes.py
Edit
_pick.py
Edit
_ratio.py
Edit
_spinners.py
Edit
_stack.py
Edit
_timer.py
Edit
_win32_console.py
Edit
_windows.py
Edit
_windows_renderer.py
Edit
_wrap.py
Edit
abc.py
Edit
align.py
Edit
ansi.py
Edit
bar.py
Edit
box.py
Edit
cells.py
Edit
color.py
Edit
color_triplet.py
Edit
columns.py
Edit
console.py
Edit
constrain.py
Edit
containers.py
Edit
control.py
Edit
default_styles.py
Edit
diagnose.py
Edit
emoji.py
Edit
errors.py
Edit
file_proxy.py
Edit
filesize.py
Edit
highlighter.py
Edit
json.py
Edit
jupyter.py
Edit
layout.py
Edit
live.py
Edit
live_render.py
Edit
logging.py
Edit
markup.py
Edit
measure.py
Edit
padding.py
Edit
pager.py
Edit
palette.py
Edit
panel.py
Edit
pretty.py
Edit
progress.py
Edit
progress_bar.py
Edit
prompt.py
Edit
protocol.py
Edit
py.typed
Edit
region.py
Edit
repr.py
Edit
rule.py
Edit
scope.py
Edit
screen.py
Edit
segment.py
Edit
spinner.py
Edit
status.py
Edit
style.py
Edit
styled.py
Edit
syntax.py
Edit
table.py
Edit
terminal_theme.py
Edit
text.py
Edit
theme.py
Edit
themes.py
Edit
traceback.py
Edit
tree.py
Edit