コード例 #1
0
class FlattenByTagMatcher(object):
    def __init__(self, flatten):
        if not is_list_like(flatten):
            flatten = [flatten]
        patterns = [p[4:] for p in flatten if p[:4].lower() == 'tag:']
        self._matcher = TagPatterns(patterns)

    def match(self, kwtags):
        return self._matcher.match(kwtags)

    def __nonzero__(self):
        return bool(self._matcher)
コード例 #2
0
ファイル: flattenkeywordmatcher.py プロジェクト: Garjy/RIDE
class FlattenByTagMatcher(object):

    def __init__(self, flatten):
        if not is_list_like(flatten):
            flatten = [flatten]
        patterns = [p[4:] for p in flatten if p[:4].lower() == 'tag:']
        self._matcher = TagPatterns(patterns)

    def match(self, kwtags):
        return self._matcher.match(kwtags)

    def __nonzero__(self):
        return bool(self._matcher)
コード例 #3
0
ファイル: flattenkeywordmatcher.py プロジェクト: Garjy/RIDE
 def __init__(self, flatten):
     if not is_list_like(flatten):
         flatten = [flatten]
     patterns = [p[4:] for p in flatten if p[:4].lower() == 'tag:']
     self._matcher = TagPatterns(patterns)
コード例 #4
0
 def __init__(self, flatten):
     if not is_list_like(flatten):
         flatten = [flatten]
     patterns = [p[4:] for p in flatten if p[:4].lower() == 'tag:']
     self._matcher = TagPatterns(patterns)