summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--common/src/leap/soledad/common/l2db/remote/server_state.py2
-rw-r--r--common/src/leap/soledad/common/l2db/sync.py4
-rw-r--r--testing/tox.ini10
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 =