mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-01-06 03:04:11 +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,12 +1,8 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from ebook_converter.css_selectors.parser import parse
|
||||
from ebook_converter.css_selectors.select import Select, INAPPROPRIATE_PSEUDO_CLASSES
|
||||
from ebook_converter.css_selectors.errors import SelectorError, SelectorSyntaxError, ExpressionError
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
__all__ = ['parse', 'Select', 'INAPPROPRIATE_PSEUDO_CLASSES', 'SelectorError', 'SelectorSyntaxError', 'ExpressionError']
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
class SelectorError(ValueError):
|
||||
|
||||
"""Common parent for SelectorSyntaxError and ExpressionError"""
|
||||
|
||||
|
||||
class SelectorSyntaxError(SelectorError):
|
||||
|
||||
"""Parsing a selector that does not match the grammar."""
|
||||
|
||||
|
||||
class ExpressionError(SelectorError):
|
||||
|
||||
"""Unknown or unsupported selector (eg. pseudo-class)."""
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
import collections
|
||||
|
||||
from ebook_converter.polyglot.builtins import string_or_bytes
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import collections
|
||||
from ebook_converter.polyglot.builtins import string_or_bytes
|
||||
|
||||
SLICE_ALL = slice(None)
|
||||
|
||||
|
||||
|
||||
@@ -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__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import re, itertools
|
||||
from collections import OrderedDict, defaultdict
|
||||
from functools import wraps
|
||||
@@ -18,6 +11,10 @@ from ebook_converter.css_selectors.ordered_set import OrderedSet
|
||||
|
||||
from ebook_converter.polyglot.builtins import iteritems, itervalues
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
PARSE_CACHE_SIZE = 200
|
||||
parse_cache = OrderedDict()
|
||||
XPATH_CACHE_SIZE = 30
|
||||
|
||||
@@ -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__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import unittest, sys, argparse
|
||||
|
||||
from lxml import etree, html
|
||||
@@ -14,6 +7,10 @@ from ebook_converter.css_selectors.parser import tokenize, parse
|
||||
from ebook_converter.css_selectors.select import Select
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
class TestCSSSelectors(unittest.TestCase):
|
||||
|
||||
# Test data {{{
|
||||
|
||||
Reference in New Issue
Block a user