mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
1f2293fc11
commit
be8202a30f
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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()
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user