mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-01-01 15:32:26 +01: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:
@@ -1,4 +1,3 @@
|
||||
# coding: utf8
|
||||
"""
|
||||
tinycss.colors3
|
||||
---------------
|
||||
@@ -12,8 +11,6 @@
|
||||
:copyright: (c) 2012 by Simon Sapin.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, division
|
||||
import collections
|
||||
import itertools
|
||||
import re
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# coding: utf8
|
||||
"""
|
||||
tinycss.css21
|
||||
-------------
|
||||
@@ -9,8 +8,6 @@
|
||||
:copyright: (c) 2012 by Simon Sapin.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from itertools import chain, islice
|
||||
|
||||
from ebook_converter.tinycss.decoding import decode
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# coding: utf8
|
||||
"""
|
||||
tinycss.decoding
|
||||
----------------
|
||||
@@ -9,9 +8,6 @@
|
||||
:copyright: (c) 2012 by Simon Sapin.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import operator
|
||||
import re
|
||||
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
import re
|
||||
|
||||
from ebook_converter.polyglot.builtins import map
|
||||
from ebook_converter.tinycss.css21 import CSS21Parser, ParseError
|
||||
from ebook_converter.tinycss.tokenizer import tokenize_grouped
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
def parse_font_family_tokens(tokens):
|
||||
families = []
|
||||
current_family = ''
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from ebook_converter.tinycss.css21 import CSS21Parser
|
||||
from ebook_converter.tinycss.parsing import remove_whitespace, split_on_comma, ParseError
|
||||
from ebook_converter.polyglot.builtins import error_message
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
class MediaQuery(object):
|
||||
|
||||
__slots__ = 'media_type', 'expressions', 'negated'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# coding: utf8
|
||||
"""
|
||||
tinycss.page3
|
||||
------------------
|
||||
@@ -11,8 +10,6 @@
|
||||
:copyright: (c) 2012 by Simon Sapin.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, division
|
||||
from .css21 import CSS21Parser, ParseError
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# coding: utf8
|
||||
"""
|
||||
tinycss.parsing
|
||||
---------------
|
||||
@@ -8,12 +7,9 @@
|
||||
:copyright: (c) 2012 by Simon Sapin.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
# TODO: unit tests
|
||||
|
||||
|
||||
def split_on_comma(tokens):
|
||||
"""Split a list of tokens on commas, ie ``,`` DELIM tokens.
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
import unittest
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
def jsonify(tokens):
|
||||
"""Turn tokens into "JSON-compatible" data structures."""
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
from tinycss.color3 import parse_color_string, hsl_to_rgb
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from tinycss.color3 import parse_color_string, hsl_to_rgb
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
|
||||
class TestColor3(BaseTest):
|
||||
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import io
|
||||
import os
|
||||
import tempfile
|
||||
@@ -13,6 +6,11 @@ from tinycss.css21 import CSS21Parser
|
||||
from tinycss.tests.tokenizing import jsonify
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
class CoreParser(CSS21Parser):
|
||||
"""A parser that always accepts unparsed at-rules."""
|
||||
def parse_at_rule(self, rule, stylesheet_rules, errors, context):
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
from tinycss.decoding import decode
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from tinycss.decoding import decode
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
def params(css, encoding, use_bom=False, expect_error=False, **kwargs):
|
||||
"""Nicer syntax to make a tuple."""
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from tinycss.fonts3 import CSSFonts3Parser, parse_font_family, parse_font, serialize_font
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
from polyglot.builtins import iteritems
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
class TestFonts3(BaseTest):
|
||||
|
||||
def test_font_face(self):
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
import unittest, os, argparse
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import unittest, os, argparse
|
||||
|
||||
def find_tests():
|
||||
from calibre.utils.run_tests import find_tests_in_dir
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
from tinycss.media3 import CSSMedia3Parser, MediaQuery as MQ
|
||||
from tinycss.tests import BaseTest, jsonify
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from tinycss.media3 import CSSMedia3Parser, MediaQuery as MQ
|
||||
from tinycss.tests import BaseTest, jsonify
|
||||
|
||||
def jsonify_expr(e):
|
||||
if e is None:
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
from tinycss.page3 import CSSPage3Parser
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from tinycss.page3 import CSSPage3Parser
|
||||
from tinycss.tests import BaseTest
|
||||
|
||||
class TestPage3(BaseTest):
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
from tinycss.tests import BaseTest, jsonify
|
||||
from tinycss.tokenizer import python_tokenize_flat, c_tokenize_flat, regroup
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from tinycss.tests import BaseTest, jsonify
|
||||
from tinycss.tokenizer import python_tokenize_flat, c_tokenize_flat, regroup
|
||||
|
||||
if c_tokenize_flat is None:
|
||||
tokenizers = (python_tokenize_flat,)
|
||||
else:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# coding: utf8
|
||||
"""
|
||||
tinycss.token_data
|
||||
------------------
|
||||
@@ -8,9 +7,6 @@
|
||||
:copyright: (c) 2012 by Simon Sapin.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import re
|
||||
import sys
|
||||
import operator
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# coding: utf8
|
||||
"""
|
||||
tinycss.tokenizer
|
||||
-----------------
|
||||
@@ -11,9 +10,6 @@
|
||||
:copyright: (c) 2012 by Simon Sapin.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from ebook_converter.tinycss import token_data
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user