
    9i                     <    S r SrSr " S S\5      r " S S\5      rg)z
Base classes for features that are backwards-incompatible.

Usage:
features = Features()
features.add(Feature("py3k_feature", "power< 'py3k' any* >", "2.7"))
PATTERN = features.PATTERN
z%s=%sz-
%s is only supported in Python %s and above.c                   $    \ rS rSrSrS rS rSrg)Feature   z
A feature has a name, a pattern, and a minimum version of Python 2.x
required to use the feature (or 3.x if there is no backwards-compatible
version of 2.x)
c                 (    Xl         X l        X0l        g )N)name_patternversion)selfr   PATTERNr   s       `/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/libpasteurize/fixes/feature_base.py__init__Feature.__init__   s    	    c                 @    [         U R                  U R                  4-  $ )zC
Format the above text with the name and minimum version required.
)message_unformattedr   r   )r	   s    r   message_textFeature.message_text   s     #dii%>>>r   )r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r      s    

?r   r   c                   8    \ rS rSrSr0 rS r\S 5       rS r	Sr
g)Features   z
A set of features that generates a pattern for the features it contains.
This set will act like a mapping in that we map names to patterns.
c                 x    [        [        U 5       Vs/ s H  oR                  U4PM     sn5      U l        gs  snf )zC
Called every time we care about the mapping of names to features.
N)dictiterr   mappingr	   fs     r   update_mappingFeatures.update_mapping&   s,     $t*=*Qffa[*=>=s   7c                     U R                  5         SR                  [        U 5       Vs/ s H"  n[        UR                  UR
                  4-  PM$     sn5      $ s  snf )zc
Uses the mapping of names to features to return a PATTERN suitable
for using the lib2to3 patcomp.
z |
)r#   joinr   pattern_unformattedr   r   r!   s     r   r
   Features.PATTERN,   sM     	||QUVZQ[\Q[A0AFFAJJ3GGQ[\]]\s   )Ac                      U R                   U   $ )z8
Implement a simple mapping to get patterns from names.
r    )r	   keys     r   __getitem__Features.__getitem__5   s     ||C  r   r*   N)r   r   r   r   r   r    r#   propertyr
   r,   r   r   r   r   r   r      s.     G? ^ ^!r   r   N)r   r'   r   objectr   setr   r   r   r   <module>r1      s2     0 ?f ?"!s !r   