Crown-Commercial-Service / govuk-frontend-jinja

Tools to use the GOV.UK Design System with Python webapps that use Jinja2 and Flask 🐍
MIT License
9 stars 6 forks source link

Fix bug in Flask extension where indent_njk was not available #45

Closed lfdebrux closed 5 years ago

lfdebrux commented 5 years ago

This PR fixes issue #40.

The use of multiple inheritance wasn't working because govuk_frontend_jinja.Environment.__init__'s call signature didn't accept positional arguments; fixing this bug allowed the proper method resolution order to be specified, and now the init function that adds indent_njk gets called as expected.

The lesson here is probably "don't use multiple inheritance", but oh well 🤷‍♂