
    ?d|                     n   d Z ddlZddlZddlZddlmZ ddlmZ  G d dej                        Zd Z	d Z
d	 Zd
 Z edi d ej                  d      d ej                  d      d ej                  d      d ej                  d      d ej                  d      d ej                  d      d ej                  d      d ej                  d      d ej                  d      d ej                  d      d ej                  d       d! ej                  d"      d# ej                  d$      d% ej                  d&      d' ej                  d(      d) ej                  d*      d+ ej                  d,      d- ej                  d.      d/ ej                  d0      d1 ej                  d2      d3 ej                  d4      d5 ej                  d6      d7 ej                  d8      d9 ej                  d:      d; ej                  d<      d= ej                  d>      d? ej                  d@      dA ej                  dB      dC ej                  dD      dE ej                  dF      dG ej                  dH      dI ej                  dJ      dK ej                  dL      dM ej                  dN      dO ej                  dP      dQ ej                  dR      dS ej                  dT      dU ej                  dV      dW ej                  dX      dY ej                  dZ      d[ ej                  d\      d] ej                  d^      d_ ej                  d`      da ej                  db      dc ej                  dd      de ej                  df      dg ej                  dh      di ej                  dj      dk ej                  dl      dm ej                  dn      do ej                  dp      dq ej                  dr      ds ej                  dt      du ej                  dv      dw ej                  dx      dy ej                  dz      d{ ej                  d|      d} ej                  d~      d ej                  d      d ej                  d      Zd Zd Zd Zd Z eeeee      Z e       ef e       ef e       ef e       efgZd Zd Zd Zd Zd Zd Zd Z edi dededededededededededed!ed#ed%ed'ed)ed5ed+ed-ed/ed1ed3ed7ed9ed;ed=ed?edAedCedEedGedIedKedMedOedQedSedUedWedYed[ed]ed_edaedcedeedgediedkedmedoedqedseduedwedyed{ed}ededeZd Z d Z!d Z"d Z#d Z$dZ%eZ&ea'ejP                  jS                   ejT                  d      xs ejP                  jW                  d      dd      Z,dZ-dZ.dZ/da0 etO                      y)z!Python formatting style settings.    N)errors)	py3compatc                       e Zd ZdZy)StyleConfigErrorz>Raised when there's a problem reading the style configuration.N)__name__
