Skip to content

Commit c373128

Browse files
committed
add isort
Signed-off-by: Filipe Laíns <lains@archlinux.org>
1 parent 2d650b7 commit c373128

4 files changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/checks.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,21 @@ jobs:
4747
- name: Run flake8
4848
run: flake8 --show-source --statistics install
4949

50+
isort:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v1
55+
56+
- name: Set up Python
57+
uses: actions/setup-python@v1
58+
59+
- name: Install flake8
60+
run: |
61+
pip install --upgrade pip
62+
pip install isort
63+
isort --version
64+
65+
- name: Run isort
66+
run: isort --check-only --diff --recursive install
67+

install/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import compileall
99
import configparser
1010
import logging
11-
import pickle
1211
import os
12+
import pickle
1313
import re
1414
import shutil
1515
import sys

install/__main__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@
77
import os
88
import shutil
99
import sys
10-
import warnings
1110
import traceback
1211
import typing
12+
import warnings
1313

1414
from typing import Optional, TextIO
1515

16+
# isort:maintain_block
1617
if False: # TYPE_CHECKING
1718
from typing import Type # not in 3.5.{0,1}
19+
# isort:end_maintain_block
20+
1821

19-
from . import build, install, InstallException, IncompleteInstallationWarning
22+
from . import IncompleteInstallationWarning, InstallException, build, install # isort:skip # until isort 5.0.0
2023

2124

2225
logger = logging.getLogger('install.main')

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ max-complexity = 10
55
[mypy]
66
ignore_missing_imports = True
77
strict = True
8+
9+
[isort]
10+
line_length = 127
11+
lines_between_types = 1

0 commit comments

Comments
 (0)