Blob Blame History Raw
From 953370a44cc6d548bfece8a2bb3e4c97a64d8702 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= <danmichaelo@gmail.com>
Date: Mon, 10 Jun 2019 14:41:18 +0200
Subject: [PATCH 3/3] Switch to flake8 for linting

---
 .travis.yml |  2 ++
 setup.cfg   |  7 +++++--
 setup.py    |  2 +-
 tox.ini     | 18 ++++++++++--------
 4 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f59f943..9504787 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,9 +17,11 @@ matrix:
 install:
   - python setup.py install
   - pip install coveralls
+  - pip install flake8
 
 script:
   - python setup.py test
+  - flake8 mwclient
 
 after_success:
   - coveralls
diff --git a/setup.cfg b/setup.cfg
index 9e95b73..1095f38 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -18,6 +18,9 @@ replace = version='{new_version}'
 universal = 1
 
 [tool:pytest]
-codestyle_ignore = E501 W602
-addopts = -v --codestyle test mwclient --cov mwclient
+addopts = --cov mwclient test
 
+[flake8]
+ignore =
+     E501  # Line too long
+     W503  # Line break before binary operator
diff --git a/setup.py b/setup.py
index 4c80187..e108213 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ setup(name='mwclient',
       packages=['mwclient'],
       install_requires=['requests_oauthlib', 'six'],
       setup_requires=pytest_runner,
-      tests_require=['pytest', 'pytest-codestyle', 'pytest-cov',
+      tests_require=['pytest', 'pytest-cov', 'flake8',
                      'responses>=0.3.0', 'responses!=0.6.0', 'mock'],
       zip_safe=True
       )
diff --git a/tox.ini b/tox.ini
index 06766cf..4554c67 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,13 +1,15 @@
 [tox]
-envlist = py27,py34,py35,py36
+envlist = py27,py34,py35,py36,flake
+
 [testenv]
-deps=pytest
-    pytest-codestyle
+deps =
+	pytest
+    pytest-cov
     responses
     mock
-commands=py.test -v --codestyle mwclient test
 
-[flake8]
-max-line-length=90
-[codestyle]
-max-line-length=90
+[testenv:flake]
+deps =
+    flake8
+commands =
+	flake8 mwclient
-- 
2.22.0