FormatSpec#

class scikitplot.cleanprompt.FormatSpec(name, version, summary, extensions, splitter, round_trip, options=(), packs=(), source='<builtin>')[source]#

One validated file format.

Parameters:
namestr

Unique format name.

versionint

The definition’s own version.

summarystr

One line.

extensionstuple of str

Lower-case, with the leading dot.

splitterstr

One of SPLITTERS.

round_tripbool

Whether decode restores the original bytes exactly.

optionstuple of (str, object)

Splitter options, sorted, so the spec stays hashable.

packstuple of str

Packs packs("auto") selects for this format.

sourcestr

Where it was loaded from.

Parameters:
extensions: tuple[str, ...][source]#
name: str[source]#
option_map()[source]#

Return the splitter options as a dictionary.

Returns:
dict

A fresh copy; mutating it changes nothing.

Return type:

dict[str, Any]

options: tuple[tuple[str, Any], ...] = ()#
packs: tuple[str, ...] = ()#
round_trip: bool[source]#
source: str = '<builtin>'#
splitter: str[source]#
summary: str[source]#
version: int[source]#