Skip to content

Commit f43fa99

Browse files
author
manuel
committed
Issue-20: Running isort on project with --profile black arg
Signed-off-by: Manuel Beja da Costa <manuelbejadacosta@gmail.com>
1 parent 09cc7a1 commit f43fa99

9 files changed

+29
-24
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ repos:
55
hooks:
66
- id: black
77

8-
# - repo: https://github.com/timothycrosley/isort
9-
# rev: 5.6.4
10-
# hooks:
11-
# - id: isort
8+
- repo: https://github.com/timothycrosley/isort
9+
rev: 5.6.4
10+
hooks:
11+
- id: isort
12+
args: ["--profile", "black"]
1213
#
1314
# - repo: https://github.com/pre-commit/pre-commit-hooks
1415
# rev: v3.3.0

pytexit/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from __future__ import absolute_import
77

88
from .core import *
9-
from .pytexit import py2tex, for2py, for2tex
9+
from .pytexit import for2py, for2tex, py2tex
1010

1111

1212
def __get_version__():
13-
from os.path import join, dirname
13+
from os.path import dirname, join
1414

1515
# Read version number from file
1616
with open(join(dirname(__file__), "__version__.txt")) as version_file:

pytexit/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
44
"""
55

6-
from .core import clean, LatexVisitor, uprint, simplify
6+
from .core import LatexVisitor, clean, simplify, uprint
77
from .docx import WordVisitor
88
from .fortran import for2py

pytexit/core/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
from __future__ import absolute_import, division, print_function, unicode_literals
77

8-
import sys
9-
import re
108
import ast
9+
import re
10+
import sys
1111
from warnings import warn
12-
from six.moves import range
13-
from six.moves import map
12+
13+
from six.moves import map, range
1414

1515
unicode_tbl = {
1616
"α": "alpha",

pytexit/pytexit.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@
55
66
"""
77

8-
from __future__ import absolute_import
9-
from __future__ import division
10-
from __future__ import print_function
11-
from __future__ import unicode_literals
8+
from __future__ import absolute_import, division, print_function, unicode_literals
129

13-
import sys
1410
import ast
11+
import sys
12+
1513
import six
1614

1715
try:
18-
from pytexit.core.core import preprocessing, LatexVisitor, uprint, simplify
16+
from pytexit.core.core import LatexVisitor, preprocessing, simplify, uprint
1917
from pytexit.core.docx import WordVisitor
2018
from pytexit.core.fortran import for2py
2119
except: # if run locally as a script
22-
from core.core import preprocessing, LatexVisitor, uprint, simplify
20+
from core.core import LatexVisitor, preprocessing, simplify, uprint
2321
from core.docx import WordVisitor
2422
from core.fortran import for2py
2523
try:

pytexit/test/test_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from __future__ import absolute_import, division, print_function, unicode_literals
77

88
import sys
9-
from pytexit import py2tex, uprint, simplify
9+
10+
from pytexit import py2tex, simplify, uprint
1011

1112

1213
def test_py2tex(verbose=True, **kwargs):

register.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
1313
"""
1414

15-
from __future__ import print_function, absolute_import
15+
from __future__ import absolute_import, print_function
16+
1617
import os
1718
import shutil
1819

setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
from __future__ import absolute_import
2-
from setuptools import setup, find_packages
3-
import os
4-
import io
2+
53
import codecs
6-
from os.path import join, dirname, abspath, exists
4+
import io
5+
import os
6+
from os.path import abspath, dirname, exists, join
7+
8+
from setuptools import find_packages, setup
9+
710
from setuptips import yield_sphinx_only_markup
811

912
description = "Convert a Python expression to a LaTeX formula"

setuptips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import re
77

8+
89
# Utils to format RST
910
def yield_sphinx_only_markup(lines):
1011
"""

0 commit comments

Comments
 (0)