mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
remove unused imports, rectify isort violations
Files got into the branch that violate both PEP-8 guidelines and isorts. This fixes them. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
4d1faca447
commit
5ceeb88bee
7 changed files with 12 additions and 21 deletions
|
@ -305,7 +305,7 @@ def main(): # noqa: C901
|
|||
|
||||
try:
|
||||
metadata_pkgbase = metadata['pkgbase']
|
||||
except KeyError as e:
|
||||
except KeyError:
|
||||
die_commit('invalid .SRCINFO, does not contain a pkgbase (is the file empty?)',
|
||||
str(commit.id))
|
||||
if not re.match(repo_regex, metadata_pkgbase):
|
||||
|
|
|
@ -65,8 +65,6 @@ class User:
|
|||
|
||||
def valid_password(self, password: str):
|
||||
""" Check authentication against a given password. """
|
||||
from aurweb.db import session
|
||||
|
||||
if password is None:
|
||||
return False
|
||||
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
decorators in some way; more complex routes should be defined in their
|
||||
own modules and imported here. """
|
||||
from http import HTTPStatus
|
||||
from urllib.parse import unquote
|
||||
|
||||
from fastapi import APIRouter, Form, Request, HTTPException
|
||||
from fastapi import APIRouter, Form, HTTPException, Request
|
||||
from fastapi.responses import HTMLResponse, RedirectResponse
|
||||
|
||||
from aurweb.templates import make_context, render_template
|
||||
|
|
|
@ -6,6 +6,7 @@ Create Date: 2020-06-08 10:04:13.898617
|
|||
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
from sqlalchemy.engine.reflection import Inspector
|
||||
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
"""initial revision
|
||||
|
||||
Revision ID: f47cad5d6d03
|
||||
Revises:
|
||||
Create Date: 2020-02-23 13:23:32.331396
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'f47cad5d6d03'
|
||||
down_revision = None
|
||||
|
|
|
@ -4,8 +4,6 @@ import pytest
|
|||
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
import aurweb.config
|
||||
|
||||
from aurweb.auth import BasicAuthBackend, has_credential
|
||||
from aurweb.db import create, query
|
||||
from aurweb.models.account_type import AccountType
|
||||
|
|
Loading…
Add table
Reference in a new issue