mirror of https://github.com/zulip/zulip.git
check-templates: Fix filter condition in Jinja2 template linting.
In this commit we basically stop ignoring 'base.html' from linting point of view. Basically the condition was implemented in a bad way resulting in ignorance of every template ending with `base.html`. As well since removing it doesn't complain about the base.html non parsable(We have made progress with our linter) we can safely remove the filter condition.
This commit is contained in:
parent
9cc3e8cf62
commit
9a38b51254
|
@ -39,7 +39,6 @@ def check_html_templates(templates, all_dups):
|
|||
# type: (Iterable[str], bool) -> None
|
||||
# Our files with .html extensions are usually for Django, but we also
|
||||
# have a few static .html files.
|
||||
# The file base.html has a bit of funny HTML that we can't parse here yet.
|
||||
#
|
||||
# We also have .html files that we vendored from Casper.
|
||||
# The casperjs files use HTML5 (whereas Zulip prefers XHTML), and
|
||||
|
@ -47,7 +46,7 @@ def check_html_templates(templates, all_dups):
|
|||
# so we exclude them from our linter.
|
||||
logging.basicConfig(format='%(levelname)s:%(message)s')
|
||||
templates = filter(
|
||||
lambda fn: (('base.html' not in fn) and ('casperjs' not in fn)),
|
||||
lambda fn: ('casperjs' not in fn),
|
||||
templates)
|
||||
templates = sorted(list(templates))
|
||||
|
||||
|
@ -106,6 +105,7 @@ def check_html_templates(templates, all_dups):
|
|||
'templates/zerver/hello.html',
|
||||
'templates/zerver/home.html',
|
||||
'templates/zerver/integrations/index.html',
|
||||
'templates/zerver/integrations/codebase.html',
|
||||
'templates/zerver/login.html',
|
||||
'templates/zerver/markdown_help.html',
|
||||
'templates/zerver/register.html',
|
||||
|
|
Loading…
Reference in New Issue