MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / code

Method code

21-async/mojifinder/bottle.py:3367–3380  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3365
3366 @cached_property
3367 def code(self):
3368 source = self.source
3369 if not source:
3370 with open(self.filename, 'rb') as f:
3371 source = f.read()
3372 try:
3373 source, encoding = touni(source), 'utf8'
3374 except UnicodeError:
3375 depr('Template encodings other than utf8 are no longer supported.') #0.11
3376 source, encoding = touni(source, 'latin1'), 'latin1'
3377 parser = StplParser(source, encoding=encoding, syntax=self.syntax)
3378 code = parser.translate()
3379 self.encoding = parser.encoding
3380 return code
3381
3382 def _rebase(self, _env, _name=None, **kwargs):
3383 if _name is None:

Callers

nothing calls this directly

Calls 5

translateMethod · 0.95
touniFunction · 0.85
deprFunction · 0.85
StplParserClass · 0.85
readMethod · 0.80

Tested by

no test coverage detected