Import beautification

This commit is contained in:
Markus Unterwaditzer 2014-06-19 00:07:54 +02:00
parent 4bfc466d9f
commit 201c840e88
18 changed files with 40 additions and 33 deletions

View file

@ -11,7 +11,8 @@
'''
import ast
import re
from setuptools import setup, find_packages
from setuptools import find_packages, setup
_version_re = re.compile(r'__version__\s+=\s+(.*)')

View file

@ -10,10 +10,11 @@ import random
import pytest
from .. import assert_item_equals, SIMPLE_TEMPLATE
import vdirsyncer.exceptions as exceptions
from vdirsyncer.storage.base import Item
from vdirsyncer.utils.compat import text_type, iteritems
from vdirsyncer.utils.compat import iteritems, text_type
from .. import SIMPLE_TEMPLATE, assert_item_equals
class StorageTests(object):

View file

@ -4,6 +4,7 @@ import os
import sys
import pytest
import wsgi_intercept
import wsgi_intercept.requests_intercept

View file

@ -16,12 +16,14 @@ import pytest
import requests
import requests.exceptions
from .. import StorageTests
from tests import VCARD_TEMPLATE, TASK_TEMPLATE, EVENT_TEMPLATE
from tests import EVENT_TEMPLATE, TASK_TEMPLATE, VCARD_TEMPLATE
import vdirsyncer.exceptions as exceptions
from vdirsyncer.storage.base import Item
from vdirsyncer.storage.dav import CaldavStorage, CarddavStorage
from .. import StorageTests
dav_server = os.environ.get('DAV_SERVER', '').strip() or 'radicale'

View file

@ -12,9 +12,10 @@ import os
import pytest
from . import StorageTests
from vdirsyncer.storage.filesystem import FilesystemStorage
from . import StorageTests
class TestFilesystemStorage(StorageTests):
storage_class = FilesystemStorage

View file

@ -12,6 +12,7 @@ import pytest
from requests import Response
from tests import normalize_item
from vdirsyncer.storage.http import HttpStorage

View file

@ -8,9 +8,10 @@
:license: MIT, see LICENSE for more details.
'''
from . import StorageTests
from vdirsyncer.storage.memory import MemoryStorage
from . import StorageTests
class TestMemoryStorage(StorageTests):

View file

@ -9,10 +9,11 @@
import pytest
from .. import assert_item_equals, EVENT_TEMPLATE
from . import StorageTests
from vdirsyncer.storage.singlefile import SingleFileStorage
from . import StorageTests
from .. import EVENT_TEMPLATE, assert_item_equals
class TestSingleFileStorage(StorageTests):

View file

@ -9,10 +9,11 @@
import pytest
from . import assert_item_equals, normalize_item
from vdirsyncer.storage.base import Item
from vdirsyncer.storage.memory import MemoryStorage
from vdirsyncer.sync import sync, SyncConflict, StorageEmpty, BothReadOnly
from vdirsyncer.sync import BothReadOnly, StorageEmpty, SyncConflict, sync
from . import assert_item_equals, normalize_item
def empty_storage(x):

View file

@ -9,8 +9,8 @@
import vdirsyncer.utils.vobject as vobject
from .. import normalize_item, VCARD_TEMPLATE, BARE_EVENT_TEMPLATE, \
EVENT_TEMPLATE
from .. import BARE_EVENT_TEMPLATE, EVENT_TEMPLATE, VCARD_TEMPLATE, \
normalize_item
_simple_split = [
VCARD_TEMPLATE.format(r=123),

View file

@ -13,11 +13,10 @@ import sys
import argvard
from . import log
from .storage import storage_names
from .sync import sync, StorageEmpty, SyncConflict
from .utils import expand_path, parse_options, split_dict, get_class_init_args
import vdirsyncer.log as log
from .sync import StorageEmpty, SyncConflict, sync
from .utils import expand_path, get_class_init_args, parse_options, split_dict
try:

View file

@ -12,7 +12,7 @@
:license: MIT, see LICENSE for more details.
'''
from .dav import CarddavStorage, CaldavStorage
from .dav import CaldavStorage, CarddavStorage
from .filesystem import FilesystemStorage
from .http import HttpStorage
from .singlefile import SingleFileStorage

View file

@ -12,10 +12,9 @@ from lxml import etree
from requests import session as requests_session
from .base import Item, Storage
from .http import prepare_auth, prepare_verify, USERAGENT
from .. import exceptions, log, utils
from .base import Item, Storage
from .http import USERAGENT, prepare_auth, prepare_verify
dav_logger = log.get(__name__)

View file

@ -9,10 +9,9 @@
import os
from .. import exceptions, log
from .base import Item, Storage
import vdirsyncer.exceptions as exceptions
import vdirsyncer.log as log
from ..utils import expand_path, safe_write, get_etag_from_file, checkdir
from ..utils import checkdir, expand_path, get_etag_from_file, safe_write
from ..utils.compat import text_type
logger = log.get(__name__)

View file

@ -8,10 +8,10 @@
'''
from .base import Item, Storage
from ..exceptions import NotFoundError
from ..utils import expand_path, get_password, request
from ..utils.compat import text_type, urlparse
from ..utils.vobject import split_collection
from ..exceptions import NotFoundError
USERAGENT = 'vdirsyncer'

View file

@ -9,12 +9,11 @@
import collections
from .. import exceptions, log
from .base import Item, Storage
import vdirsyncer.exceptions as exceptions
import vdirsyncer.log as log
from ..utils import expand_path, safe_write, checkfile
from ..utils import checkfile, expand_path, safe_write
from ..utils.compat import itervalues
from ..utils.vobject import split_collection, join_collection
from ..utils.vobject import join_collection, split_collection
logger = log.get(__name__)

View file

@ -8,10 +8,11 @@
'''
import os
import requests
from .. import log, exceptions
from .compat import urlparse, get_raw_input, iteritems
from .. import exceptions, log
from .compat import get_raw_input, iteritems, urlparse
logger = log.get(__name__)

View file

@ -9,11 +9,11 @@
import hashlib
import icalendar.cal
import icalendar.parser
import icalendar.caselessdict
import icalendar.parser
from . import cached_property, split_sequence
from .compat import text_type, itervalues
from .compat import itervalues, text_type
def _process_properties(*s):