Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fb864a9

Browse filesBrowse files
committed
manually remove fallback imports
1 parent ef4c5ce commit fb864a9
Copy full SHA for fb864a9

File tree

4 files changed

+4
-16
lines changed
Filter options

4 files changed

+4
-16
lines changed

‎html5lib/_trie/_base.py

Copy file name to clipboardExpand all lines: html5lib/_trie/_base.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11

2-
try:
3-
from collections.abc import Mapping
4-
except ImportError: # Python 2.7
5-
from collections.abc import Mapping
2+
from collections.abc import Mapping
63

74

85
class Trie(Mapping):

‎html5lib/_utils.py

Copy file name to clipboardExpand all lines: html5lib/_utils.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11

22
from types import ModuleType
33

4-
try:
5-
from collections.abc import Mapping
6-
except ImportError:
7-
from collections.abc import Mapping
4+
from collections.abc import Mapping
85

96
from six import text_type, PY3
107

‎html5lib/treebuilders/dom.py

Copy file name to clipboardExpand all lines: html5lib/treebuilders/dom.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11

22

3-
try:
4-
from collections.abc import MutableMapping
5-
except ImportError: # Python 2.7
6-
from collections.abc import MutableMapping
3+
from collections.abc import MutableMapping
74
from xml.dom import minidom, Node
85
import weakref
96

‎html5lib/treebuilders/etree_lxml.py

Copy file name to clipboardExpand all lines: html5lib/treebuilders/etree_lxml.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
import re
1616
import sys
1717

18-
try:
19-
from collections.abc import MutableMapping
20-
except ImportError:
21-
from collections.abc import MutableMapping
18+
from collections.abc import MutableMapping
2219

2320
from . import base
2421
from ..constants import DataLossWarning

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.