
    `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j(        )                     ej*        d          pej(        +                    d          dd          Z,dZ-dZ.dZ/da0 etO                                 dS )z!Python formatting style settings.    N)errors)	py3compatc                       e Zd ZdZdS )StyleConfigErrorz>Raised when there's a problem reading the style configuration.N)__name__
__module____qualname____doc__     2lib/python3.11/site-packages/yapf/yapflib/style.pyr   r      s        FF$r   r   c                     t           |          S )zGet a style setting.)_style)setting_names    r   Getr      s    		r   c                 8    t                               | |          S )zCGet a style setting or default value if the setting does not exist.)r   get)r   default_values     r   GetOrDefaultr   "   s    	L-	0	00r   c                      t           S )z0Return dict mapping style names to help strings.)_STYLE_HELPr   r   r   Helpr   '   s    	r   c                 0    t          |           }|r|a| adS )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 unwrapped 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#   	 =
 =
 =
/3t=
#e=
 ',e=
 37$	=

 %)D=
 (-u=
 -2E=
 ).=
 */=
 /0a=
 ;<!=
 =
 2=
  'w=
 !"=
  $e!=
" $e#=
$ &+U%=
& (,t'=
( !5)=
* 2+=
, -=
. $e/=
0 11=
2 3=
4 $5=
6 257=
8 6:T9=
: "E;=
< $)5==
> -2E?=
@ %*EA=
B %*EC=
D %*EE=
F &+UG=
H AI=
J -2EK=
L (-uM=
N 27O=
P (-uQ=
R %)DS=
T $(4U=
V '+dW=
X uY=
Z 38%[=
\ #(%]=
^ %)D_=
` "&a=
b #(%c=
d +.#e=
f */g=
h ),i=
j $%1k=
l &)Sm=
n #%"o=
p &*Tq=
r *,s=
t "#u=
v &)Sw=
x uy=
 =r   c                      t                      } d| d<   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   Tr%   rb   r+   r5   r`   r6   z#\..*r2   N__r3   r8   r:   rG   rI   rM   rO   i4  rU   rf   r   s    r   CreateGoogleStylerl     s    


%6;%2337%/0%%)%!"%"%!%s%!&%<A%89+0%'(-2%)*+0%'()-%%&)-%%&	,r   c                  ^    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     sS    


%-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<   | S )z%Create the Facebook formatting style.Fr   rb   r+   Tr.   r4   r5   r8   r\   rB   r   rP   rc   rS   rW   rM   rG   rj   rk   s    r   CreateFacebookStylerp     s    


%6;%23%%)%!"%*%!"%)%!"!&%#$% 12%-.*,%&'02%,-+0%'(+0%'(	,r   )pep8googlefacebookyapfc                 4    t           D ]\  }}| |k    r|c S d S N_DEFAULT_STYLE_TO_FACTORY)r   	def_styler   s      r   r   r     s4    5  i	nnn 	r   c                     d}| rR|                      d                              dd                                          }||vrt          d|           n|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   &  sp    6/ 	sC((..00AJDEEE   	A	
(r   c                 @    d |                      d          D             S )z=Option value converter for a comma-separated list of strings.c                 6    g | ]}|                                 S r   r~   .0parts     r   
<listcomp>z(_StringListConverter.<locals>.<listcomp>4  s     	0	0	04$**,,	0	0	0r   ,)splitr   s    r   _StringListConverterr   2  s     	0	01773<<	0	0	00r   c                     t          |           dk    r| d         dv r
| dd         } t          d |                     d          D                       S )z<Option value converter for a comma-separated set of strings.r\   r   r|   r]   c              3   >   K   | ]}|                                 V  d S rv   r   r   s     r   	<genexpr>z&_StringSetConverter.<locals>.<genexpr>;  s*      33dTZZ\\333333r   r   )lenre   r   r   s    r   _StringSetConverterr   7  sQ    VVaZZAaDEMM	!B$A	33aggcll333	3	33r   c                 J    t           j        |                                          S )z%Option value converter for a boolean.)r   CONFIGPARSER_BOOLEAN_STATESlowerr   s    r   _BoolConverterr   >  s    		.qwwyy	99r   c                     |                                  } |                     d          r|                     d          r
| dd         } d |                     d          D             S )z>Option value converter for a comma-separated list of integers.[]r]   r   c                 x    g | ]7}|                                 t          |                                           8S r   )r~   intr   s     r   r   z%_IntListConverter.<locals>.<listcomp>I  s5    	E	E	E

	E#djjll

	E	E	Er   r   )r~   
startswithendswithr   r   s    r   _IntListConverterr   C  s_    ggii!\\# 1::c?? 	!B$A	E	E	E	E	EEr   c                     t          |           dk    r| d         dv r
| dd         } d| v rt          |           n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   L  sL    VVaZZAaDEMM	!B$A!$	1			s1vv5r   c                    d }d}| 3 |            D ]}t           |k    rd} n|st           S t                      S t          | t                    rt	          |           }nt          | t
          j                  rlt                              | 	                                          }|
 |            S | 
                    d          rt          |           }n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   ,   K   t           D ]	\  } }| V  
d S rv   rw   )r   ri   s     r   GlobalStylesz+CreateStyleFromConfig.<locals>.GlobalStyles  s.      -  qkkkk r   FNT{)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## ?.|<<FF,	 455 	?*..|/A/A/C/CDDM ]__s## ?2<@@ff 1>>f	%f	-	--r   c                     t          j                    }|                    d           |                                 D ])\  }}|                    d|t          |                     *|S )Nr   )r   ConfigParseradd_sectionitemsre   str)config_dictr   keyvalues       r   r   r     sg    !##&W%%'' ) )jc5
JJwSZZ((((	-r   c                 0   | d         dk    s| d         dk    r"t          d                    |                     t          j                    }|                    d           t          j        d|           D ]\  }}}|                    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 8
*11-@@B B B!##&Wz   $ $mc5! JJwU####	-r   c           	          t           j                            |           s"t          d                    |                     t          |           5 }t          j                    }|                     t                    r	 ddl
}n"# t          $ r t          j        d          w xY w|                    |          }|                    di                               dd          }|"t          d                    |                     |                    d           |                                D ])\  }}|                    d|t'          |                     *|cddd           S |                    |           |                     t*                    rE|                    d          s"t          d	                    |                     |cddd           S |                     t.                    rE|                    d          s"t          d
                    |                     |cddd           S |                    d          s"t          d
                    |                     |cddd           S # 1 swxY w Y   dS )z/Read the file and return a ConfigParser object.z'"{0}" is not a valid style or file pathr   NzGtoml package is needed for using pyproject.toml as a configuration file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   openr   r   r   PYPROJECT_TOMLtomlImportErrorr   	YapfErrorloadr   r   r   re   r   	read_fileSETUP_CONFIGhas_sectionLOCAL_STYLE)config_filename
style_filer   r   pyproject_toml
style_dictkvs           r   r   r     sN   		(	( K
188IIK K KO $
#%%F// 
 
 
 
U
 
 	


 yy,,n!%%fb1155fdCCj		7>>OOQ Q 	Q!!!""$$ ' '$!Q

7As1vv&&&&%$ $ $ $ $ $ $ $( Z   -- '' L299/JJL L 	L3$ $ $ $ $ $ $ $6 ,, (( M3::?KKM M 	M?$ $ $ $ $ $ $ $B g&& K
1
8
8
I
IK K KI$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $s?   .J BJB$$B:J+A'JAJ>8JJ
Jc                    |                      d          rdnd}|                     dd          r=|                     dd                                          }t	          |                     }na|                     dd          r=|                     dd                                          }t	          |                     }nt                      }|                     |          D ]\  }}|                                dk    r|                                }|t          vr"t          d
                    |                    	 t          |         |          ||<   w# t          $ r$ t          d
                    ||                    w xY w|S )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    ((00=FFg'w 011 )zz'#344::<<H'133JJ!122 )zz&"23399;;H'133JJ&((J ||G,,  mfe||~~))) \\^^F2229@@HHIII8@GGj   BII
     
s   E.F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 1 1
  
   d c c c-<X_ >8 .9 .9 .9c ,HO -> ? ? ?c
 %4HO 5 % % %c 1@ A
 1 1 1c  #2(/ 33 #4 #4 #4!c$ &5X_ 6
 & & &%cL +:(/ ; + + +Mc\ '6ho 7= '> '> '>]c` (7x 88 (9 (9 (9acd -<HO = - - -ecj 9H I 9 9 9kcp &ho '   qcR ! "   ScV -X_ 	.N 	O 	O 	OWcj .ho /3 4 4 4kcn ,HO -
   ocR $38? 4* $+ $+ $+ScX &5X_ 68 &9 &9 &9Yc\ ) *   ]cj ! ", - - -kcr 'x (% & & &scz ,HO -   {c^ ,HO 
-
 
 
 
_ct ! "7 8 8 8ucx 'x (   yc| ( )L M M M}c@ 0?x @
 0 0 0AcR 4C8? D 4 4 4ScX *(/ +
   Ycf "1 2/ "0 "0 "0gcj +:(/ ;5 +6 +6 +6kcn #2(/ 3
 # # #oc@ #2(/ 3
 # # #AcR #2(/ 3
 # # #Sc\ $38? 4
 $ $ $]cn *(/ &+
 & & &oc| +:(/ ; + + +}cB &5X_ 6  &! &! &!CcF 0?x @ 0 0 0GcL &5X_ 6 & & &McR #2(/ 3 # # #ScX "1 2 " " "Yc^ %4HO 5 % % %_cn %X_ 	&
 	 	 	ocB	 1@ A
 1 1 1C	cJ	 !0 1 ! ! !K	cP	 #2(/ 3 # # #Q	cV	  /x 08  9  9  9W	cZ	 !0 1
 ! ! ![	cz	 )8 9D )E )E )E{	c~	 (7x 8D (E (E (E	cB
 '6ho 7# '$ '$ '$C
cH
 "1 2B "C "C "CI
cL
 $38? 4 $ $ $M
cR
 !0 1 ! ! !S
cX
 $38? 4; $< $< $<Y
c\
 (7x 88 (9 (9 (9]
cb
  /x 0
      c
cz
 $38? 4 $ $ ${
c@ X_ 0 1 1 1AcL? ? ?D  (	 	 	  $ 	 		    /0+,_(_(	   	 	 	1 1 1
4 4 4: : :
F F F6 6 6 !% =! =! =!-;^=!*N=! %3N=! 1?	=!
 #1.=! &4^=! +9.=! '5n=! (6~=! -0C=! 9<=! %n=! =! DC=! "c=!  +N!=!" +N#=!$ $2>%=!& &4^'=!( ()=!* +=!, ,+-=!. +N/=!0 1=!2 &~3=!4 '5=!6 0C/B7=!8 4B>9=!: ).;=!< "0==!> +9.?=!@ #1.A=!B #1.C=!D #1.E=!F $2>G=!H 10I=!J +9.K=!L &4^M=!N 0>~O=!P &4^Q=!R #1.S=!T "0U=!V %3NW=!X $^Y=!Z 1?[=!\ !/]=!^ #1._=!`  .~a=!b !/c=!d ),e=!f (+sg=!h '*ci=!j "%k=!l $'3m=!n !$o=!p $'3q=!r (+ss=!t  #su=!v $'3w=!x ^y=! @+. +. +.\    "* * *Z% % %T ' '  GLL	#$$G(:(:;(G(G     "
 
 $&& ' ' ' ' 'r   