Skip to content

Configuration

reprexlite has the following configuration options.

Name Type Description
venue str Key to identify the output venue that the reprex will be shared in. Used to select an appropriate formatter. See "Venues Formatting" documentation for formats included with reprexlite.
advertise Optional[bool] Whether to include a footer that credits reprexlite. If unspecified, will depend on specified venue formatter's default.
session_info bool Include details about session and environment that the reprex was generated with.
style bool Whether to autoformat code with black. Requires black to be installed.
prompt str Prefix to use as primary prompt for code lines.
continuation str Prefix to use as secondary prompt for continued code lines.
comment str Prefix to use for results returned by expressions.
keep_old_results bool Whether to additionally include results of expressions detected in the original input when formatting the reprex output.
parsing_method str Method for parsing input. 'auto' will automatically detect either default reprex-style input or standard doctest-style input. 'declared' will allow you to specify custom line prefixes. Values for 'prompt', 'continuation', and 'comment' will be used for both output formatting and input parsing, unless the associated 'input_*' override settings are supplied.
input_prompt Optional[str] Prefix to use as primary prompt for code lines when parsing input. Only used if 'parsing_method' is 'declared'. If not set, 'prompt' is used for both input parsing and output formatting.
input_continuation Optional[str] Prefix to use as secondary prompt for continued code lines when parsing input. Only used if 'parsing_method' is 'declared'. If not set, 'prompt' is used for both input parsing and output formatting.
input_comment Optional[str] Prefix to use for results returned by expressions when parsing input. Only used if 'parsing_method' is 'declared'. If not set, 'prompt' is used for both input parsing and output formatting.