Skip to content

Commit

Permalink
manually remove fallback imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Sep 9, 2024
1 parent ef4c5ce commit fb864a9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
5 changes: 1 addition & 4 deletions html5lib/_trie/_base.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

try:
from collections.abc import Mapping
except ImportError: # Python 2.7
from collections.abc import Mapping
from collections.abc import Mapping


class Trie(Mapping):
Expand Down
5 changes: 1 addition & 4 deletions html5lib/_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@

from types import ModuleType

try:
from collections.abc import Mapping
except ImportError:
from collections.abc import Mapping
from collections.abc import Mapping

from six import text_type, PY3

Expand Down
5 changes: 1 addition & 4 deletions html5lib/treebuilders/dom.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@


try:
from collections.abc import MutableMapping
except ImportError: # Python 2.7
from collections.abc import MutableMapping
from collections.abc import MutableMapping
from xml.dom import minidom, Node
import weakref

Expand Down
5 changes: 1 addition & 4 deletions html5lib/treebuilders/etree_lxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
import re
import sys

try:
from collections.abc import MutableMapping
except ImportError:
from collections.abc import MutableMapping
from collections.abc import MutableMapping

from . import base
from ..constants import DataLossWarning
Expand Down

0 comments on commit fb864a9

Please sign in to comment.