From patchwork Mon Jun 1 20:51:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Filipe_La=C3=ADns?= X-Patchwork-Id: 1659 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 66CA6191DF8B6 for ; Mon, 1 Jun 2020 20:52:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on apollo.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01,SPF_HELO_NONE=0.001,T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: [127.0.9.2] [127.0.0.19] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 1 Jun 2020 20:52:02 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id C9C931C756B32D; Mon, 1 Jun 2020 20:51:47 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: luna) by orion.archlinux.org (Postfix) with ESMTPSA id 0AE0A1C756B30C; Mon, 1 Jun 2020 20:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1591044703; bh=AHgesl3le2A48YA4cF5aNzc7d0RXy4LaNQim0+xyOT0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=m9pa8mD8xcuzKksen+0r73cwNlVhayDn5Xw38CVNlvzRqnGDrl8ys8OeENLkMXPj/ EITguPXtY8elkCSvOG9fomZyBlbFnYbTwkZDU4lTyLTfEywGDzZDX+NadiURS7NN4A zQx3TtPYECMBnbaVtQ5szj83jmaPc4teH2nTh6FTpu69hVr7x/sQsgbvDvgGjD+cF/ ktGoTvM6d6nnHVwZScOK5teiQj3GDQIl3MvPunpX+tcT/W+KjWBzQAAEYy33P8Fjcc uGEGGzCPFdexGqCfuyLq93UxPJt4pVfM4/ZijfXwSl/0MOoC/YZrr/HhaYCNDcYv3F Fn6JfmGRfK2wOhdQG6JyGnZkbQZ8tjDz7/nA4ihXzvJrp2elbfjLOanXj2RUSCO35+ FCeCo9p+pGxWY6aufNe7LZddEOmA8fBZEzYKiGSB0Ly3wOOsuFUQXYYEkR+Wns31tl akZWUKdHFmGPzfhYlOVV9jLoJcFUEt0L6SlsIsXEcjzSSxdKnl/etVxgpXXznmV/Fn k1mDfWhcISR8/Tzm3AKSxoMdalifZJp21AhWntsyyLF2kHtr2SkhzcJ3aJ3daIXM5X YtXxbiK9do/mooecC0611nD4hEtE3ivg1raFryKGiiY25VlXDyPpQDwQP5c1avFmEq To4bcl3JIAYV4N3IZC6VlNtw= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 5BF212C020; Mon, 1 Jun 2020 20:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1591044700; bh=AHgesl3le2A48YA4cF5aNzc7d0RXy4LaNQim0+xyOT0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=UqSZFUcrfzkORUENx84X1p07MPmijzmAN+FAsbA0dNNpEYrIE8xRF1McG9ku1H5Vb dThu3UEcLQ81E6GFZo7injmGyyVK1pUF9ZQS1q7E35PuxjM+ROm+2VYERPWVUsDSV1 2sbE0mKwYcoK58WhWdody7kXszmsGHeGUrLiRnjLpMPj3Y1O0rs8r/bOLK8blCbrN7 MZL+u804uKbZiwcrN0RDIwavT2bwdOEZDX5MV4RmxKcZ8iyZqu/KYPe7cxo8rE4pYj e0lTTNXm+zhacCXXmEFj2WugtQi8VXgMsmq3PrIAlj/s7mUWNp2Y0pNZft7RE0y62h CUSsaFGcVZSb57zsUstjaMPcqtw8/qWjvhrAVpeZQSJwbjS3tHXeWaDDlpJdDffuP/ wWXveBMhqs2viulMZzttL7puALjkE9coAiD9SWmhguMeuJ+E9xqCL0VEppvkeM+YOl DxlwqjpBO/cQsv14wtQRF4t+ValaYEMuOYVUtU2vNNGIh+4ZM4GmLT2N3KRVA52Bbg 94UMGU/p2MEjGinlHiwgOZwYkRk/r8IeymSNeJNE8WgMyoIlsnmiiJdTRZC233fuvt i+IUYoqNSUDw9FOQ8Iarn93ShX7skl3hbdexy1I4slVDW3PpL1qjgxLSY19iIv6FMn U1vgszL65+wBJR9gudfUUkYw= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 506B32C020 for ; Mon, 1 Jun 2020 20:51:37 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by luna.archlinux.org (Postfix) with ESMTPS for ; Mon, 1 Jun 2020 20:51:37 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 85E651C756B2F9; Mon, 1 Jun 2020 20:51:32 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2001:8a0:f254:2300:34be:8c97:bb49:e7fd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ffy00) by orion.archlinux.org (Postfix) with ESMTPSA; Mon, 1 Jun 2020 20:51:31 +0000 (UTC) From: =?utf-8?q?Filipe_La=C3=ADns?= To: aur-dev@archlinux.org Cc: =?utf-8?q?Filipe_La=C3=ADns?= Subject: [PATCH 2/3] isort: add initial config Date: Mon, 1 Jun 2020 21:51:06 +0100 Message-Id: <20200601205107.2374989-2-lains@archlinux.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601205107.2374989-1-lains@archlinux.org> References: <20200601205107.2374989-1-lains@archlinux.org> MIME-Version: 1.0 X-BeenThere: aur-dev@archlinux.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Arch User Repository \(AUR\) Development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: aur-dev-bounces@archlinux.org Sender: "aur-dev" Signed-off-by: Filipe LaĆ­ns --- 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(-) 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():