
    yIf                    4   d dl mZ d dlZd dlmZ d dlmZ d dlmZmZ  G d d          Z	 G d d	e	          Z
 G d
 de	          Z G d de	          Z G d de	          Z G d de	          Ze
eeeedZh dZddddddddddddZh eddZddZdS )    )annotationsN)Pattern)	constants)
OptionDictOptionsc                      e Zd ZU dZ ej        d          Zded<   eZded<   eZ	ded<   eZ
ded<   eZded<   eZded	<   eZded
<   edd            ZdS )NamingStylea  Class to register all accepted forms of a single naming style.

    It may seem counter-intuitive that single naming style has multiple "accepted"
    forms of regular expressions, but we need to special-case stuff like dunder
    names in method names.
    z.*Pattern[str]ANYCLASS_NAME_RGXMOD_NAME_RGXCONST_NAME_RGXCOMP_VAR_RGXDEFAULT_NAME_RGXCLASS_ATTRIBUTE_RGX	name_typestrreturnc                    | j         | j        | j        | j        | j        | j        | j        | j        | j        | j        | j        d|         S )Nmoduleconstclassfunctionmethodattrargumentvariableclass_attributeclass_const	inlinevar)r   r   r   r   r   r   )clsr   s     b/var/www/piapp/venv/lib/python3.11/site-packages/pylint/checkers/base/name_checker/naming_style.py	get_regexzNamingStyle.get_regex   s_     &'',*(,,"6-)
 
  	    N)r   r   r   r
   )__name__
__module____qualname____doc__recompiler   __annotations__r   r   r   r   r   r   classmethodr$    r%   r#   r	   r	      s           #
4((C((((#&N&&&&!$L$$$$#&N&&&&!$L$$$$%((((((+++++   [  r%   r	   c                      e Zd ZdZ ej        d          Z ej        d          Z ej        d          ZeZ	 ej        d          Z
 ej        d          ZdS )SnakeCaseStylez(Regex rules for snake_case naming style.z[^\W\dA-Z][^\WA-Z]*$z([^\W\dA-Z][^\WA-Z]*|__.*__)$z:([^\W\dA-Z][^\WA-Z]*|_[^\WA-Z]*|__[^\WA-Z\d_][^\WA-Z]+__)$Nr&   r'   r(   r)   r*   r+   r   r   r   r   r   r   r.   r%   r#   r0   r0   /   s}        22RZ 788N2:566LRZ @AAN!L!rzE  %"*%EFFr%   r0   c                      e Zd ZdZ ej        d          Z ej        d          Z ej        d          ZeZ	 ej        d          Z
 ej        d          ZdS )CamelCaseStylez'Regex rules for camelCase naming style.z[^\W\dA-Z][^\W_]*$z([^\W\dA-Z][^\W_]*|__.*__)$z'([^\W\dA-Z][^\W_]*|__[^\W\dA-Z_]\w+__)$Nr1   r.   r%   r#   r3   r3   <   sw        11RZ 566N2:344LRZ >??NL!rz"LMM$"*%CDDr%   r3   c                      e Zd ZdZ ej        d          ZeZ ej        d          ZeZ	 ej        d          Z
 ej        d          ZdS )PascalCaseStylez(Regex rules for PascalCase naming style.z[^\W\da-z][^\W_]*$z([^\W\da-z][^\W_]*|__.*__)$z'([^\W\da-z][^\W_]*|__[^\W\dA-Z_]\w+__)$Nr1   r.   r%   r#   r5   r5   G   sj        22RZ 566N!LRZ >??N!L!rz"LMM$"*%:;;r%   r5   c                      e Zd ZdZ ej        d          ZeZ ej        d          ZeZ	 ej        d          Z
 ej        d          ZdS )UpperCaseStylez(Regex rules for UPPER_CASE naming style.z[^\W\da-z][^\Wa-z]*$z([^\W\da-z][^\Wa-z]*|__.*__)$z)([^\W\da-z][^\Wa-z]*|__[^\W\dA-Z_]\w+__)$Nr1   r.   r%   r#   r7   r7   R   sj        22RZ 788N!LRZ @AAN!L!rz"NOO$"*%<==r%   r7   c                      e Zd ZdS )AnyStyleN)r&   r'   r(   r.   r%   r#   r9   r9   ]   s        Dr%   r9   )
snake_case	camelCase
PascalCase
UPPER_CASEany>   r   r   r   r   r   r   r   r   r!   r    r   r:   r=   r<   r>   r   typevar	typealiasr   r   c                    g } t          t                    D ]}t          j        |         }|                    dd          }d| d}|t
          v r	|d| dz  }|d| dz  }|t
          v rUt          |         }|                     | d	|d
t          t          
                                          dd| ddf           |                     | dd dd|df           t          |           S )N_-z$Regular expression matching correct z names. z
Overrides z-naming-style. zIf left empty, z1 names will be checked with the set naming style.z-naming-stylechoicez<style>zNaming style matching correct z names.)defaulttypechoicesmetavarhelpz-rgxregexpz<regexp>)rE   rF   rH   rI   )sortedKNOWN_NAME_TYPESr   HUMAN_READABLE_TYPESreplaceKNOWN_NAME_TYPES_WITH_STYLEDEFAULT_NAMING_STYLESappendlistNAMING_STYLESkeystuple)name_optionsr   human_readable_namename_type_hyphenedhelp_msgdefault_styles         r#   _create_naming_optionsr[      sh   13L,-- &
 &
	'<YG&..sC88W:MWWW333H%7HHHHH)1 ) ) )	
 3331)<M)888#0 (#'(:(:(<(<#=#=#, ]AT ] ] ] 	   	%+++#$)$	 
	
 
	
 
	
 
	
 r%   )r   r   )
__future__r   r*   r   pylintr   pylint.typingr   r   r	   r0   r3   r5   r7   r9   rS   rO   rP   rL   r[   r.   r%   r#   <module>r_      s  
 # " " " " " 				             - - - - - - - -       B
G 
G 
G 
G 
G[ 
G 
G 
GE E E E E[ E E E< < < < <k < < <> > > > >[ > > >	 	 	 	 	{ 	 	 	
 !!             ) ) ) ) ) )r%   