def applies(self, src, dst):
if self._src_pattern and (src is None or re.search(self._src_pattern, src) is None):<EOL><INDENT>return False<EOL><DEDENT>elif self._dst_pattern and (dst is None or re.search(self._dst_pattern, dst) is None):<EOL><INDENT>return False<EOL><DEDENT>return True<EOL>
Checks if this rule applies to the given src and dst paths, based on the src pattern and
        dst pattern given in the constructor.

        If src pattern was None, this rule will apply to any given src path (same for dst).