From 51700068b976459bfadbf55596abd7d19d382271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 10 Apr 2019 12:21:14 +0200 Subject: [PATCH] pantalaimon: Isort the repo. --- pantalaimon/client.py | 15 ++++----------- pantalaimon/daemon.py | 26 +++++++++++--------------- pantalaimon/store.py | 14 ++++---------- setup.py | 2 +- tests/store_test.py | 16 +++++++--------- 5 files changed, 27 insertions(+), 46 deletions(-) diff --git a/pantalaimon/client.py b/pantalaimon/client.py index 24ae40f..3fa9ed5 100644 --- a/pantalaimon/client.py +++ b/pantalaimon/client.py @@ -1,17 +1,10 @@ import asyncio -from typing import Any, Dict from pprint import pformat +from typing import Any, Dict -from nio import ( - AsyncClient, - RoomEncryptedEvent, - MegolmEvent, - EncryptionError, - SyncResponse, - KeysQueryResponse, - LocalProtocolError, - GroupEncryptionError -) +from nio import (AsyncClient, EncryptionError, GroupEncryptionError, + KeysQueryResponse, LocalProtocolError, MegolmEvent, + RoomEncryptedEvent, SyncResponse) from pantalaimon.log import logger diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index 34cbda2..ad9d292 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -1,25 +1,21 @@ #!/usr/bin/env python3 -import attr import asyncio -import aiohttp -import os import json -import logbook - -import click +import os from ipaddress import ip_address -from urllib.parse import urlparse -from logbook import StderrHandler - -from aiohttp import web, ClientSession -from nio import ( - LoginResponse, - GroupEncryptionError, -) -from appdirs import user_data_dir from json import JSONDecodeError +from urllib.parse import urlparse + +import aiohttp +import attr +import click +import logbook +from aiohttp import ClientSession, web +from appdirs import user_data_dir +from logbook import StderrHandler from multidict import CIMultiDict +from nio import GroupEncryptionError, LoginResponse from pantalaimon.client import PantaClient from pantalaimon.log import logger diff --git a/pantalaimon/store.py b/pantalaimon/store.py index fd3285c..ecfd7e6 100644 --- a/pantalaimon/store.py +++ b/pantalaimon/store.py @@ -1,16 +1,10 @@ import os +from typing import List, Optional, Tuple + import attr -from typing import Tuple, List, Optional - -from peewee import ( - Model, - TextField, - ForeignKeyField, - DoesNotExist, - SqliteDatabase -) - from nio.store import Accounts, use_database +from peewee import (DoesNotExist, ForeignKeyField, Model, SqliteDatabase, + TextField) class AccessTokens(Model): diff --git a/setup.py b/setup.py index e5f3981..f4857ac 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from setuptools import setup, find_packages +from setuptools import find_packages, setup setup( name="pantalaimon", diff --git a/tests/store_test.py b/tests/store_test.py index 2bbf0e6..0891d21 100644 --- a/tests/store_test.py +++ b/tests/store_test.py @@ -1,18 +1,16 @@ import pdb -import pytest -import tempfile import shutil +import tempfile +from random import choices +from string import ascii_letters, ascii_uppercase, digits -from nio.crypto import OlmAccount -from nio.store import SqliteStore -from pantalaimon.store import PanStore - +import pytest from faker import Faker from faker.providers import BaseProvider +from nio.crypto import OlmAccount +from nio.store import SqliteStore -from random import choices -from string import digits, ascii_letters, ascii_uppercase - +from pantalaimon.store import PanStore faker = Faker()