(value, outline_dict)
Parse outline shorthand property part for known properties.
Parse outline shorthand property part for known properties.
Parse outline shorthand property part for known properties .
def _parse_outline_property_part(value, outline_dict):
    """Parse outline shorthand property part for known properties."""
    from .constants import (  # noqa
        OUTLINE_COLOR_CHOICES, OUTLINE_STYLE_CHOICES, OUTLINE_WIDTH_CHOICES,
    )

    for property_name, choices in {'outline_color': OUTLINE_COLOR_CHOICES,
                                   'outline_style': OUTLINE_STYLE_CHOICES,
                                   'outline_width': OUTLINE_WIDTH_CHOICES}.items():
        try:
            value = choices.validate(value)
        except (ValueError, ValidationError):
            continue

        if property_name in outline_dict:
            raise ValueError('Invalid duplicated property!')

        outline_dict[property_name] = value
        return outline_dict

    raise ValueError('Outline value "{value}" not valid!'.format(value=value))
def _parse_outline_property_part ( value , outline_dict ) : from . constants import ( # noqa OUTLINE_COLOR_CHOICES , OUTLINE_STYLE_CHOICES , OUTLINE_WIDTH_CHOICES , ) for property_name , choices in { 'outline_color' : OUTLINE_COLOR_CHOICES , 'outline_style' : OUTLINE_STYLE_CHOICES , 'outline_width' : OUTLINE_WIDTH_CHOICES } . items ( ) : try : value = choices . validate ( value ) except ( ValueError , ValidationError ) : continue if property_name in outline_dict : raise ValueError ( 'Invalid duplicated property!' ) outline_dict [ property_name ] = value return outline_dict raise ValueError ( 'Outline value "{value}" not valid!' . format ( value = value ) )