diff options
author | Kali Kaneko <kali@leap.se> | 2015-08-17 19:33:55 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-08-17 19:34:55 -0400 |
commit | e5e5a6a8e6ca209b0abf3a95521c9e6d5b329565 (patch) | |
tree | 307181045dad30a20302e51313a08fea70755fc6 | |
parent | 5d3f0626c78f812276d5c96dfcdf07738601f944 (diff) |
[style] pep8 cleanup
-rw-r--r-- | client/src/leap/soledad/client/api.py | 3 | ||||
-rw-r--r-- | common/setup.cfg | 4 | ||||
-rw-r--r-- | common/src/leap/soledad/common/tests/test_server.py | 4 | ||||
-rw-r--r-- | common/src/leap/soledad/common/tests/test_sqlcipher_sync.py | 1 | ||||
-rw-r--r-- | common/src/leap/soledad/common/tests/test_sync_mutex.py | 3 | ||||
-rw-r--r-- | common/src/leap/soledad/common/tests/util.py | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py index 633c07d0..d86990e6 100644 --- a/client/src/leap/soledad/client/api.py +++ b/client/src/leap/soledad/client/api.py @@ -216,7 +216,8 @@ class Soledad(object): soledad_assert_type(self._passphrase, unicode) def initialize(attr, val): - return (getattr(self, attr, None) is None and setattr(self, attr, val)) + return ((getattr(self, attr, None) is None) + and setattr(self, attr, val)) initialize("_secrets_path", os.path.join( self.default_prefix, self.secrets_file_name)) diff --git a/common/setup.cfg b/common/setup.cfg index 36123a71..3eb110b7 100644 --- a/common/setup.cfg +++ b/common/setup.cfg @@ -2,9 +2,9 @@ test = trial [pep8] -exclude = versioneer.py,_version.py,ddocs.py,*.egg,build +exclude = versioneer.py,_version.py,ddocs.py,*.egg,build,docs ignore = E731 [flake8] -exclude = versioneer.py,_version.py,ddocs.py,*.egg,build +exclude = versioneer.py,_version.py,ddocs.py,*.egg,build,docs ignore = E731 diff --git a/common/src/leap/soledad/common/tests/test_server.py b/common/src/leap/soledad/common/tests/test_server.py index bf08f4d6..5ffa2a63 100644 --- a/common/src/leap/soledad/common/tests/test_server.py +++ b/common/src/leap/soledad/common/tests/test_server.py @@ -461,7 +461,9 @@ class EncryptedSyncTestCase( """ Test if Soledad can sync very large files. """ - self.skipTest("Work in progress. For reference, see: https://leap.se/code/issues/7370 ") + self.skipTest( + "Work in progress. For reference, see: " + "https://leap.se/code/issues/7370") length = 100 * (10 ** 6) # 100 MB return self._test_encrypted_sym_sync(doc_size=length, number_of_docs=1) diff --git a/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py b/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py index 49bf3bd6..dd66a58a 100644 --- a/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py +++ b/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py @@ -349,7 +349,6 @@ def _make_local_db_and_token_http_target(test, path='test'): create=True, ensure_ddocs=True) - #db = test.request_state.open_database(os.path.basename(path)) replica_uid = test._soledad._dbpool.replica_uid sync_db = test._soledad._sync_db sync_enc_pool = test._soledad._sync_enc_pool diff --git a/common/src/leap/soledad/common/tests/test_sync_mutex.py b/common/src/leap/soledad/common/tests/test_sync_mutex.py index 89ccd75e..207338e4 100644 --- a/common/src/leap/soledad/common/tests/test_sync_mutex.py +++ b/common/src/leap/soledad/common/tests/test_sync_mutex.py @@ -47,6 +47,7 @@ from leap.soledad.common.tests.util import soledad_sync_target _old_sync = SoledadSynchronizer.sync + def _timed_sync(self, defer_decryption=True): t = time.time() @@ -55,7 +56,6 @@ def _timed_sync(self, defer_decryption=True): if not getattr(self.source, 'sync_times', False): self.source.sync_times = {} - self.source.sync_times[sync_id] = {'start': t} def _store_finish_time(passthrough): @@ -98,7 +98,6 @@ class TestSyncMutex( TestCaseWithServer.tearDown(self) shutil.rmtree(self.tempdir) - def test_two_concurrent_syncs_do_not_overlap_no_docs(self): self.startServer() diff --git a/common/src/leap/soledad/common/tests/util.py b/common/src/leap/soledad/common/tests/util.py index 910a8d54..fe43986c 100644 --- a/common/src/leap/soledad/common/tests/util.py +++ b/common/src/leap/soledad/common/tests/util.py @@ -187,7 +187,7 @@ def soledad_sync_target( source_replica_uid, creds, test._soledad._crypto, - None, # cert_file + None, # cert_file sync_db=sync_db, sync_enc_pool=sync_enc_pool) |