__module____qualname____doc__     4/usr/lib/python3/dist-packages/yapf/yapflib/style.pyr   r      s    Fr   r   c                     t         |    S )zGet a style setting.)_style)setting_names    r   Getr      s    		r   c                 .    t         j                  | |      S )zCGet a style setting or default value if the setting does not exist.)r   get)r   default_values     r   GetOrDefaultr   "   s    	L-	00r   c                      t         S )z0Return dict mapping style names to help strings.)_STYLE_HELPr   r   r   Helpr   '   s    	r   c                 &    t        |       }|r|a| ay)zSet a style dict.N)_GetStyleFactory_GLOBAL_STYLE_FACTORYr   )stylefactorys     r   SetGlobalStyler   ,   s     U#'#&r   (ALIGN_CLOSING_BRACKET_WITH_VISUAL_INDENTz4      Align closing bracket with visual indentation.ALLOW_MULTILINE_LAMBDASz:      Allow lambdas to be formatted on more than one line.ALLOW_MULTILINE_DICTIONARY_KEYSz      Allow dictionary keys to exist on multiple lines. For example:

        x = {
            ('this is the first element of a tuple',
             'this is the second element of a tuple'):
                 value,
        }+ALLOW_SPLIT_BEFORE_DEFAULT_OR_NAMED_ASSIGNSzU      Allow splitting before a default / named assignment in an argument list.
      ALLOW_SPLIT_BEFORE_DICT_VALUEz/      Allow splits before the dictionary value. ARITHMETIC_PRECEDENCE_INDICATIONa        Let spacing indicate operator precedence. For example:

        a = 1 * 2 + 3 / 4
        b = 1 / 2 - 3 * 4
        c = (1 + 2) * (3 - 4)
        d = (1 - 2) / (3 + 4)
        e = 1 * 2 - 3
        f = 1 + 2 + 3 + 4

    will be formatted as follows to indicate precedence:

        a = 1*2 + 3/4
        b = 1/2 - 3*4
        c = (1+2) * (3-4)
        d = (1-2) / (3+4)
        e = 1*2 - 3
        f = 1 + 2 + 3 + 4

      %BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEFz      Insert a blank line before a 'def' or 'class' immediately nested
      within another 'def' or 'class'. For example:

        class Foo:
                           # <------ this blank line
          def method():
            ...!BLANK_LINE_BEFORE_CLASS_DOCSTRINGz9      Insert a blank line before a class-level docstring."BLANK_LINE_BEFORE_MODULE_DOCSTRINGz4      Insert a blank line before a module docstring.'BLANK_LINES_AROUND_TOP_LEVEL_DEFINITIONzW      Number of blank lines surrounding top-level function and class
      definitions.3BLANK_LINES_BETWEEN_TOP_LEVEL_IMPORTS_AND_VARIABLESzU      Number of blank lines between top-level imports and variable
      definitions.COALESCE_BRACKETSa        Do not split consecutive brackets. Only relevant when
      dedent_closing_brackets is set. For example:

         call_func_that_takes_a_dict(
             {
                 'key1': 'value1',
                 'key2': 'value2',
             }
         )

      would reformat to:

         call_func_that_takes_a_dict({
             'key1': 'value1',
             'key2': 'value2',
         })COLUMN_LIMITz      The column limit.CONTINUATION_ALIGN_STYLEa8        The style for continuation alignment. Possible values are:

      - SPACE: Use spaces for continuation alignment. This is default behavior.
      - FIXED: Use fixed number (CONTINUATION_INDENT_WIDTH) of columns
        (ie: CONTINUATION_INDENT_WIDTH/INDENT_WIDTH tabs or
        CONTINUATION_INDENT_WIDTH spaces) for continuation alignment.
      - VALIGN-RIGHT: Vertically align continuation lines to multiple of
        INDENT_WIDTH columns. Slightly right (one tab or a few spaces) if
        cannot vertically align continuation lines with indent characters.CONTINUATION_INDENT_WIDTHz/      Indent width used for line continuations.DEDENT_CLOSING_BRACKETSa        Put closing brackets on a separate line, dedented, if the bracketed
      expression can't fit in a single line. Applies to all kinds of brackets,
      including function definitions and calls. For example:

        config = {
            'key1': 'value1',
            'key2': 'value2',
        }        # <--- this bracket is dedented and on a separate line

        time_series = self.remote_client.query_entity_counters(
            entity='dev3246.region1',
            key='dns.query_latency_tcp',
            transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
            start_ts=now()-timedelta(days=3),
            end_ts=now(),
        )        # <--- this bracket is dedented and on a separate line
      DISABLE_ENDING_COMMA_HEURISTICzt      Disable the heuristic which places each list element on a separate line
      if the list is comma-terminated. EACH_DICT_ENTRY_ON_SEPARATE_LINEz4      Place each dictionary entry onto its own line.FORCE_MULTILINE_DICTz      Require multiline dictionary even if it would normally fit on one line.
      For example:

        config = {
            'key1': 'value1'
        }I18N_COMMENTz      The regex for an i18n comment. The presence of this comment stops
      reformatting of that line, because the comments are required to be
      next to the string they translate.I18N_FUNCTION_CALLz      The i18n function call names. The presence of this function stops
      reformattting on that line, because the string it has cannot be moved
      away from the i18n comment.INDENT_CLOSING_BRACKETSa        Put closing brackets on a separate line, indented, if the bracketed
      expression can't fit in a single line. Applies to all kinds of brackets,
      including function definitions and calls. For example:

        config = {
            'key1': 'value1',
            'key2': 'value2',
            }        # <--- this bracket is indented and on a separate line

        time_series = self.remote_client.query_entity_counters(
            entity='dev3246.region1',
            key='dns.query_latency_tcp',
            transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
            start_ts=now()-timedelta(days=3),
            end_ts=now(),
            )        # <--- this bracket is indented and on a separate line
        INDENT_DICTIONARY_VALUEz      Indent the dictionary value if it cannot fit on the same line as the
      dictionary key. For example:

        config = {
            'key1':
                'value1',
            'key2': value1 +
                    value2,
        }
      INDENT_WIDTHz3      The number of columns to use for indentation.INDENT_BLANK_LINESz      Indent blank lines.JOIN_MULTIPLE_LINESzH      Join short lines into one line. E.g., single line 'if' statements.*NO_SPACES_AROUND_SELECTED_BINARY_OPERATORSz      Do not include spaces around selected binary operators. For example:

        1 + 2 * 3 - 4 / 5

      will be formatted as follows when configured with "*,/":

        1 + 2*3 - 4/5
      .SPACE_BETWEEN_ENDING_COMMA_AND_CLOSING_BRACKETzW      Insert a space between the ending comma and closing bracket of a list,
      etc.SPACE_INSIDE_BRACKETSz      Use spaces inside brackets, braces, and parentheses.  For example:

        method_call( 1 )
        my_dict[ 3 ][ 1 ][ get_index( *args, **kwargs ) ]
        my_set = { 1, 2, 3 }
      SPACES_AROUND_POWER_OPERATORz+      Use spaces around the power operator.%SPACES_AROUND_DEFAULT_OR_NAMED_ASSIGNz1      Use spaces around default or named assigns.SPACES_AROUND_DICT_DELIMITERSz      Adds a space after the opening '{' and before the ending '}' dict
      delimiters.

        {1: 2}

      will be formatted as:

        { 1: 2 }
      SPACES_AROUND_LIST_DELIMITERSz      Adds a space after the opening '[' and before the ending ']' list
      delimiters.

        [1, 2]

      will be formatted as:

        [ 1, 2 ]
      SPACES_AROUND_SUBSCRIPT_COLONzi      Use spaces around the subscript / slice operator.  For example:

        my_list[1 : 10 : 2]
      SPACES_AROUND_TUPLE_DELIMITERSz      Adds a space after the opening '(' and before the ending ')' tuple
      delimiters.

        (1, 2, 3)

      will be formatted as:

        ( 1, 2, 3 )
      SPACES_BEFORE_COMMENTa        The number of spaces required before a trailing comment.
      This can be a single value (representing the number of spaces
      before each trailing comment) or list of values (representing
      alignment column values; trailing comments within a block will
      be aligned to the first column value that is greater than the maximum
      line length within the block). For example:

      With spaces_before_comment=5:

        1 + 1 # Adding values

      will be formatted as:

        1 + 1     # Adding values <-- 5 spaces between the end of the
                  # statement and comment

      With spaces_before_comment=15, 20:

        1 + 1 # Adding values
        two + two # More adding

        longer_statement # This is a longer statement
        short # This is a shorter statement

        a_very_long_statement_that_extends_beyond_the_final_column # Comment
        short # This is a shorter statement

      will be formatted as:

        1 + 1          # Adding values <-- end of line comments in block
                       # aligned to col 15
        two + two      # More adding

        longer_statement    # This is a longer statement <-- end of line
                            # comments in block aligned to col 20
        short               # This is a shorter statement

        a_very_long_statement_that_extends_beyond_the_final_column  # Comment <-- the end of line comments are aligned based on the line length
        short                                                       # This is a shorter statement

      %SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATEDzQ      Split before arguments if the argument list is terminated by a
      comma. SPLIT_ALL_COMMA_SEPARATED_VALUESz      Split before arguments*SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUESzd      Split before arguments, but do not split all subexpressions recursively
      (unless needed). SPLIT_BEFORE_ARITHMETIC_OPERATORzf      Set to True to prefer splitting before '+', '-', '*', '/', '//', or '@'
      rather than after.SPLIT_BEFORE_BITWISE_OPERATORzU      Set to True to prefer splitting before '&', '|' or '^' rather than
      after.SPLIT_BEFORE_CLOSING_BRACKETzd      Split before the closing bracket if a list or dict literal doesn't fit on
      a single line.SPLIT_BEFORE_DICT_SET_GENERATORz      Split before a dictionary or set generator (comp_for). For example, note
      the split before the 'for':

        foo = {
            variable: 'Hello world, have a nice day!'
            for variable in bar if variable != 42
        }SPLIT_BEFORE_DOTa)        Split before the '.' if we need to split a longer expression:

        foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d))

      would reformat to something like:

        foo = ('This is a really long string: {}, {}, {}, {}'
               .format(a, b, c, d))
      +SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PARENzr      Split after the opening paren which surrounds an expression if it doesn't
      fit on a single line.
      SPLIT_BEFORE_FIRST_ARGUMENTzg      If an argument / parameter list is going to be split, then split before
      the first argument.SPLIT_BEFORE_LOGICAL_OPERATORzS      Set to True to prefer splitting before 'and' or 'or' rather than
      after.SPLIT_BEFORE_NAMED_ASSIGNSz4      Split named assignments onto individual lines.SPLIT_COMPLEX_COMPREHENSIONa        Set to True to split list comprehensions and generators that have
      non-trivial expressions and multiple clauses before each of these
      clauses. For example:

        result = [
            a_long_var + 100 for a_long_var in xrange(1000)
            if a_long_var % 10]

      would reformat to something like:

        result = [
            a_long_var + 100
            for a_long_var in xrange(1000)
            if a_long_var % 10]
      #SPLIT_PENALTY_AFTER_OPENING_BRACKETz@      The penalty for splitting right after the opening bracket."SPLIT_PENALTY_AFTER_UNARY_OPERATORz@      The penalty for splitting the line after a unary operator.!SPLIT_PENALTY_ARITHMETIC_OPERATORzl      The penalty of splitting the line around the '+', '-', '*', '/', '//',
      ``%``, and '@' operators.SPLIT_PENALTY_BEFORE_IF_EXPRz>      The penalty for splitting right before an if expression.SPLIT_PENALTY_BITWISE_OPERATORzU      The penalty of splitting the line around the '&', '|', and '^'
      operators.SPLIT_PENALTY_COMPREHENSIONzS      The penalty for splitting a list comprehension or generator
      expression.SPLIT_PENALTY_EXCESS_CHARACTERz7      The penalty for characters over the column limit."SPLIT_PENALTY_FOR_ADDED_LINE_SPLITz      The penalty incurred by adding a line split to the logical line. The
      more line splits added the higher the penalty.SPLIT_PENALTY_IMPORT_NAMESa        The penalty of splitting a list of "import as" names. For example:

        from a_very_long_or_indented_module_name_yada_yad import (long_argument_1,
                                                                  long_argument_2,
                                                                  long_argument_3)

      would reformat to something like:

        from a_very_long_or_indented_module_name_yada_yad import (
            long_argument_1, long_argument_2, long_argument_3)
      SPLIT_PENALTY_LOGICAL_OPERATORzR      The penalty of splitting the line around the 'and' and 'or'
      operators.USE_TABSz,      Use the Tab character for indentation.c                     t        dKi ddddddddddddd	dd
