diff options
author | drebs <drebs@leap.se> | 2016-09-24 15:57:54 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-09-30 09:08:47 -0300 |
commit | 887fd917a19654aa6a7c6c54be3f22c3b6c79b92 (patch) | |
tree | 26f6007adf3f4dc91d238284334b336670bb89a5 | |
parent | d5bbe37495ee733be5f78de72364f3ec48ed7a0d (diff) |
[test] add flake8 code check and generalize name of tox env
-rw-r--r-- | .gitlab-ci.yml | 8 | ||||
-rw-r--r-- | common/src/leap/soledad/common/l2db/remote/server_state.py | 2 | ||||
-rw-r--r-- | common/src/leap/soledad/common/l2db/sync.py | 4 | ||||
-rw-r--r-- | testing/tox.ini | 10 |
4 files changed, 13 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76d22b3c..bdb5505f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,13 @@ stages: - - syntax + - code-check - tests - benchmark -syntax: - stage: syntax +code-check: + stage: code-check script: - cd testing - - tox -e pep8 + - tox -e code-check tests: stage: tests diff --git a/common/src/leap/soledad/common/l2db/remote/server_state.py b/common/src/leap/soledad/common/l2db/remote/server_state.py index f131e09e..e20b4679 100644 --- a/common/src/leap/soledad/common/l2db/remote/server_state.py +++ b/common/src/leap/soledad/common/l2db/remote/server_state.py @@ -15,8 +15,6 @@ # along with u1db. If not, see <http://www.gnu.org/licenses/>. """State for servers exposing a set of U1DB databases.""" -import os -import errno class ServerState(object): diff --git a/common/src/leap/soledad/common/l2db/sync.py b/common/src/leap/soledad/common/l2db/sync.py index c612629f..5e9b22f4 100644 --- a/common/src/leap/soledad/common/l2db/sync.py +++ b/common/src/leap/soledad/common/l2db/sync.py @@ -126,8 +126,8 @@ class Synchronizer(object): target_last_known_gen, target_last_known_trans_id = 0, '' else: target_last_known_gen, target_last_known_trans_id = ( - self.source._get_replica_gen_and_trans_id( # nopep8 - self.target_replica_uid)) + self.source._get_replica_gen_and_trans_id( # nopep8 + self.target_replica_uid)) if not changes and target_last_known_gen == target_gen: if target_trans_id != target_last_known_trans_id: raise errors.InvalidTransactionId diff --git a/testing/tox.ini b/testing/tox.ini index 231b2a9a..820d958c 100644 --- a/testing/tox.ini +++ b/testing/tox.ini @@ -33,10 +33,14 @@ deps = basepython = python2.7 commands = py.test tests/perf {posargs} -[testenv:pep8] +[testenv:code-check] changedir = .. -deps = pep8 -commands = pep8 {posargs} client server common +deps = + pep8 + flake8 +commands = + pep8 client server common + flake8 --ignore=F812,E731 client server common [testenv:parallel] deps = |