[2/3] isort: add initial config

Message ID 20200601205107.2374989-2-lains@archlinux.org
State New
Headers show
Series
  • [1/3] flake8: add initial config
Related show

Commit Message

Filipe Laíns June 1, 2020, 8:51 p.m. UTC
Signed-off-by: Filipe Laíns <lains@archlinux.org>
---
 aurweb/git/auth.py              | 2 +-
 aurweb/git/update.py            | 2 +-
 aurweb/initdb.py                | 7 ++++---
 aurweb/schema.py                | 2 +-
 aurweb/scripts/aurblup.py       | 3 ++-
 aurweb/scripts/rendercomment.py | 3 ++-
 migrations/env.py               | 9 +++++----
 schema/gendummydata.py          | 7 +++----
 setup.cfg                       | 4 ++++
 setup.py                        | 3 ++-
 10 files changed, 25 insertions(+), 17 deletions(-)

Patch

diff --git a/aurweb/git/auth.py b/aurweb/git/auth.py
index f0e47ad2..abecd276 100755
--- a/aurweb/git/auth.py
+++ b/aurweb/git/auth.py
@@ -1,7 +1,7 @@ 
 #!/usr/bin/env python3
 
-import shlex
 import re
+import shlex
 import sys
 
 import aurweb.config
diff --git a/aurweb/git/update.py b/aurweb/git/update.py
index 9f3c7944..929b254e 100755
--- a/aurweb/git/update.py
+++ b/aurweb/git/update.py
@@ -1,12 +1,12 @@ 
 #!/usr/bin/env python3
 
 import os
-import pygit2
 import re
 import subprocess
 import sys
 import time
 
+import pygit2
 import srcinfo.parse
 import srcinfo.utils
 
diff --git a/aurweb/initdb.py b/aurweb/initdb.py
index 91777f7e..c8d0b2ae 100644
--- a/aurweb/initdb.py
+++ b/aurweb/initdb.py
@@ -1,11 +1,12 @@ 
-import aurweb.db
-import aurweb.schema
+import argparse
 
 import alembic.command
 import alembic.config
-import argparse
 import sqlalchemy
 
+import aurweb.db
+import aurweb.schema
+
 
 def feed_initial_data(conn):
     conn.execute(aurweb.schema.AccountTypes.insert(), [
diff --git a/aurweb/schema.py b/aurweb/schema.py
index 96c38e57..20f3e5ce 100644
--- a/aurweb/schema.py
+++ b/aurweb/schema.py
@@ -6,7 +6,7 @@  usually be automatically generated. See `migrations/README` for details.
 """
 
 
-from sqlalchemy import CHAR, Column, ForeignKey, Index, MetaData, String, TIMESTAMP, Table, Text, text
+from sqlalchemy import CHAR, TIMESTAMP, Column, ForeignKey, Index, MetaData, String, Table, Text, text
 from sqlalchemy.dialects.mysql import BIGINT, DECIMAL, INTEGER, TINYINT
 from sqlalchemy.ext.compiler import compiles
 
diff --git a/aurweb/scripts/aurblup.py b/aurweb/scripts/aurblup.py
index a7d43f12..e32937ce 100755
--- a/aurweb/scripts/aurblup.py
+++ b/aurweb/scripts/aurblup.py
@@ -1,8 +1,9 @@ 
 #!/usr/bin/env python3
 
-import pyalpm
 import re
 
+import pyalpm
+
 import aurweb.config
 import aurweb.db
 
diff --git a/aurweb/scripts/rendercomment.py b/aurweb/scripts/rendercomment.py
index d3453c54..422dd33b 100755
--- a/aurweb/scripts/rendercomment.py
+++ b/aurweb/scripts/rendercomment.py
@@ -1,9 +1,10 @@ 
 #!/usr/bin/env python3
 
-import pygit2
 import sys
+
 import bleach
 import markdown
+import pygit2
 
 import aurweb.config
 import aurweb.db
diff --git a/migrations/env.py b/migrations/env.py
index 1627e693..c2ff58c1 100644
--- a/migrations/env.py
+++ b/migrations/env.py
@@ -1,10 +1,11 @@ 
-import aurweb.db
-import aurweb.schema
-
-from alembic import context
 import logging.config
+
 import sqlalchemy
 
+from alembic import context
+
+import aurweb.db
+import aurweb.schema
 
 # this is the Alembic Config object, which provides
 # access to the values within the .ini file in use.
diff --git a/schema/gendummydata.py b/schema/gendummydata.py
index ec67c609..b3a73ef2 100755
--- a/schema/gendummydata.py
+++ b/schema/gendummydata.py
@@ -10,12 +10,11 @@  usage: gendummydata.py outputfilename.sql
 # insert these users/packages into the AUR database.
 #
 import hashlib
-import random
-import time
+import logging
 import os
+import random
 import sys
-import logging
-
+import time
 
 LOG_LEVEL = logging.DEBUG  # logging level. set to logging.INFO to reduce output
 SEED_FILE = "/usr/share/dict/words"
diff --git a/setup.cfg b/setup.cfg
index 04f5b8ba..b868c096 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,3 +2,7 @@ 
 max-line-length = 127
 max-complexity = 10
 
+[isort]
+line_length = 127
+lines_between_types = 1
+
diff --git a/setup.py b/setup.py
index ca26f0d8..cf88488c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,8 @@ 
 import re
-from setuptools import setup, find_packages
 import sys
 
+from setuptools import find_packages, setup
+
 version = None
 with open('web/lib/version.inc.php', 'r') as f:
     for line in f.readlines():