Skip to content

Commit 9151d5b

Browse files
committed
Formatted imports with isort
1 parent 5408a0e commit 9151d5b

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

fprettify/__init__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@
6565
whitespaces
6666
- open files only when needed
6767
"""
68-
import re
69-
import sys
68+
import io
7069
import logging
7170
import os
72-
import io
71+
import re
72+
import sys
7373

7474
sys.stdin = io.TextIOWrapper(sys.stdin.detach(), encoding="UTF-8", line_buffering=True)
7575
sys.stdout = io.TextIOWrapper(
@@ -78,22 +78,22 @@
7878

7979

8080
from .fparse_utils import (
81-
VAR_DECL_RE,
81+
CPP_RE,
82+
FYPP_LINE_RE,
83+
FYPP_WITHOUT_PREPRO_RE,
84+
NOTFORTRAN_FYPP_LINE_RE,
85+
NOTFORTRAN_LINE_RE,
8286
OMP_COND_RE,
8387
OMP_DIR_RE,
84-
InputStream,
88+
RE_FLAGS,
89+
STR_OPEN_RE,
90+
VAR_DECL_RE,
8591
CharFilter,
8692
FprettifyException,
87-
FprettifyParseException,
8893
FprettifyInternalException,
89-
CPP_RE,
90-
NOTFORTRAN_LINE_RE,
91-
NOTFORTRAN_FYPP_LINE_RE,
92-
FYPP_LINE_RE,
93-
RE_FLAGS,
94-
STR_OPEN_RE,
94+
FprettifyParseException,
95+
InputStream,
9596
parser_re,
96-
FYPP_WITHOUT_PREPRO_RE,
9797
)
9898

9999
# recognize fortran files by extension

fprettify/tests/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@
2121
"""Dynamically create tests based on examples in examples/before."""
2222
from __future__ import absolute_import, division, print_function, unicode_literals
2323

24-
import sys
25-
import os
26-
import unittest
24+
import difflib
2725
import hashlib
28-
import logging
26+
import inspect
2927
import io
28+
import logging
29+
import os
3030
import re
31-
import difflib
3231
import subprocess
33-
import inspect
32+
import sys
33+
import unittest
3434

3535
sys.stderr = io.TextIOWrapper(
3636
sys.stderr.detach(), encoding="UTF-8", line_buffering=True
3737
)
3838

3939
import fprettify
40-
from fprettify.fparse_utils import FprettifyParseException, FprettifyInternalException
40+
from fprettify.fparse_utils import FprettifyInternalException, FprettifyParseException
4141

4242

4343
def joinpath(path1, path2):

run_tests.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
# along with fprettify. If not, see <http://www.gnu.org/licenses/>.
1919
###############################################################################
2020

21-
import unittest
22-
from fprettify.tests import FPrettifyTestCase, FAILED_FILE, RESULT_FILE
21+
import argparse
2322
import fileinput
2423
import io
2524
import os
2625
import sys
27-
import argparse
26+
import unittest
27+
28+
from fprettify.tests import FAILED_FILE, RESULT_FILE, FPrettifyTestCase
2829

2930
if __name__ == "__main__":
3031
parser = argparse.ArgumentParser(

0 commit comments

Comments
 (0)