dddddddddddddddddddddddddddddddd dd!dd"dd#t               d$dd%dd&dd'dd(dd)dd*dd+dd,dd-dd.dd/dd0dd1dd2dd3dd4dd5dd6dd7dd8dd9dd:d;d<d=d>d;d?d@dAd;dBdCdDdEdFdGdHd@dId;dJdS )Lz!Create the PEP8 formatting style.r   Tr    Fr!   r"   r#   r$   r%   r&   r'   r(      r)      r*   r+   O   r,   SPACEr-      r.   r4   r/   r0   r1   r2    r3   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   i,  rQ   i'  rR   rS   r   rT   rU   P   rV   iX  rW      rX   rY   rZ   r   )dictsetr   r   r   CreatePEP8Stylerf     s   	 =
/3=
#=
 ',=
 37	=

 %)=
 (-=
 -1=
 ).=
 */=
 /0=
 ;<=
 =
 =
  '=
 !"=
  $!=
" $#=
$ &+%=
& (,'=
( !)=
* +=
, -=
. $/=
0 1=
2 3=
4 5=
6 257=
8 6:9=
: ";=
< $)==
> -2?=
@ %*A=
B %*C=
D %*E=
F &+G=
H I=
J -2K=
L (-M=
N 27O=
P (-Q=
R %)S=
T $(U=
V '+W=
X Y=
Z 38[=
\ #(]=
^ %)_=
` "&a=
b #(c=
d +.e=
f */g=
h ),i=
j $%k=
l &)m=
n #%o=
p &*q=
r *,s=
t "#u=
v &)w=
x y=
 =r   c                      t               } d| d<   d| d<   d| d<   d| d<   d	| d
<   ddg| d<   d| d<   d| d<   d| d<   d| d<   d| d<   d| d<   d| d<   | S )z#Create the Google formatting style.Fr   rb   r+   Tr5   r`   r6   z#\..*r2   N__r3   r8   r:   rG   rI   rM   rO   i4  rU   rf   r   s    r   CreateGoogleStylerl     s    

%6;%23%%)%!"%"%!%s%!&%<A%89+0%'(-2%)*+0%'()-%%&)-%%&	,r   c                  V    t               } d| d<   d| d<   d| d<   d| d<   d| d<   d| d	<   | S )
z!Create the YAPF formatting style.Tr!   Fr"   r\   r6   rG   rJ   rK   )rl   rk   s    r   CreateYapfStylern     sP    

