bgJdZdZdZGddeZGddeZdS)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.ceZdZdZdZdZdS)Featurez 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) c0||_||_||_dS)N)name_patternversion)selfrPATTERNrs q/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/libpasteurize/fixes/feature_base.py__init__zFeature.__init__s   c.t|j|jfzS)zS Format the above text with the name and minimum version required. )message_unformattedrrrs r message_textzFeature.message_texts#di%>>>r N)__name__ __module__ __qualname____doc__r rr r rrs<  ?????r rc8eZdZdZiZdZedZdZdS)Featuresz 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\tdt|D|_dS)zS Called every time we care about the mapping of names to features. c g|] }|j|f Sr)r.0fs r z+Features.update_mapping..*s===Qafa[===r N)dictitermappingrs r update_mappingzFeatures.update_mapping&s,==$t**===>> r c|ddt|DS)z{ Uses the mapping of names to features to return a PATTERN suitable for using the lib2to3 patcomp. z | c:g|]}t|j|jfzSr)pattern_unformattedrrrs r rz$Features.PATTERN..3s'\\\A0AFAJ3GG\\\r )r!joinrrs r r zFeatures.PATTERN,sA ||\\QUVZQ[Q[\\\]]]r c|j|S)zH Implement a simple mapping to get patterns from names. )r )rkeys r __getitem__zFeatures.__getitem__5s|C  r N) rrrrr r!propertyr r(rr r rrsaG??? ^^X^!!!!!r rN)rr$robjectrsetrrr r r,s}0?????f???"!!!!!s!!!!!r