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('') pieces.append('')
return pieces return pieces
patterns = ( patterns = (
# Knuth and Liang's original hyphenation patterns from classic TeX. # Knuth and Liang's original hyphenation patterns from classic TeX.
# In the public domain. # In the public domain.

View File

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

View File

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

View File

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