MCPcopy Create free account
hub / github.com/Cats-Team/AdRules / is_valid

Method is_valid

script/compressor.py:168–173  ·  view source on GitHub ↗
(self, rule: str)

Source from the content-addressed store, hash-verified

166 return True
167
168 def is_valid(self, rule: str) -> bool:
169 if not rule.strip() or self.is_comment(rule):
170 return True
171 if RE_ETC_HOSTS.match(rule):
172 return self._valid_etc_hosts(rule)
173 return self._valid_adblock(rule)
174
175 def validate(self, rules: List[str]) -> Tuple[List[str], List[str]]:
176 """

Callers 1

validateMethod · 0.95

Calls 3

is_commentMethod · 0.95
_valid_etc_hostsMethod · 0.95
_valid_adblockMethod · 0.95

Tested by

no test coverage detected