Skip to content

Commit 93a6fc4

Browse files
committed
Fix module docstrings to occur before __future__ import.
1 parent b7cce84 commit 93a6fc4

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

html5lib/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, unicode_literals
2-
31
"""
42
HTML parsing library based on the WHATWG "HTML5"
53
specification. The parser is designed to be compatible with existing
@@ -12,6 +10,9 @@
1210
f = open("my_document.html")
1311
tree = html5lib.parse(f)
1412
"""
13+
14+
from __future__ import absolute_import, division, unicode_literals
15+
1516
__version__ = "0.95-dev"
1617
from .html5parser import HTMLParser, parse, parseFragment
1718
from .treebuilders import getTreeBuilder

html5lib/treebuilders/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, unicode_literals
2-
31
"""A collection of modules for building different kinds of tree from
42
HTML documents.
53
@@ -32,6 +30,8 @@
3230
the various methods.
3331
"""
3432

33+
from __future__ import absolute_import, division, unicode_literals
34+
3535
treeBuilderCache = {}
3636

3737
import sys

html5lib/treebuilders/etree_lxml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, unicode_literals
2-
31
"""Module for supporting the lxml.etree library. The idea here is to use as much
42
of the native library as possible, without using fragile hacks like custom element
53
names that break between releases. The downside of this is that we cannot represent
@@ -11,6 +9,8 @@
119
When any of these things occur, we emit a DataLossWarning
1210
"""
1311

12+
from __future__ import absolute_import, division, unicode_literals
13+
1414
import warnings
1515
import re
1616
import sys

html5lib/treewalkers/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, unicode_literals
2-
31
"""A collection of modules for iterating through different kinds of
42
tree, generating tokens identical to those produced by the tokenizer
53
module.
@@ -10,6 +8,8 @@
108
returning an iterator generating tokens.
119
"""
1210

11+
from __future__ import absolute_import, division, unicode_literals
12+
1313
import sys
1414

1515
treeWalkerCache = {}

0 commit comments

Comments
 (0)