File tree 7 files changed +10
-10
lines changed
7 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 13
13
from __future__ import unicode_literals
14
14
import io
15
15
import os
16
- from collections import MutableMapping
16
+ from collections . abc import MutableMapping
17
17
18
18
import appdirs
19
19
import yaml
Original file line number Diff line number Diff line change 13
13
from __future__ import unicode_literals
14
14
15
15
from abc import ABCMeta , abstractproperty
16
- import collections
16
+ from collections . abc import Sequence
17
17
import io
18
18
import json
19
19
import logging
33
33
34
34
35
35
@python_2_unicode_compatible
36
- class BaseDocument (six .with_metaclass (ABCMeta , collections . Sequence )):
36
+ class BaseDocument (six .with_metaclass (ABCMeta , Sequence )):
37
37
"""Abstract base class for a Document."""
38
38
39
39
def __repr__ (self ):
Original file line number Diff line number Diff line change 12
12
from __future__ import print_function
13
13
from __future__ import unicode_literals
14
14
from abc import abstractproperty
15
- import collections
15
+ from collections . abc import Sequence
16
16
import logging
17
17
import re
18
18
@@ -113,7 +113,7 @@ def _repr_html_(self):
113
113
return self .text
114
114
115
115
116
- class Text (collections . Sequence , BaseText ):
116
+ class Text (Sequence , BaseText ):
117
117
"""A passage of text, comprising one or more sentences."""
118
118
119
119
sentence_tokenizer = ChemSentenceTokenizer ()
Original file line number Diff line number Diff line change 14
14
15
15
import copy
16
16
from abc import ABCMeta
17
- from collections import MutableSequence
17
+ from collections . abc import MutableSequence
18
18
import json
19
19
import logging
20
20
Original file line number Diff line number Diff line change 11
11
from __future__ import division
12
12
from __future__ import print_function
13
13
from __future__ import unicode_literals
14
- import collections
14
+ from collections . abc import Sequence
15
15
import copy
16
16
import logging
17
17
import re
@@ -309,7 +309,7 @@ def __init__(self, exprs):
309
309
exprs = list (exprs )
310
310
if isinstance (exprs , six .text_type ):
311
311
self .exprs = [Word (exprs )]
312
- elif isinstance (exprs , collections . Sequence ):
312
+ elif isinstance (exprs , Sequence ):
313
313
if all (isinstance (expr , six .text_type ) for expr in exprs ):
314
314
exprs = map (Word , exprs )
315
315
self .exprs = list (exprs )
Original file line number Diff line number Diff line change 11
11
from __future__ import division
12
12
from __future__ import print_function
13
13
from __future__ import unicode_literals
14
- from collections import Sequence
14
+ from collections . abc import Sequence
15
15
import json
16
16
import logging
17
17
Original file line number Diff line number Diff line change 11
11
from __future__ import division
12
12
from __future__ import print_function
13
13
from __future__ import unicode_literals
14
- from collections import Sequence
14
+ from collections . abc import Sequence
15
15
from copy import deepcopy
16
16
import logging
17
17
import re
You can’t perform that action at this time.
0 commit comments