File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 3434from commoncode import fileutils
3535from commoncode import filetype
3636from commoncode .system import on_linux
37- import typecode
37+
38+ from typecode import contenttype
3839
3940from extractcode import all_kinds
4041from extractcode import regular
@@ -165,7 +166,8 @@ def get_handlers(location):
165166 location = fileutils .fsencode (location )
166167
167168 if filetype .is_file (location ):
168- T = typecode .contenttype .get_type (location )
169+
170+ T = contenttype .get_type (location )
169171 ftype = T .filetype_file .lower ()
170172 mtype = T .mimetype_file
171173
Original file line number Diff line number Diff line change 4646from commoncode import filetype
4747from commoncode .system import on_linux
4848
49- from extractcode import archive
50-
5149from typecode import magic2
5250from typecode import entropy
5351
@@ -352,6 +350,8 @@ def is_archive(self):
352350 return self ._is_archive
353351 self ._is_archive = False
354352
353+ from extractcode import archive
354+
355355 ft = self .filetype_file .lower ()
356356 can_extract = bool (archive .can_extract (self .location ))
357357 docx_ext = 'x' if on_linux else u'x'
Original file line number Diff line number Diff line change @@ -892,3 +892,6 @@ def test_extract_can_extract_to_relative_paths(self):
892892 for r in result :
893893 assert [] == r .warnings
894894 assert [] == r .errors
895+
896+ def test_recursive_import (self ):
897+ from extractcode .extract import extract # NOQA
You can’t perform that action at this time.
0 commit comments