[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Ignore pycodestyle warnings about bare 'except:' clauses
commit 4ebb606dd121a1232aa2f3e24a904aacb8174839
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Tue Jun 20 13:35:51 2017 -0700
Ignore pycodestyle warnings about bare 'except:' clauses
Odd this didn't manifest for me before. Seems to only come up when running
python3 so maybe a new check? I can see the reasoning around this but I'm a
shade more concerned about the alternative.
---
test/settings.cfg | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/test/settings.cfg b/test/settings.cfg
index 128e987..7ccd733 100644
--- a/test/settings.cfg
+++ b/test/settings.cfg
@@ -119,6 +119,14 @@ target.torrc RUN_PTRACE => PORT, PTRACE
#
# Pycodestyle only works with this one if we have four space indents (its
# detection is based on multiples of four).
+#
+# * E722 do not use bare except
+#
+# Iirc they advise against this because it catches KeyboardInterrups and
+# interpreter termination. That's a fair concern, but on the other hand we
+# don't have strong assurance that socket errors and the like will be caught
+# without it. We've been doing this for years without issue but I'd be
+# ameanable to a patch if this causes issues for someone.
pycodestyle.ignore E111
pycodestyle.ignore E114
@@ -127,6 +135,7 @@ pycodestyle.ignore E501
pycodestyle.ignore E251
pycodestyle.ignore E127
pycodestyle.ignore E131
+pycodestyle.ignore E722
pycodestyle.ignore stem/__init__.py => E402: import stem.util.enum
pycodestyle.ignore stem/descriptor/__init__.py => E402: import stem.descriptor.server_descriptor
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits