diff --git a/tests/storage/conftest.py b/tests/storage/conftest.py index 800e837..d102d57 100644 --- a/tests/storage/conftest.py +++ b/tests/storage/conftest.py @@ -2,6 +2,7 @@ import pytest import tempfile import shutil + @pytest.fixture def class_tmpdir(request): request.cls.tmpdir = x = tempfile.mkdtemp() diff --git a/tests/storage/dav/__init__.py b/tests/storage/dav/__init__.py index 0290c63..96c3d46 100644 --- a/tests/storage/dav/__init__.py +++ b/tests/storage/dav/__init__.py @@ -13,8 +13,6 @@ :license: MIT, see LICENSE for more details. ''' -import tempfile -import shutil import sys import os import urlparse diff --git a/tests/storage/dav/test_caldav.py b/tests/storage/dav/test_caldav.py index ce9c713..fdabf48 100644 --- a/tests/storage/dav/test_caldav.py +++ b/tests/storage/dav/test_caldav.py @@ -10,7 +10,6 @@ from unittest import TestCase -from vdirsyncer.storage.base import Item from vdirsyncer.storage.dav.caldav import CaldavStorage from . import DavStorageTests diff --git a/tests/storage/dav/test_carddav.py b/tests/storage/dav/test_carddav.py index b1defa2..75707d0 100644 --- a/tests/storage/dav/test_carddav.py +++ b/tests/storage/dav/test_carddav.py @@ -10,7 +10,6 @@ from unittest import TestCase -from vdirsyncer.storage.base import Item from vdirsyncer.storage.dav.carddav import CarddavStorage from . import DavStorageTests diff --git a/tests/storage/test_filesystem.py b/tests/storage/test_filesystem.py index 75e0761..cc808f7 100644 --- a/tests/storage/test_filesystem.py +++ b/tests/storage/test_filesystem.py @@ -9,9 +9,7 @@ ''' from unittest import TestCase -import tempfile import pytest -import shutil import os from vdirsyncer.storage.filesystem import FilesystemStorage from . import StorageTests @@ -33,7 +31,8 @@ class FilesystemStorageTests(TestCase, StorageTests): f.write(self._create_bogus_item(i).raw) paths.add(p) - storages = list(FilesystemStorage.discover(path=self.tmpdir, fileext='.txt')) + storages = list(FilesystemStorage.discover(path=self.tmpdir, + fileext='.txt')) assert len(storages) == 4 for s in storages: assert s.path in paths diff --git a/tests/storage/test_http.py b/tests/storage/test_http.py index f3d0821..c4553a6 100644 --- a/tests/storage/test_http.py +++ b/tests/storage/test_http.py @@ -8,12 +8,10 @@ ''' import mock -import requests from unittest import TestCase -from . import StorageTests from .. import assert_item_equals from textwrap import dedent -from vdirsyncer.storage.http import HttpStorage, Item, split_collection +from vdirsyncer.storage.http import HttpStorage, Item class HttpStorageTests(TestCase): @@ -31,7 +29,6 @@ class HttpStorageTests(TestCase): METHOD:PUBLISH BEGIN:VEVENT UID:461092315540@example.com - ORGANIZER;CN="Alice Balder, Example Inc.":MAILTO:alice@example.com LOCATION:Somewhere SUMMARY:Eine Kurzinfo DESCRIPTION:Beschreibung des Termines @@ -48,7 +45,7 @@ class HttpStorageTests(TestCase): BEGIN:VALARM ACTION:AUDIO TRIGGER:19980403T120000 - ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud + ATTACH;FMTTYPE=audio/basic:http://host.com/pub/ssbanner.aud REPEAT:4 DURATION:PT1H END:VALARM @@ -68,7 +65,6 @@ class HttpStorageTests(TestCase): assert_item_equals(item, Item(dedent(u''' BEGIN:VEVENT UID:461092315540@example.com - ORGANIZER;CN="Alice Balder, Example Inc.":MAILTO:alice@example.com LOCATION:Somewhere SUMMARY:Eine Kurzinfo DESCRIPTION:Beschreibung des Termines @@ -89,7 +85,7 @@ class HttpStorageTests(TestCase): BEGIN:VALARM ACTION:AUDIO TRIGGER:19980403T120000 - ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud + ATTACH;FMTTYPE=audio/basic:http://host.com/pub/ssbanner.aud REPEAT:4 DURATION:PT1H END:VALARM diff --git a/vdirsyncer/cli.py b/vdirsyncer/cli.py index 6ca05e2..c7c6284 100644 --- a/vdirsyncer/cli.py +++ b/vdirsyncer/cli.py @@ -144,7 +144,8 @@ def _main(env, file_cfg): actions = [] for pair_name in pairs: try: - a_name, b_name, pair_options, storage_defaults = all_pairs[pair_name] + a_name, b_name, pair_options, storage_defaults = \ + all_pairs[pair_name] except KeyError: cli_logger.critical('Pair not found: {}'.format(pair_name)) cli_logger.critical('These are the pairs found: ') diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index 494534b..87c0a2f 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -21,7 +21,8 @@ class FilesystemStorage(Storage): _repr_attributes = ('path',) - def __init__(self, path, fileext, collection=None, encoding='utf-8', **kwargs): + def __init__(self, path, fileext, collection=None, encoding='utf-8', + **kwargs): ''' :param path: Absolute path to a *collection* inside a vdir. '''