%-1%)*9>%56%+/%'("%9=%56	,r   c                      t               } d| d<   d| d<   d| d<   d| d<   d| d<   d| d	<   d| d
<   d| d<   d| d<   d| d<   d| d<   d| d<   d| d<   | S )z%Create the Facebook formatting style.Fr   r%   rb   r+   Tr.   r4   r5   r8   r\   rB   r   rP   rc   rS   rW   rM   rG   rj   rk   s    r   CreateFacebookStylerp     s    

%6;%2338%/0%%)%!"%*%!"%)%!"!&%#$% 12%-.*,%&'02%,-+0%'(+0%'(	,r   )pep8googlefacebookyapfc                 2    t         D ]  \  }}| |k(  s|c S  y N_DEFAULT_STYLE_TO_FACTORY)r   	def_styler   s      r   r   r   %  s(    5 i	n 
r   c                     d}| rC| j                  d      j                  dd      j                         }||vrt        d|       |S |d   }|S )z=Option value converter for a continuation align style string.)r_   FIXEDzVALIGN-RIGHT"'ri   -z"unknown continuation align style: r   )stripreplaceupper
ValueError)saccepted_stylesrs      r   &_ContinuationAlignStyleStringConverterr   ,  s[    6/	sC(..0ADEE 
( 	A	
(r   c                 f    | j                  d      D cg c]  }|j                          c}S c c}w )z=Option value converter for a comma-separated list of strings.,)splitr~   r   parts     r   _StringListConverterr   8  s$    #$773<	04$**,	00	0s   .c                     t        |       dkD  r| d   dv r| dd } | j                  d      D ch c]  }|j                          c}S c c}w )z<Option value converter for a comma-separated set of strings.r\   r   r|   r]   r   )lenr   r~   r   s     r   _StringSetConverterr   =  sD    VaZAaDEM	!BA#$773<	04$**,	00	0s   Ac                 D    t         j                  | j                            S )z%Option value converter for a boolean.)r   CONFIGPARSER_BOOLEAN_STATESlowerr   s    r   _BoolConverterr   D  s    		.	.qwwy	99r   c                    | j                         } | j                  d      r| j                  d      r| dd } | j                  d      D cg c],  }|j                         st	        |j                               . c}S c c}w )z>Option value converter for a comma-separated list of integers.[]r]   r   r   )r~   
startswithendswithr   intr   s     r   _IntListConverterr   I  s]    ggi!\\#1::c?	!BA()	E

