StyleOptions

class proveit.StyleOptions(expr)[source]

Bases: object

An Object for displaying the valid style options of an Expression. See the ‘style_options’ and with_styles’ methods of the Expression class.

Methods Summary

add_option(self, name, description, default, …)

Add a Style option with the given name, description, default value, and related methods.

standardized_styles(self, styles[, …])

Create a proper styles dictionary using defaults as appropriate and checking to make sure that unknown styles aren’t used.

Methods Documentation

add_option(self, name, description, default, related_methods)[source]

Add a Style option with the given name, description, default value, and related methods. These may be specific to the expression and not just the expression type, though typically only the ‘default’ is specific to the expression.

standardized_styles(self, styles, ignore_inapplicable_styles=False)[source]

Create a proper styles dictionary using defaults as appropriate and checking to make sure that unknown styles aren’t used.