3 í«„^‚ã@s<ddlZddlmZmZddlmZGdd„deeeƒZdS)éNé)Ú MatchAliasÚ MatchName)Ú PolicyQuerycs(eZdZdZ‡fdd„Zdd„Z‡ZS)Ú CategoryQuerya¯ Query MLS Categories Parameter: policy The policy to query. Keyword Parameters/Class attributes: name The name of the category to match. name_regex If true, regular expression matching will be used for matching the name. alias The alias name to match. alias_regex If true, regular expression matching will be used on the alias names. c s$tt|ƒj|f|Žtjtƒ|_dS)N)ÚsuperrÚ__init__ÚloggingZ getLoggerÚ__name__Úlog)ÚselfÚpolicyÚkwargs)Ú __class__©ú%/usr/lib64/python3.6/categoryquery.pyr*szCategoryQuery.__init__ccs`|jjdj|ƒƒ|j|jƒ|j|jƒx0|jjƒD]"}|j|ƒsFq6|j|ƒsRq6|Vq6WdS)z/Generator which yields all matching categories.z+Generating category results from {0.policy}N) r ÚinfoÚformatZ_match_name_debugZ_match_alias_debugr Z categoriesZ _match_nameZ _match_alias)r ÚcatrrrÚresults.s    zCategoryQuery.results)r Ú __module__Ú __qualname__Ú__doc__rrÚ __classcell__rr)rrrs r)r ZmixinsrrZqueryrrrrrrÚs