
    ZOgh                        S r SSKrSSKrSSKrSSKrSSKJr  SSKJr  \R                  S:  a  SSK
r
OSSKr
 " S S\R                  5      rS rS	 rS
 rS r\" S0 S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S \R&                  " S!5      _S"\R&                  " S#5      _S$\R&                  " S%5      _S&\R&                  " S'5      _S(\R&                  " S)5      _S*\R&                  " S+5      _S,\R&                  " S-5      _S.\R&                  " S/5      _S0\R&                  " S15      _S2\R&                  " S35      _S4\R&                  " S55      _S6\R&                  " S75      _S8\R&                  " S95      _S:\R&                  " S;5      _S<\R&                  " S=5      _S>\R&                  " S?5      _S@\R&                  " SA5      _SB\R&                  " SC5      _SD\R&                  " SE5      _SF\R&                  " SG5      _SH\R&                  " SI5      _SJ\R&                  " SK5      _SL\R&                  " SM5      _SN\R&                  " SO5      _SP\R&                  " SQ5      _SR\R&                  " SS5      _ST\R&                  " SU5      _SV\R&                  " SW5      _SX\R&                  " SY5      _SZ\R&                  " S[5      _S\\R&                  " S]5      _S^\R&                  " S_5      _S`\R&                  " Sa5      _Sb\R&                  " Sc5      _Sd\R&                  " Se5      _Sf\R&                  " Sg5      _Sh\R&                  " Si5      _Sj\R&                  " Sk5      _Sl\R&                  " Sm5      _Sn\R&                  " So5      _Sp\R&                  " Sq5      _Sr\R&                  " Ss5      _St\R&                  " Su5      _Sv\R&                  " Sw5      _Sx\R&                  " Sy5      _Sz\R&                  " S{5      _S|\R&                  " S}5      _S~\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _S\R&                  " S5      _6rS rS rS rS r\" \\\\S9r\" 5       \4\" 5       \4\" 5       \4\" 5       \4/rS rS rS rS rS rS r S r!\" S0 S\_S\_S\_S\_S\_S\_S\_S\_S\_S\"_S \"_S"\_S$\"_S&\_S(\"_S*\_S,\_S.\_S0\_S2\_S4\#_S6\_S<\_S8\_S:\_S>\"_S@\_SB\_SD\_SF\_SH\_SJ\_SL\_SN\_SP\_SR\_ST\!_SV\_SX\_SZ\_S\\_S^\_S`\_Sb\_Sd\_Sf\_Sh\_Sj\_Sl\_Sn\_Sp\"_Sr\"_St\"_Sv\"_Sx\"_Sz\"_S|\"_S~\"_S\"_S\"_S\_6r$S r%S r&S r'S r(S r)Sr*\r+\q,\RZ                  R]                  \R^                  " S5      =(       d    \RZ                  Ra                  S5      SS5      r1Sr2Sr3Sr4Sq5\" [Y        5       5        g)z!Python formatting style settings.    N)ConfigParser)errors)      c                       \ rS rSrSrSrg)StyleConfigError   z>Raised when there's a problem reading the style configuration. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r
       W/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/yapf/yapflib/style.pyr   r      s    Fr   r   c                     [         U    $ )zGet a style setting.)_style)setting_names    r   Getr   #   s    		r   c                 ,    [         R                  X5      $ )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                      [         $ )z0Return dict mapping style names to help strings.)_STYLE_HELPr
   r   r   Helpr   -   s    	r   c                 0    [        U 5      nU(       a  UqU qg)zSet a style dict.N)_GetStyleFactory_GLOBAL_STYLE_FACTORYr   )stylefactorys     r   SetGlobalStyler#   2   s     U#'#&r   (ALIGN_CLOSING_BRACKET_WITH_VISUAL_INDENTz9      Align closing bracket with visual indentation.
    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_MULTILINE_LAMBDASz?      Allow lambdas to be formatted on more than one line.
    +ALLOW_SPLIT_BEFORE_DEFAULT_OR_NAMED_ASSIGNSzS      Allow splitting before a default / named assignment in an argument list.
    ALLOW_SPLIT_BEFORE_DICT_VALUEz4      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_CLASS_DOCSTRINGz>      Insert a blank line before a class-level docstring.
    "BLANK_LINE_BEFORE_MODULE_DOCSTRINGz9      Insert a blank line before a module docstring.
    %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():
            pass
    'BLANK_LINES_AROUND_TOP_LEVEL_DEFINITIONz\      Number of blank lines surrounding top-level function and class
      definitions.
    3BLANK_LINES_BETWEEN_TOP_LEVEL_IMPORTS_AND_VARIABLESzZ      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_STYLEa=        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_WIDTHz4      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_HEURISTICa        Disable the heuristic which places each list element on a separate line
      if the list is comma-terminated.

      Note: The behavior of this flag changed in v0.40.3.  Before, if this flag
      was true, we would split lists that contained a trailing comma or a
      comment.  Now, we have a separate flag, `DISABLE_SPLIT_LIT_WITH_COMMENT`,
      that controls splitting when a list contains a comment.  To get the old
      behavior, set both flags to true.  More information in CHANGELOG.md.
    DISABLE_SPLIT_LIST_WITH_COMMENTzj
      Don't put every element on a new line within a list that contains
      interstitial comments.
     EACH_DICT_ENTRY_ON_SEPARATE_LINEz9      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_BLANK_LINESz      Indent blank lines.
    INDENT_WIDTHz8      The number of columns to use for indentation.
    JOIN_MULTIPLE_LINESzM      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_BRACKETz\      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_DEFAULT_OR_NAMED_ASSIGNz6      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_POWER_OPERATORz0      Use spaces around the power operator.
    SPACES_AROUND_SUBSCRIPT_COLONzg      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_ALL_COMMA_SEPARATED_VALUESz"      Split before arguments.
    *SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUESzi      Split before arguments, but do not split all subexpressions recursively
      (unless needed).
    %SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATEDzV      Split before arguments if the argument list is terminated by a
      comma.
     SPLIT_BEFORE_ARITHMETIC_OPERATORzk      Set to True to prefer splitting before '+', '-', '*', '/', '//', or '@'
      rather than after.
    SPLIT_BEFORE_BITWISE_OPERATORzZ      Set to True to prefer splitting before '&', '|' or '^' rather than
      after.
    SPLIT_BEFORE_CLOSING_BRACKETzi      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_PARENzp      Split after the opening paren which surrounds an expression if it doesn't
      fit on a single line.
    SPLIT_BEFORE_FIRST_ARGUMENTzl      If an argument / parameter list is going to be split, then split before
      the first argument.
    SPLIT_BEFORE_LOGICAL_OPERATORzX      Set to True to prefer splitting before 'and' or 'or' rather than
      after.
    SPLIT_BEFORE_NAMED_ASSIGNSz9      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_BRACKETzE      The penalty for splitting right after the opening bracket.
    "SPLIT_PENALTY_AFTER_UNARY_OPERATORzE      The penalty for splitting the line after a unary operator.
    !SPLIT_PENALTY_ARITHMETIC_OPERATORzo      The penalty of splitting the line around the '+', '-', '*', '/', '//',
      `%`, and '@' operators.
    SPLIT_PENALTY_BEFORE_IF_EXPRzC      The penalty for splitting right before an if expression.
    SPLIT_PENALTY_BITWISE_OPERATORzT      The penalty of splitting the line around the '&', '|', and '^' operators.
    SPLIT_PENALTY_COMPREHENSIONzX      The penalty for splitting a list comprehension or generator
      expression.
    SPLIT_PENALTY_EXCESS_CHARACTERz<      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_OPERATORzQ      The penalty of splitting the line around the 'and' and 'or' operators.
    USE_TABSz1      Use the Tab character for indentation.
    c                     [        SL0 SS_SS_SS_SS_SS_SS_S	S_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_S S_S!S_S"S_S#S_S$[        5       _S%S_S&S_S'S_S(S_S)S_S*S_S+S_S,S_S-S_S.S_S/S_S0S_S1S_S2S_S3S_S4S_S5S_S6S_S7S_S8S_S9S_S:S_S;S<_S=S>_S?S<_S@SA_SBS<_SCSD_SESF_SGSH_SISA_SJS<_SKS_6$ )Mz!Create the PEP8 formatting style.r$   Tr%   Fr&   r'   r(   r)   r*   r+   r,   r-      r.      r/   r0   O   r1   SPACEr2      r3   r4   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   rQ   rR   rS   rT   rU   rV   i,  rW   i'  rX   rY   r   rZ   r[   P   r\   iX  r]   r	   r^   r_   r`   r
   )dictsetr
   r   r   CreatePEP8Stylerk     s   	 >
