aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2021-04-13 00:10:31 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2021-04-13 00:55:23 +0200
commitdefd8a0e1a46b786bd3880632477e742a4d6d56c (patch)
tree7c2d42afc7a756a36be76d3c5ecefe4f9a1cdc60
parent4c528c9f7611fbfa43c3601844b73a41663e0a3b (diff)
downloadwee-slack-defd8a0e1a46b786bd3880632477e742a4d6d56c.tar.gz
Ignore failing flake rules instead of selecting only a few
E203 should be ignored when using black according to their docs.
-rw-r--r--.flake86
-rw-r--r--_pytest/conftest.py4
-rw-r--r--_pytest/test_utf8_helpers.py2
-rw-r--r--wee_slack.py6
4 files changed, 13 insertions, 5 deletions
diff --git a/.flake8 b/.flake8
index b4d95b8..71cd42b 100644
--- a/.flake8
+++ b/.flake8
@@ -1,7 +1,11 @@
[flake8]
-select = E901,E999,F821,F822,F823
count = True
max-complexity = 10
max-line-length = 120
show-source = True
statistics = True
+extend-ignore = E203
+
+per-file-ignores =
+ wee_slack.py: C901, E266, E501, E722, E731, E741
+ _pytest/test_utf8_helpers.py: E721
diff --git a/_pytest/conftest.py b/_pytest/conftest.py
index 2dffd4f..733ca77 100644
--- a/_pytest/conftest.py
+++ b/_pytest/conftest.py
@@ -11,8 +11,8 @@ from websocket import ABNF
sys.path.append(".")
-import wee_slack
-from wee_slack import EventRouter, initiate_connection
+import wee_slack # noqa: E402
+from wee_slack import EventRouter, initiate_connection # noqa: E402
class fakewebsocket(object):
diff --git a/_pytest/test_utf8_helpers.py b/_pytest/test_utf8_helpers.py
index 271b84b..297805c 100644
--- a/_pytest/test_utf8_helpers.py
+++ b/_pytest/test_utf8_helpers.py
@@ -13,7 +13,7 @@ b_aa = "å".encode("utf-8")
b_word = b_ae + b_oe + b_aa
-if sys.version_info.major > 2:
+if sys.version_info.major > 2: # noqa: C901
def test_decode_should_not_transform_str():
assert "æøå" == decode_from_utf8("æøå")
diff --git a/wee_slack.py b/wee_slack.py
index da10960..6acd29a 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -31,7 +31,11 @@ import string
# See https://github.com/numpy/numpy/issues/11925
sys.modules["numpy"] = None
-from websocket import ABNF, create_connection, WebSocketConnectionClosedException
+from websocket import ( # noqa: E402
+ ABNF,
+ create_connection,
+ WebSocketConnectionClosedException,
+)
try:
basestring # Python 2