Skip to content

Commit

Permalink
isort
Browse files Browse the repository at this point in the history
  • Loading branch information
th3-z committed Oct 6, 2019
1 parent cbf7dda commit 8e230d5
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 39 deletions.
6 changes: 3 additions & 3 deletions admin_patches/admin_patches.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from os import path
import argparse
import gettext
from os import path

from utils import find_data_file, die, info
from utils.patcher import validate_files, patch_files
from utils import die, find_data_file, info
from utils.patcher import patch_files, validate_files

_ = gettext.gettext

Expand Down
17 changes: 9 additions & 8 deletions admin_patches/utils/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@
"""
from __future__ import print_function

__author__ = "anatoly techtonik <techtonik@gmail.com>"
__version__ = "1.16"

import copy
import logging
import os
import posixpath
import re
import shutil
import sys
from os.path import abspath, exists, isfile

__author__ = "anatoly techtonik <techtonik@gmail.com>"
__version__ = "1.16"


# cStringIO doesn't support unicode in 2.5
try:
Expand All @@ -29,11 +35,6 @@
except ImportError:
import urllib.request as urllib_request

from os.path import exists, isfile, abspath
import os
import posixpath
import shutil
import sys


PY3K = sys.version_info >= (3, 0)
Expand Down
2 changes: 1 addition & 1 deletion admin_patches/utils/patcher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gettext
import os
from hashlib import md5
import gettext

from checksums import ORIG_MD5
from utils import find_data_file, info, warning
Expand Down
5 changes: 2 additions & 3 deletions magicked_admin/chatbot/chatbot.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from os import path
import gettext
from os import path

from chatbot import INIT_TEMPLATE
from chatbot.command_map import CommandMap
from chatbot.command_scheduler import CommandScheduler
from utils import debug, find_data_file
from utils import debug, find_data_file, warning
from web_admin.chat import ChatListener
from web_admin.constants import *
from utils import warning

_ = gettext.gettext

Expand Down
2 changes: 1 addition & 1 deletion magicked_admin/chatbot/command_scheduler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gettext
import threading
import time
import gettext

from chatbot.commands.command import Command
from utils import warning
Expand Down
4 changes: 2 additions & 2 deletions magicked_admin/chatbot/commands/command.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from argparse import ArgumentError
import gettext
from argparse import ArgumentError

from chatbot.commands.argument_parser import ArgumentParser
from utils import debug, BANNER_URL
from utils import BANNER_URL, debug
from utils.text import pad_output
from web_admin.constants import *

Expand Down
5 changes: 2 additions & 3 deletions magicked_admin/chatbot/commands/event_commands.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from chatbot.command_scheduler import (CommandOnJoin, CommandOnTime,
CommandOnTrader, CommandOnWave,
ALL_WAVES)
from chatbot.command_scheduler import (ALL_WAVES, CommandOnJoin, CommandOnTime,
CommandOnTrader, CommandOnWave)
from chatbot.commands.command import Command


Expand Down
2 changes: 1 addition & 1 deletion magicked_admin/chatbot/commands/info_commands.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import time
import os
import time

from chatbot.commands.command import Command
from server.player import Player
Expand Down
2 changes: 1 addition & 1 deletion magicked_admin/chatbot/commands/server_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import server.game as game
from chatbot.commands.command import Command
from web_admin.constants import *
from utils import find_data_file
from web_admin.constants import *


class CommandBan(Command):
Expand Down
2 changes: 1 addition & 1 deletion magicked_admin/database/database.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import gettext
import sqlite3
from os import path
from threading import Lock
import gettext

from utils import find_data_file, info

Expand Down
4 changes: 2 additions & 2 deletions magicked_admin/magicked_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
Released under the terms of the MIT license
"""

import argparse
import gettext
import os
import signal
import sys
import argparse

from colorama import init

Expand All @@ -18,7 +19,6 @@
from utils import banner, die, find_data_file, info, warning
from utils.net import phone_home
from utils.text import str_to_bool
import gettext

_ = gettext.gettext

Expand Down
3 changes: 2 additions & 1 deletion magicked_admin/server/game.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gettext

import web_admin as api
from web_admin.constants import *
import gettext

_ = gettext.gettext

Expand Down
4 changes: 2 additions & 2 deletions magicked_admin/server/game_tracker.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import gettext
import threading
import time
import gettext

from colorama import init
from termcolor import colored

from utils import BANNER_URL, warning
from web_admin.constants import *


_ = gettext.gettext
init()

Expand Down
2 changes: 1 addition & 1 deletion magicked_admin/server/motd_updater.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gettext
import threading
import time
import gettext
from os import path

from utils import debug, find_data_file, warning
Expand Down
2 changes: 1 addition & 1 deletion magicked_admin/server/player.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import time
import gettext
import time

_ = gettext.gettext

Expand Down
3 changes: 2 additions & 1 deletion magicked_admin/server/server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from termcolor import colored
import gettext

from termcolor import colored

import web_admin as api
from database.database import ServerDatabase
from server.game import Game, GameMap
Expand Down
2 changes: 1 addition & 1 deletion magicked_admin/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import configparser
import gettext
import os
from getpass import getpass
import gettext

from utils import die, fatal, find_data_file, info
from utils.net import resolve_address
Expand Down
3 changes: 2 additions & 1 deletion magicked_admin/utils/net.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gettext
from urllib.parse import urlparse
from urllib.request import urlopen
import gettext

import requests

_ = gettext.gettext
Expand Down
3 changes: 2 additions & 1 deletion magicked_admin/web_admin/web_admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from itertools import groupby
import gettext
from itertools import groupby

from lxml import html

from utils import warning
Expand Down
3 changes: 2 additions & 1 deletion magicked_admin/web_admin/web_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gettext
import time
from hashlib import sha1
import gettext

import requests
from lxml import html

Expand Down
5 changes: 2 additions & 3 deletions tests/magicked_admin/utils/test_text.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import pytest

from magicked_admin.utils.text import (
str_to_bool, trim_string, pad_output, millify
)
from magicked_admin.utils.text import (millify, pad_output, str_to_bool,
trim_string)


def test_str_to_bool():
Expand Down

0 comments on commit 8e230d5

Please sign in to comment.