This commit is contained in:
Kovid Goyal 2017-02-09 23:39:57 +05:30
parent 1f2293fc11
commit be8202a30f
4 changed files with 6 additions and 1 deletions

View File

@ -82,6 +82,7 @@ class Hyphenator:
pieces.append('')
return pieces
patterns = (
# Knuth and Liang's original hyphenation patterns from classic TeX.
# In the public domain.

View File

@ -14,6 +14,7 @@ def find_tests():
base = os.path.dirname(os.path.abspath(__file__))
return find_tests_in_dir(base)
if __name__ == '__main__':
try:
import init_calibre # noqa

View File

@ -306,6 +306,7 @@ class _CompileParser(_Parser):
else:
self.error(_('expression is not function or constant'))
compile_counter = 0
@ -547,6 +548,7 @@ class ValidateFormatter(TemplateFormatter):
self.book = Metadata('')
return self.vformat(x, [], {})
validation_formatter = ValidateFormatter()
@ -561,6 +563,6 @@ class EvalFormatter(TemplateFormatter):
key = key.lower()
return kwargs.get(key, _('No such variable ') + key)
# DEPRECATED. This is not thread safe. Do not use.
eval_formatter = EvalFormatter()

View File

@ -271,6 +271,7 @@ def makeRequests(callable, args_list, callback=None, exc_callback=None):
# USAGE EXAMPLE
################
if __name__ == '__main__':
import random
import time