Skip to content

Commit

Permalink
Update code to work with isort5
Browse files Browse the repository at this point in the history
  • Loading branch information
schymans committed Aug 13, 2020
1 parent 2bba27a commit a80cccb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions essm/_generator.py
Expand Up @@ -25,8 +25,8 @@
import re
from collections import defaultdict

import isort
import pkg_resources
from isort import SortImports
from sympy import Eq, Function, latex, preorder_traversal
from sympy.physics.units import Quantity
from yapf.yapflib.yapf_api import FormatCode
Expand Down Expand Up @@ -92,7 +92,7 @@ class {name}(Variable):

def _lint_content(content):
"""Automatically lint the generated code."""
content = SortImports(file_contents=content).output
content = isort.code(content)
content = FormatCode(content, style_config=STYLE_YAPF)[0]
return content

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -30,7 +30,7 @@
tests_require = [
'check-manifest>=0.25',
'coverage>=4.0',
'isort>=4.2.2',
'isort>=5.0.0',
'pydocstyle>=1.0.0,<4.0.0',
'pytest-cache>=1.0',
'pytest-cov>=1.8.0',
Expand Down

0 comments on commit a80cccb

Please sign in to comment.