/3>
&+>
 $>
 37	>

 %)>
 (->
 ).>
 */>
 -1>
 /0>
 ;<>
 >
 >
  '>
 !">
  $!>
" &+#>
$ ',%>
& (,'>
( !)>
* +>
, ->
. $/>
0 $1>
2 3>
4 5>
6 7>
8 259>
: 6:;>
< "=>
> -2?>
@ %*A>
B %*C>
D $)E>
F %*G>
H &+I>
J K>
L (-M>
N 27O>
P -2Q>
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>
z {>
 >r   c                      [        5       n SU S'   SU S'   SU S'   SU S'   S	U S
'   SS/U S'   SU S'   SU S'   SU S'   SU S'   SU S'   SU S'   SU S'   U $ )z#Create the Google formatting style.Fr$   rh   r0   Tr;   rf   r=   z#\..*r8   N__r9   r>   r@   rM   rO   rS   rU   i4  r[   rk   r!   s    r   CreateGoogleStylerq     s    

%6;%23%%)%!"%"%!%s%!&%<A%89+0%'(-2%)*+0%'()-%%&)-%%&	,r   c                  V    [        5       n SU S'   SU S'   SU S'   SU S'   SU S'   SU S	'   U $ )
z!Create the YAPF formatting style.Tr%   Fr'   rb   r=   rM   rP   rQ   )rq   rp   s    r   CreateYapfStylers   2  sP    

%-1%)*9>%56%+/%'("%9=%56	,r   c                      [        5       n SU S'   SU S'   SU S'   SU S'   SU S'   SU S	'   SU S
'   SU S'   SU S'   SU S'   SU S'   SU S'   SU S'   U $ )z%Create the Facebook formatting style.Fr$   r,   rh   r0   Tr3   r:   r;   r>   rb   rH   r   rV   r	   rY   r]   rM   rS   ro   rp   s    r   CreateFacebookStyleru   >  s    

