Skip to content

Commit

Permalink
Move imports of/from six module to right group of imports
Browse files Browse the repository at this point in the history
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
  • Loading branch information
frenzymadness authored and bowlofeggs committed Dec 8, 2017
1 parent dee30a7 commit 73f1b42
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion bodhi/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import functools

import click
import six

from bodhi.client import bindings
from fedora.client import AuthError
import six


def _warn_if_url_and_staging_set(ctx, param, value):
Expand Down
2 changes: 1 addition & 1 deletion bodhi/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
from pyramid.renderers import JSONP
from sqlalchemy import engine_from_config, event
from sqlalchemy.orm import scoped_session, sessionmaker
import six

from bodhi.server import bugs, buildsys, ffmarkdown
from bodhi.server.config import config as bodhi_config
import six


log = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions bodhi/server/bugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

import logging
from six.moves import xmlrpc_client

from collections import namedtuple
from kitchen.text.converters import to_unicode
import bugzilla
import six
from six.moves import xmlrpc_client

from bodhi.server.config import config
import six


bugtracker = None
Expand Down
4 changes: 2 additions & 2 deletions bodhi/server/consumers/masher.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

import fedmsg.consumers
import jinja2
from six.moves import zip
import six

from bodhi.server import bugs, initialize_db, log, buildsys, notifications, mail
from bodhi.server.config import config
Expand All @@ -47,8 +49,6 @@
from bodhi.server.models import (Update, UpdateRequest, UpdateType, Release,
UpdateStatus, ReleaseState, ContentType)
from bodhi.server.util import sorted_updates, sanity_check_repodata, transactional_session_maker
from six.moves import zip
import six


def checkpoint(method):
Expand Down
2 changes: 1 addition & 1 deletion bodhi/server/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

from kitchen.iterutils import iterate
from kitchen.text.converters import to_unicode, to_bytes
import six

from bodhi.server import log
from bodhi.server.config import config
from bodhi.server.util import get_rpm_header
import six


#
Expand Down
2 changes: 1 addition & 1 deletion bodhi/server/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

from kitchen.text.converters import to_bytes
import createrepo_c as cr
import six

from bodhi.server.buildsys import get_session
from bodhi.server.config import config
from bodhi.server.models import Build, UpdateStatus, UpdateRequest, UpdateSuggestion
import six


__version__ = '2.0'
Expand Down
4 changes: 2 additions & 2 deletions bodhi/server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

from pkgdb2client import PkgDB
from simplemediawiki import MediaWiki
from six.moves.urllib.parse import quote
from sqlalchemy import (and_, Boolean, Column, DateTime, ForeignKey, Integer, or_, Table, Unicode,
UnicodeText, UniqueConstraint)
from sqlalchemy.ext.declarative import declarative_base
Expand All @@ -41,6 +40,8 @@
from sqlalchemy.orm.properties import RelationshipProperty
from sqlalchemy.sql import text
from sqlalchemy.types import SchemaType, TypeDecorator, Enum
from six.moves.urllib.parse import quote
import six

from bodhi.server import bugs, buildsys, log, mail, notifications, Session
from bodhi.server.config import config
Expand All @@ -49,7 +50,6 @@
avatar as get_avatar, build_evr, flash_log, get_critpath_components,
get_nvr, get_rpm_header, header, packagename_from_nvr, tokenize, pagure_api_get)
import bodhi.server.util
import six


# http://techspot.zzzeek.org/2011/01/14/the-enum-recipe
Expand Down
2 changes: 1 addition & 1 deletion bodhi/server/scripts/approve_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
import sys

from pyramid.paster import get_appsettings
import six

from ..models import Update, UpdateStatus
from ..config import config
from bodhi.server import Session, initialize_db
import six


def usage(argv):
Expand Down
2 changes: 1 addition & 1 deletion bodhi/server/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
from pyramid.security import remember, forget
from pyramid.httpexceptions import HTTPFound
from pyramid.threadlocal import get_current_registry
import six

from . import log
from .models import User, Group
import six


#
Expand Down
4 changes: 2 additions & 2 deletions bodhi/server/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
import markdown
import requests
import rpm
from six.moves import map
import six

