'Build sets of include/exclude patters and of all filtered tag names based on these'

def build_filters(self):

    if (not self._exclude):
        return
    filtered_tag_names = []
    exclude_patterns = []
    include_patterns = []
    for rule in self._exclude:
        exclude_patterns.append(re.compile(rule))
        filtered_tag_names.append(rule.split(':')[0])
    for rule in self._include:
        include_patterns.append(re.compile(rule))
        filtered_tag_names.append(rule.split(':')[0])
    (self._exclude_patterns, self._include_patterns) = (set(exclude_patterns), set(include_patterns))
    self._filtered_tag_names = set(filtered_tag_names)
