Skip to content

Commit

Permalink
Set up isort
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Dec 4, 2020
1 parent 5ff4869 commit 4c78691
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
matrix:
toxenv:
- flake8
- isort

steps:
- name: Git clone
Expand Down
1 change: 1 addition & 0 deletions ghcloneall.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from concurrent import futures
from operator import attrgetter


try:
# Python 2
from ConfigParser import SafeConfigParser as ConfigParser
Expand Down
14 changes: 14 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,17 @@ license_file = LICENCE
[zest.releaser]
python-file-with-version = ghcloneall.py
create-wheel = yes

[isort]
# from X import (
# a,
# b,
# )
multi_line_output = 3
include_trailing_comma = true
lines_after_imports = 2
reverse_relative = true
default_section = THIRDPARTY
known_first_party = ghcloneall
# known_third_party = pytest, ...
# skip = filename...
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env python
import ast
import os

from setuptools import setup


here = os.path.dirname(__file__)
metadata = {}
with open(os.path.join(here, 'ghcloneall.py')) as f:
Expand Down
1 change: 1 addition & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import subprocess
import sys


try:
from cStringIO import StringIO
except ImportError: # pragma: PY3
Expand Down
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ commands = {[testenv:coverage]commands}
deps = flake8
skip_install = true
commands = flake8 ghcloneall.py setup.py tests.py

[testenv:isort]
deps = isort
skip_install = true
commands = isort {posargs: -c --diff ghcloneall.py setup.py tests.py}

0 comments on commit 4c78691

Please sign in to comment.