from bodhi.server import log, buildsys, Session
from bodhi.server.config import config
from bodhi.server.exceptions import RepodataException
from six.moves import map
import six


_ = TranslationStringFactory('bodhi')
Expand Down
4 changes: 2 additions & 2 deletions bodhi/server/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import koji
import pyramid.threadlocal
import rpm
from six.moves import map
import six

from . import captcha
from . import log
Expand Down Expand Up @@ -58,8 +60,6 @@
taskotron_results,
)
from bodhi.server.config import config
from six.moves import map
import six


csrf_error_message = """CSRF tokens do not match. This happens if you have
Expand Down
2 changes: 1 addition & 1 deletion bodhi/server/views/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
from pyramid.httpexceptions import HTTPFound
import cornice.errors
import sqlalchemy as sa
import six

from bodhi.server import log, models
from bodhi.server.config import config
import bodhi.server.util
import six


def get_top_testers(request):
Expand Down
2 changes: 1 addition & 1 deletion bodhi/tests/client/test_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

import fedora.client
import mock
import six

from bodhi.client import bindings
from bodhi.tests import client as client_test_data
import six


class TestBodhiClient___init__(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion bodhi/tests/server/consumers/test_masher.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import urlparse

import mock
import six

from bodhi.server import buildsys, exceptions, log, initialize_db
from bodhi.server.config import config
Expand All @@ -39,7 +40,6 @@
UpdateRequest, UpdateStatus, UpdateType, User, ModuleBuild, ContentType, Package)
from bodhi.server.util import mkmetadatadir, transactional_session_maker
from bodhi.tests.server import base, populate
import six


mock_exc = mock.Mock()
Expand Down
2 changes: 1 addition & 1 deletion bodhi/tests/server/services/test_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from mock import ANY
from webtest import TestApp
import mock
import six

from bodhi.server import main
from bodhi.server.config import config
Expand All @@ -34,7 +35,6 @@
ReleaseState, RpmBuild, Update, UpdateRequest, UpdateStatus, UpdateType,
UpdateSeverity, User, TestGatingStatus)
from bodhi.tests.server import base
import six


YEAR = time.localtime().tm_year
Expand Down
2 changes: 1 addition & 1 deletion bodhi/tests/server/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import unittest

import mock
import six

from bodhi.server import config
import six


class BodhiConfigGetItemTests(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions bodhi/tests/server/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""Test suite for bodhi.server.models"""
from datetime import datetime, timedelta
from six.moves.html_parser import HTMLParser
import json
import pickle
import time
Expand All @@ -25,6 +24,8 @@
from sqlalchemy.exc import IntegrityError
import cornice
import mock
from six.moves.html_parser import HTMLParser
import six

from bodhi.server import models as model, buildsys, mail, util, Session
from bodhi.server.config import config
Expand All @@ -33,7 +34,6 @@
BugKarma, ReleaseState, UpdateRequest, UpdateSeverity, UpdateStatus,
UpdateSuggestion, UpdateType, TestGatingStatus)
from bodhi.tests.server.base import BaseTestCase
import six


class DummyUser(object):
Expand Down
2 changes: 1 addition & 1 deletion bodhi/tests/server/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

import mock
import pkgdb2client
import six

from bodhi.server import util
from bodhi.server.buildsys import setup_buildsystem, teardown_buildsystem
from bodhi.server.config import config
from bodhi.server.models import TestGatingStatus, Update, UpdateRequest, UpdateSeverity
from bodhi.tests.server import base
import six


class TestBugLink(base.BaseTestCase):
Expand Down
1 change: 1 addition & 0 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import shutil
import subprocess
import sys

import six


Expand Down
2 changes: 1 addition & 1 deletion tools/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
import sys

from sqlalchemy.sql import and_
import six

from bodhi.server import Session, initialize_db
from bodhi.server.models import Update, Release, UpdateStatus, UpdateType
from bodhi.server.util import header, get_critpath_components
import bodhi
import six


statuses = ('stable', 'testing', 'pending', 'obsolete')
Expand Down

0 comments on commit 73f1b42

Please sign in to comment.