Skip to content

Commit

Permalink
compatibility fix for isort
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Nov 8, 2020
1 parent bddf61a commit 1f56ce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datamodel_code_generator/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import black
import toml
from isort import SortImports
import isort


class PythonVersion(Enum):
Expand Down Expand Up @@ -49,4 +49,4 @@ def apply_black(code: str, python_version: PythonVersion) -> str:


def apply_isort(code: str) -> str:
return SortImports(file_contents=code).output
return isort.code(code)

0 comments on commit 1f56ce4

Please sign in to comment.