#NEWLINE# def style_from_pygments( style_cls = pygments_DefaultStyle , style_dict = None , include_defaults = True ) : #NEWLINE# #INDENT# '\n    Shortcut to create a :class:`.Style` instance from a Pygments style class\n    and a style dictionary.\n\n    :param style_cls: Pygments style class to start from.\n    :param style_dict: Dictionary for this style. `{Token: style}`.\n    :param include_defaults: (`bool`) Include prompt_toolkit extensions.\n    ' #NEWLINE# assert ( ( style_dict is None ) or isinstance ( style_dict , dict ) ) #NEWLINE# assert ( ( style_cls is None ) or issubclass ( style_cls , pygments_Style ) ) #NEWLINE# styles_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( style_cls is not None ) : #NEWLINE# #INDENT# styles_dict . update ( style_cls . styles ) #NEWLINE# #UNINDENT# if ( style_dict is not None ) : #NEWLINE# #INDENT# styles_dict . update ( style_dict ) #NEWLINE# #UNINDENT# return style_from_dict ( styles_dict , include_defaults = include_defaults )