1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-25 07:51:28 +02:00

Removing unneeded from __future__ import statements.

Since we are on Python 3.6 and up, we don't need those anymore.
This commit is contained in:
2020-04-19 17:38:58 +02:00
parent 41b687ee27
commit 48fedea799
331 changed files with 1178 additions and 2067 deletions
+8 -10
View File
@@ -1,14 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = 'GPL 3'
__copyright__ = '''2011, John Schember <john@nachtimwald.com>
2011, Leigh Parry <leighparry@blueyonder.co.uk>'''
__docformat__ = 'restructuredtext en'
'''
"""
Transform OEB content into Textile formatted plain text
'''
"""
import re
from functools import partial
@@ -19,6 +11,12 @@ from ebook_converter.ebooks.oeb.stylizer import Stylizer
from ebook_converter.polyglot.builtins import unicode_type, string_or_bytes
__license__ = 'GPL 3'
__copyright__ = ('2011, John Schember <john@nachtimwald.com> 2011, '
'Leigh Parry <leighparry@blueyonder.co.uk>')
__docformat__ = 'restructuredtext en'
class MarkdownMLizer(OEB2HTML):
def extract_content(self, oeb_book, opts):
+2 -4
View File
@@ -1,12 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import os
__license__ = 'GPL 3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
import os
class TxtNewlines(object):
+7 -11
View File
@@ -1,15 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = 'GPL v3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
'''
"""
Read content from txt file.
'''
"""
import os, re
from ebook_converter import prepare_string_for_xml, isbytestring
@@ -19,6 +10,11 @@ from ebook_converter.ebooks.conversion.preprocess import DocAnalysis
from ebook_converter.utils.cleantext import clean_ascii_chars
from ebook_converter.polyglot.builtins import iteritems, unicode_type, map, range, long_type
__license__ = 'GPL v3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
HTML_TEMPLATE = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>%s </title></head><body>\n%s\n</body></html>'
+7 -9
View File
@@ -1,13 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = 'GPL 3'
__copyright__ = '2011, Leigh Parry <leighparry@blueyonder.co.uk>'
__docformat__ = 'restructuredtext en'
'''
"""
Transform OEB content into Textile formatted plain text
'''
"""
import re
from functools import partial
@@ -20,6 +13,11 @@ from ebook_converter.ebooks.textile.unsmarten import unsmarten
from ebook_converter.polyglot.builtins import string_or_bytes
__license__ = 'GPL 3'
__copyright__ = '2011, Leigh Parry <leighparry@blueyonder.co.uk>'
__docformat__ = 'restructuredtext en'
class TextileMLizer(OEB2HTML):
MAX_EM = 10
+6 -10
View File
@@ -1,20 +1,16 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = 'GPL 3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
'''
"""
Transform OEB content into plain text
'''
"""
import re
from lxml import etree
from ebook_converter.polyglot.builtins import string_or_bytes
__license__ = 'GPL 3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
BLOCK_TAGS = [
'div',
'p',