%6;%2338%/0%%)%!"%*%!"%)%!"!&%#$% 12%-.*,%&'02%,-+0%'(+0%'(	,r   )facebookgooglepep8yapfc                 4    [          H  u  pX:X  d  M  Us  $    g N_DEFAULT_STYLE_TO_FACTORY)r!   	def_styler"   s      r   r   r   `  s    5in 6 
r   c                     SnU (       aF  U R                  S5      R                  SS5      R                  5       nX!;  a  [        SU < 35      e U$ US   nU$ )z=Option value converter for a continuation align style string.)re   FIXEDzVALIGN-RIGHT"'rn   -z"unknown continuation align style: r   )stripreplaceupper
ValueError)saccepted_stylesrs      r   &_ContinuationAlignStyleStringConverterr   g  s^    6/	sC(..0ADEE   
( 	A	
(r   c                 j    U R                  S5       Vs/ s H  oR                  5       PM     sn$ s  snf )z=Option value converter for a comma-separated list of strings.,)splitr   r   parts     r   _StringListConverterr   s  s&    #$773<	0<4**,<	00	0s   0c                     [        U 5      S:  a  U S   S;   a  U SS n U R                  S5       Vs1 s H  oR                  5       iM     sn$ s  snf )z<Option value converter for a comma-separated set of strings.rb   r   r   rc   r   )lenr   r   r   s     r   _StringSetConverterr   x  sF    VaZAaDEM	!BA#$773<	0<4**,<	00	0s   Ac                 D    [         R                  U R                  5          $ )z%Option value converter for a boolean.)r   BOOLEAN_STATESlowerr   s    r   _BoolConverterr     s    		$	$QWWY	//r   c                 ,   U R                  5       n U R                  S5      (       a  U R                  S5      (       a  U SS n U R                  S5       Vs/ s H2  oR                  5       (       d  M  [	        UR                  5       5      PM4     sn$ s  snf )z>Option value converter for a comma-separated list of integers.[]rc   r   r   )r   
startswithendswithr   intr   s     r   _IntListConverterr     sg    ggi!\\#1::c??	!BA()	E


#djjl
	EE	Es   B1Bc                 t    [        U 5      S:  a  U S   S;   a  U SS n SU ;   a  [        U 5      $ [        U 5      $ )z:Option value converter for an integer or list of integers.rb   r   r   rc   r   r   )r   r   r   r   s    r   _IntOrIntListConverterr     s=    VaZAaDEM	!BA!$	1	5s1v5r   c                    S nSnU c3  U" 5        H  n[         U:X  d  M  Sn  O   U(       d  [         $ [        5       $ [        U [        5      (       a  [	        U 5      nOo[        U [
        5      (       aZ  [        R                  U R                  5       5      nUb  U" 5       $ U R                  S5      (       a  [        U 5      nO[        U 5      n[        W5      $ )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   2   #    [          H	  u  pU v   M     g 7fr{   r|   )r!   rn   s     r   GlobalStyles+CreateStyleFromConfig.<locals>.GlobalStyles  s     -k .s   FT{)r   r    
isinstanceri   !_CreateConfigParserFromConfigDictstr_STYLE_NAME_TO_FACTORYr   r   r   #_CreateConfigParserFromConfigString!_CreateConfigParserFromConfigFile_CreateStyleFromConfigParser)style_configr   r~   r!   configstyle_factorys         r   CreateStyleFromConfigr     s    " )	5	   m ""d##.|<F,$$*..|/A/A/CDM _s##2<@f 1>f	%f	--r   c                     [        5       nUR                  S5        U R                  5        H!  u  p#UR                  SU[	        U5      5        M#     U$ )Nr!   )r   add_sectionitemsrj   r   )config_dictr   keyvalues       r   r   r   
  sE    >&W%%'jc
JJwSZ( (	-r   c                     U S   S:w  d	  U S   S:w  a  [        SR                  U 5      5      e[        5       nUR                  S5        [        R
                  " SU 5       H  u  p#nUR                  SX#5        M     U$ )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   refindallrj   )config_stringr   r   r   rn   s        r   r   r     s    1b 1S 8
*11-@B B>&Wzz mc! JJw# 
-r   c           	      v   [         R                  R                  U 5      (       d  [        SR	                  U 5      5      e[        5       nU R                  [        5      (       a  [        U S5       n[        R                  " U5      nUR                  S0 5      R                  SS5      nUc  [        SR	                  U 5      5      eUR                  S5        UR                  5        H!  u  pVUR                  SU[        U5      5        M#     UsSSS5        $ [        U 5       nUR!                  U5        U R                  ["        5      (       a;  UR%                  S5      (       d  [        SR	                  U 5      5      eUsSSS5        $ U R                  [&        5      (       a;  UR%                  S5      (       d  [        S	R	                  U 5      5      eUsSSS5        $ UR%                  S5      (       d  [        S	R	                  U 5      5      eUsSSS5        $ ! , (       d  f       GN= f! , (       d  f       g= f)
z/Read the file and return a ConfigParser object.z'"{0}" is not a valid style or file pathrbtoolry   Nz)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   PYPROJECT_TOMLopentomllibloadr   r   r   rj   r   	read_fileSETUP_CONFIGhas_sectionLOCAL_STYLE)config_filenamer   
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!""$$!

7As1v& % 
%	$ O

Z --''299/JL 	L  ,,((3::?KM 	M  g&&
1
8
8
IK K%  
%	$ s'   /BH!AH*AH*1H*
H'*
H8c                    U R                  S5      (       a  SOSnU R                  SS5      (       a/  U R                  SS5      R                  5       n[        U   " 5       nOPU R                  SS5      (       a/  U R                  SS5      R                  5       n[        U   " 5       nO
[        5       nU R                  U5       Ha  u  pEUR                  5       S:X  a  M  UR                  5       nU[        ;  a  [        SR                  U5      5      e [        U   " U5      X4'   Mc     U$ ! [         a    [        SR                  XT5      5      ef = f)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.
ry   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   L  s=    ((00Fg'w 011zz'#34::<H'13J!122zz&"2399;H'13J&(J ||G,mf||~)) \\^F229@@HII8@Gj - 
  BII
  s   D))%Erx   XDG_CONFIG_HOMEz	~/.configry   r!   z.style.yapfz	setup.cfgzpyproject.tomlr
   )6r   r   r   systextwrapconfigparserr   yapf.yapflibr   version_infor   tomli	YapfErrorr   r   r   r   r#   ri   dedentr   rk   rq   rs   ru   r   r}   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
   ( 	 	 
  % wv'' 

1

  ]-5__ > .	]
 %-OO 5 %	] %OO - 	]" 19 A 1	#]( #+// 3 #	)]. &.__ 6 &	/]V '/oo 7 '	W]\ (0 8 (	]]b +3// ; +	c]t -5OO = -	u]| 9A I 9	}]D oo ' 	E]h  " 	i]n &__ 
. 
	o]D 'oo / 	E]J %OO - 	K]n $,?? 	4 	$	o]B %-OO 5 %	C]J &.__ 6 &	K]P " * 	Q]`  " 	a]j   ( 	k]t %OO - 	u]X %OO 
