revert candidate filetype handling

This commit is contained in:
Robert Kaussow 2024-01-28 21:38:56 +01:00
parent 7121b2ce6f
commit 6fd39b62a4
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -54,7 +54,7 @@ class Candidate:
self.rules = SingleRules(self.config["rules"]["dir"]).rules
for rule in self._filter_rules():
if self.filetype not in rule.types:
if type(self).__name__.lower() not in rule.types:
continue
result = rule.check(self, self.config)
@ -145,7 +145,7 @@ class Candidate:
return rule_id
def __repr__(self):
return f"{self.filetype} ({self.path})"
return f"{type(self).__name__.lower()} ({self.path})"
def __getitem__(self, item):
return self.__dict__.get(item)