Skip to content

Commit c2aa5ec

Browse files
committed
Supported isort >= 5
1 parent 2fa70a7 commit c2aa5ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Coco/utils/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
try:
2525
import isort
2626

27-
isort_obj = isort.SortImports(file_contents="",)
27+
isort_cfg = isort.api.Config()
2828

2929
def classifyImportModuleName(moduleName: str) -> str:
30-
return isort_obj.place_module(moduleName)
30+
return isort.api.place_module(moduleName, isort_cfg)
3131

3232

3333
except ImportError:

0 commit comments

Comments
 (0)