mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-21 20:30:42 +00:00
use candiate filetype
This commit is contained in:
parent
74f58c59c9
commit
7121b2ce6f
@ -54,7 +54,7 @@ class Candidate:
|
|||||||
self.rules = SingleRules(self.config["rules"]["dir"]).rules
|
self.rules = SingleRules(self.config["rules"]["dir"]).rules
|
||||||
|
|
||||||
for rule in self._filter_rules():
|
for rule in self._filter_rules():
|
||||||
if type(self).__name__.lower() not in rule.types:
|
if self.filetype not in rule.types:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
result = rule.check(self, self.config)
|
result = rule.check(self, self.config)
|
||||||
@ -145,7 +145,7 @@ class Candidate:
|
|||||||
return rule_id
|
return rule_id
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"{type(self).__name__} ({self.path})"
|
return f"{self.filetype} ({self.path})"
|
||||||
|
|
||||||
def __getitem__(self, item):
|
def __getitem__(self, item):
|
||||||
return self.__dict__.get(item)
|
return self.__dict__.get(item)
|
||||||
|
Loading…
Reference in New Issue
Block a user