(self)
| 4356 | |
| 4357 | @cached_property |
| 4358 | def code(self): |
| 4359 | source = self.source |
| 4360 | if not source: |
| 4361 | with open(self.filename, 'rb') as f: |
| 4362 | source = f.read() |
| 4363 | try: |
| 4364 | source, encoding = touni(source), 'utf8' |
| 4365 | except UnicodeError: |
| 4366 | raise depr(0, 11, 'Unsupported template encodings.', 'Use utf-8 for templates.') |
| 4367 | parser = StplParser(source, encoding=encoding, syntax=self.syntax) |
| 4368 | code = parser.translate() |
| 4369 | self.encoding = parser.encoding |
| 4370 | return code |
| 4371 | |
| 4372 | def _rebase(self, _env, _name=None, **kwargs): |
| 4373 | _env['_rebase'] = (_name, kwargs) |
nothing calls this directly
no test coverage detected