@@ -0,0 +1,1539 @@
+import ast%0A%0Afrom .base import BaseAnalyzer, Result%0A%0A%0Aclass TemplateLoadersVisitor(ast.NodeVisitor):%0A%0A    def __init__(self):%0A        self.found = %5B%5D%0A%0A    deprecated_items = %7B%0A        'django.template.loaders.app_directories.load_template_source':%0A            'django.template.loaders.app_directories.Loader',%0A        'django.template.loaders.eggs.load_template_source':%0A            'django.template.loaders.eggs.Loader',%0A        'django.template.loaders.filesystem.load_template_source':%0A            'django.template.loaders.filesystem.Loader',%0A    %7D%0A%0A    def visit_Str(self, node):%0A        if node.s in self.deprecated_items.keys():%0A            self.found.append((node.s, node))%0A%0A%0Aclass TemplateLoadersAnalyzer(BaseAnalyzer):%0A%0A    def analyze_file(self, filepath, code):%0A        if not isinstance(code, ast.AST):%0A            return%0A        visitor = TemplateLoadersVisitor()%0A        visitor.visit(code)%0A        for name, node in visitor.found:%0A            propose = visitor.deprecated_items%5Bname%5D%0A            result = Result(%0A                description = (%0A                    '%25r function is deprecated, use %25r class instead' %25 (name, propose)%0A                ),%0A                path = filepath,%0A                line = node.lineno)%0A            lines = self.get_file_lines(filepath, node.lineno, node.lineno)%0A            for lineno, important, text in lines:%0A                result.source.add_line(lineno, text, important)%0A                result.solution.add_line(lineno, text.replace(name, propose), important)%0A            yield result%0A

Add template loaders analyzer