d89a4d5
From 953370a44cc6d548bfece8a2bb3e4c97a64d8702 Mon Sep 17 00:00:00 2001
d89a4d5
From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= <danmichaelo@gmail.com>
d89a4d5
Date: Mon, 10 Jun 2019 14:41:18 +0200
d89a4d5
Subject: [PATCH 3/3] Switch to flake8 for linting
d89a4d5
d89a4d5
---
d89a4d5
 .travis.yml |  2 ++
d89a4d5
 setup.cfg   |  7 +++++--
d89a4d5
 setup.py    |  2 +-
d89a4d5
 tox.ini     | 18 ++++++++++--------
d89a4d5
 4 files changed, 18 insertions(+), 11 deletions(-)
d89a4d5
d89a4d5
diff --git a/.travis.yml b/.travis.yml
d89a4d5
index f59f943..9504787 100644
d89a4d5
--- a/.travis.yml
d89a4d5
+++ b/.travis.yml
d89a4d5
@@ -17,9 +17,11 @@ matrix:
d89a4d5
 install:
d89a4d5
   - python setup.py install
d89a4d5
   - pip install coveralls
d89a4d5
+  - pip install flake8
d89a4d5
 
d89a4d5
 script:
d89a4d5
   - python setup.py test
d89a4d5
+  - flake8 mwclient
d89a4d5
 
d89a4d5
 after_success:
d89a4d5
   - coveralls
d89a4d5
diff --git a/setup.cfg b/setup.cfg
d89a4d5
index 9e95b73..1095f38 100644
d89a4d5
--- a/setup.cfg
d89a4d5
+++ b/setup.cfg
d89a4d5
@@ -18,6 +18,9 @@ replace = version='{new_version}'
d89a4d5
 universal = 1
d89a4d5
 
d89a4d5
 [tool:pytest]
d89a4d5
-codestyle_ignore = E501 W602
d89a4d5
-addopts = -v --codestyle test mwclient --cov mwclient
d89a4d5
+addopts = --cov mwclient test
d89a4d5
 
d89a4d5
+[flake8]
d89a4d5
+ignore =
d89a4d5
+     E501  # Line too long
d89a4d5
+     W503  # Line break before binary operator
d89a4d5
diff --git a/setup.py b/setup.py
d89a4d5
index 4c80187..e108213 100644
d89a4d5
--- a/setup.py
d89a4d5
+++ b/setup.py
d89a4d5
@@ -31,7 +31,7 @@ setup(name='mwclient',
d89a4d5
       packages=['mwclient'],
d89a4d5
       install_requires=['requests_oauthlib', 'six'],
d89a4d5
       setup_requires=pytest_runner,
d89a4d5
-      tests_require=['pytest', 'pytest-codestyle', 'pytest-cov',
d89a4d5
+      tests_require=['pytest', 'pytest-cov', 'flake8',
d89a4d5
                      'responses>=0.3.0', 'responses!=0.6.0', 'mock'],
d89a4d5
       zip_safe=True
d89a4d5
       )
d89a4d5
diff --git a/tox.ini b/tox.ini
d89a4d5
index 06766cf..4554c67 100644
d89a4d5
--- a/tox.ini
d89a4d5
+++ b/tox.ini
d89a4d5
@@ -1,13 +1,15 @@
d89a4d5
 [tox]
d89a4d5
-envlist = py27,py34,py35,py36
d89a4d5
+envlist = py27,py34,py35,py36,flake
d89a4d5
+
d89a4d5
 [testenv]
d89a4d5
-deps=pytest
d89a4d5
-    pytest-codestyle
d89a4d5
+deps =
d89a4d5
+	pytest
d89a4d5
+    pytest-cov
d89a4d5
     responses
d89a4d5
     mock
d89a4d5
-commands=py.test -v --codestyle mwclient test
d89a4d5
 
d89a4d5
-[flake8]
d89a4d5
-max-line-length=90
d89a4d5
-[codestyle]
d89a4d5
-max-line-length=90
d89a4d5
+[testenv:flake]
d89a4d5
+deps =
d89a4d5
+    flake8
d89a4d5
+commands =
d89a4d5
+	flake8 mwclient
d89a4d5
-- 
d89a4d5
2.22.0
d89a4d5