#djjl
	EE	Es   A?!A?c                 j    t        |       dkD  r| d   dv r| dd } d| v rt        |       S t        |       S )z:Option value converter for an integer or list of integers.r\   r   r|   r]   r   r   )r   r   r   r   s    r   _IntOrIntListConverterr   R  s=    VaZAaDEM	!BA!$	1	5s1v5r   c                    d }d}| + |       D ]  }t         |k(  sd} n |st         S t               S t        | t              rt	        |       }t        |      S t        | t
        j                        r^t        j                  | j                               }| |       S | j                  d      rt        |       }t        |      S t        |       }t              S )a  Create a style dict from the given config.

  Arguments:
    style_config: either a style name or a file name. The file is expected to
      contain settings. It can have a special BASED_ON_STYLE setting naming the
      style which it derives from. If no such setting is found, it derives from
      the default style. When style_config is None, the _GLOBAL_STYLE_FACTORY
      config is created.

  Returns:
    A style dict.

  Raises:
    StyleConfigError: if an unknown style option was encountered.
  c               3   0   K   t         D ]	  \  } }|   y wrv   rw   )r   ri   s     r   GlobalStylesz+CreateStyleFromConfig.<locals>.GlobalStyles  s     - qks   FT{)r   r   
isinstancerd   !_CreateConfigParserFromConfigDictr   
basestring_STYLE_NAME_TO_FACTORYr   r   r   #_CreateConfigParserFromConfigString!_CreateConfigParserFromConfigFile_CreateStyleFromConfigParser)style_configr   ry   r   configstyle_factorys         r   CreateStyleFromConfigr     s    " ) 	5	 m ""d#.|<F 
&f	-- ,	 4 45*..|/A/A/CDM _s#2<@f 
&f	-- 1>f	%f	--r   c                     t        j                         }|j                  d       | j                         D ]!  \  }}|j	                  d|t        |             # |S )Nr   )r   ConfigParseradd_sectionitemsre   str)config_dictr   keyvalues       r   r   r     sS    !!#&W%%' )jc5
JJwSZ()	-r   c                    | d   dk7  s| d   dk7  rt        dj                  |             t        j                         }|j	                  d       t        j                  d|       D ]  \  }}}|j                  d||        |S )zDGiven a config string from the command line, return a config parser.r   r   r   }z Invalid style dict syntax: '{}'.r   zJ([a-zA-Z0-9_]+)\s*[:=]\s*(?:((?P<quote>[\'"]).*?(?P=quote)|[a-zA-Z0-9_]+)))r   formatr   r   r   refindallre   )config_stringr   r   r   ri   s        r   r   r     s    1b 1S 8
*11-@B B!!#&Wzz  $mc5! JJwU#$ 
-r   c           	      p   t         j                  j                  |       st        dj	                  |             t        j                         }| j                  t              r	 ddl	}t        | d      5 }|j                  |      }|j                  di       j                  dd      }|t        dj	                  |             |j!                  d	       |j#                         D ]!  \  }}|j%                  d	|t'        |             # |cddd       S t        |       5 }|j)                  |       | j                  t*              r6|j-                  d      st        d
j	                  |             |cddd       S | j                  t.              r6|j-                  d	      st        dj	                  |             |cddd       S |j-                  d	      st        dj	                  |             |cddd       S # t        $ r t        j                  d      w xY w# 1 sw Y   xY w# 1 sw Y   yxY w)z/Read the file and return a ConfigParser object.z'"{0}" is not a valid style or file pathr   NzHtomli package is needed for using pyproject.toml as a configuration filerbtoolrt   z)Unable to find section [tool.yapf] in {0}r   z$Unable to find section [yapf] in {0}z%Unable to find section [style] in {0})ospathexistsr   r   r   r   r   PYPROJECT_TOMLtomliImportErrorr   	YapfErroropenloadr   r   r   re   r   	read_fileSETUP_CONFIGhas_sectionLOCAL_STYLE)config_filenamer   tomllib
style_filepyproject_toml
style_dictkvs           r   r   r     s'   		(
188IK K!!#&n-  
ot	$ 	
||J/n!%%fb155fdCj		7>>OQ 	Q!""$ '$!Q

