Skip to content

Commit fb864a9

Browse files
committedSep 9, 2024
manually remove fallback imports
1 parent ef4c5ce commit fb864a9

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed
 

Diff for: ‎html5lib/_trie/_base.py

+1-4
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):

Diff for: ‎html5lib/_utils.py

+1-4
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

Diff for: ‎html5lib/treebuilders/dom.py

+1-4
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

Diff for: ‎html5lib/treebuilders/etree_lxml.py

+1-4
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)