a 97a»ã@s0dZdZdZGdd„deƒZGdd„deƒZdS)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@s eZdZdZdd„Zdd„ZdS)Ú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) cCs||_||_||_dS)N)ÚnameÚ_patternÚversion)ÚselfrÚPATTERNr©rú{/private/var/folders/s6/9n5zrl012gv99k63s4q6ccsd4s6mqz/T/pip-target-f5cq3f2q/lib/python/libpasteurize/fixes/feature_base.pyÚ__init__szFeature.__init__cCst|j|jfS)zS Format the above text with the name and minimum version required. )Úmessage_unformattedrr©rrrrÚ message_textszFeature.message_textN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r r rrrrrsrc@s0eZdZdZiZdd„Zedd„ƒZdd„ZdS) Ú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. cCstdd„t|ƒDƒƒ|_dS)zS Called every time we care about the mapping of names to features. cSsg|]}|j|f‘qSr)r©Ú.0ÚfrrrÚ *óz+Features.update_mapping..N)ÚdictÚiterÚmappingr rrrÚupdate_mapping&szFeatures.update_mappingcCs | ¡d dd„t|ƒDƒ¡S)z{ Uses the mapping of names to features to return a PATTERN suitable for using the lib2to3 patcomp. z | cSsg|]}t|j|jf‘qSr)Úpattern_unformattedrrrrrrr3rz$Features.PATTERN..)rÚjoinrr rrrr,szFeatures.PATTERNcCs |j|S)zH Implement a simple mapping to get patterns from names. )r)rÚkeyrrrÚ __getitem__5szFeatures.__getitem__N) r rrrrrÚpropertyrrrrrrrs  rN)rrr ÚobjectrÚsetrrrrrÚs