7As1v&'	 	 O 

Z -'299/JL 	L  ,(3::?KM 	M  g&
1
8
8
IK K% !       
	 	 s3   $G= 4BHAH,<AH,,H,=HH),H5c                 v   | j                  d      rdnd}| j                  dd      r.| j                  dd      j                         }t	        |          }nJ| j                  dd      r.| j                  dd      j                         }t	        |          }n
t               }| j                  |      D ]]  \  }}|j                         dk(  r|j                         }|t        vrt        dj                  |            	 t        |   |      ||<   _ |S # t        $ r t        dj                  ||            w xY w)zCreate a style dict from a configuration file.

  Arguments:
    config: a ConfigParser object.

  Returns:
    A style dict.

  Raises:
    StyleConfigError: if an unknown style option was encountered.
  rt   r   based_on_stylezUnknown style option "{0}"z#'{}' is not a valid setting for {}.)r   
has_optionr   r   r   r   r   r   _STYLE_OPTION_VALUE_CONVERTERr   r   r   )r   sectionbased_on
base_styleoptionr   s         r   r   r     s?    ((0Fg'w 01zz'#34::<H'13J!12zz&"2399;H'13J&(J ||G, mfe||~)) \\^F229@@HII8@Gj 
  BII
  s   >D%D8rq   XDG_CONFIG_HOMEz	~/.configrt   r   z.style.yapfz	setup.cfgzpyproject.tomlr   )1r
   r   r   textwrapyapf.yapflibr   r   r   r   r   r   r   r   rd   dedentr   rf   rl   rn   rp   r   rx   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   DEFAULT_STYLEDEFAULT_STYLE_FACTORYr   r   joingetenv
expanduserGLOBAL_STYLEr   r   r   r   r   r   r   <module>r      s
   ( 	 	   "v'' 

1

  i-<X__ >8 .9i ,HOO -> ?i
 %4HOO 5 %i 1@ A
 1i  #2(// 33 #4!i$ &5X__ 6
 &%iL +:(// ; +Mi\ '6hoo 7= '>]i` (7x 88 (9aid -<HOO = -eij 9H I 9kip &hoo ' qiR ! " SiV -X__ 	.N 	OWij .hoo /3 4kin ,HOO -
 oiR $38?? 4* $+SiX &5X__ 68 &9Yi\ ) * ]ij ! ", -kir 'x (% &siz ,HOO - {i^ ,HOO 
-
 
_it ! "7 8uix 'x ( yi| ( )L M}i@ 0?x @
 0AiR 4C8?? D 4SiX *(// +
 Yif "1 2/ "0gij +:(// ;5 +6kin #2(// 	3
 	#oiB #2(// 	3
 	#CiV #2(// 3
 #Wi` $38?? 	4
 	$ait *(// )+
 )uiH +:(// ; +IiN &5X__ 6  &!OiR 0?x @ 0SiX &5X__ 6 &Yi^ #2(// 3 #_id "1 2 "eij %4HOO 5 %kiz %X__ 	&
 	{iN	 1@ A
 1O	iV	 !0 1 !W	i\	 #2(// 3 #]	ib	  /x 08  9c	if	 !0 1
 !g	iF
 )8 9D )EG
iJ
 (7x 8D (EK
iN
 '6hoo 7# '$O
iT
 "1 2B "CU
iX
 $38?? 4 $Y
i^
 !0 1 !_
id
 $38?? 4; $<e
ih
 (7x 88 (9i
in
  /x 0
  o
iF $38?? 4 $GiL X__ 0 1MiX?D&	& 	 		  /0+,((	 	1
1:
F6 !% =!-;=!*=! %3=! 1?	=!
 #1=! &4=! +9=! '5=! (6=! -0=! 9<=! %=! =! D=! "=!  +!=!" +#=!$ $2%=!& &4'=!( ()=!* +=!, ,-=!. +/=!0 1=!2 &3=!4 '5=!6 0C7=!8 4B9=!: );=!< "0==!> +9?=!@ #1A=!B #1C=!D #1E=!F $2G=!H 1I=!J +9K=!L &4M=!N 0>O=!P &4Q=!R #1S=!T "0U=!V %3W=!X $Y=!Z 1?[=!\ !/]=!^ #1_=!`  .a=!b !/c=!d ),e=!f (+g=!h '*i=!j "%k=!l $'m=!n !$o=!p $'q=!r (+s=!t  #u=!v $'w=!x y=! @+.\"-`%T ' '  GGLL		#$G(:(:;(G    "
 
 $& 'r   