- 
	Y]n   ( 	o]t  " 	u]z ! ) 	{]@ 08 @ 0	A]R 4<?? D 4	S]Z #// + 	[]h +3// ; +	i]n #+// 	3 	#	o]B #+// 	3 	#	C]V "* 2 "	W]\ #+// 3 #	]]f $,?? 	4 	$	g]z #// )+ )	{]N	 &.__ 6 &	O	]T	 08 @ 0	U	]\	 +3// ; +	]	]d	 &.__ 6 &	e	]l	 #+// 3 #	m	]t	 "* 2 "	u	]|	 %-OO 5 %	}	]N
 __ 	& 		O
]b
 19 A 1	c
]j
 !) 1 !	k
]r
 #+// 3 #	s
]z
  ( 0  	{
]@ !) 1 !	A]` )1 9 )	a]f (0 8 (	g]l '/oo 7 '	m]t "* 2 "	u]z $,?? 4 $	{]@ !) 1 !	A]H $,?? 4 $	I]N (0 8 (	O]V  ( 0  	W]n $,?? 4 $	o]t __  	u]@@F&	&  			  /0+,((	 	1
10
F6 !% >!-;>!$2>! +>! 1?	>!
 #1>! &4>! '5>! (6>! +9>! -0>! 9<>! %>! >! D>! ">!  +!>!" $2#>!$ %3%>!& &4'>!( ()>!* +>!, ,->!. &/>!0 +1>!2 +3>!4 5>!6 '7>!8 0C9>!: 4B;>!< )=>!> +9?>!@ #1A>!B #1C>!D "0E>!F #1G>!H $2I>!J 1K>!L &4M>!N 0>O>!P +9Q>!R &4S>!T #1U>!V "0W>!X %3Y>!Z $[>!\ 1?]>!^ !/_>!` #1a>!b  .c>!d !/e>!f ),g>!h (+i>!j '*k>!l "%m>!n $'o>!p !$q>!r $'s>!t (+u>!v  #w>!x $'y>!z {>! B+.\"&R%T ' '  GGLL
		#$G(:(:;(G    "
 
 $& 'r   