[tor-commits] [stem/master] Suppress unused prereq import notices for python3

atagar at torproject.org atagar at torproject.org
Mon Jul 3 18:16:41 UTC 2017


commit 8b64ed0dc1e962b3a05529838d6927e14f5381a8
Author: Damian Johnson <atagar at torproject.org>
Date:   Mon Jul 3 11:14:29 2017 -0700

    Suppress unused prereq import notices for python3
    
    We already have suppressions that do the trick for python2 which complain about
    just the method name in 'from' imports...
    
      'signing' imported but unused
    
    However, with python3 pyflakes complains about the whole name...
    
      'nacl.signing' imported but unused
    
    This cleans up the following noise...
    
      * /home/atagar/Desktop/stem/stem/prereq.py
        line 99   - 'cryptography.utils.int_to_bytes' imported but unused | from cryptography.utils import int_from_bytes, int_to_bytes
        line 99   - 'cryptography.utils.int_from_bytes' imported but unused | from cryptography.utils import int_from_bytes, int_to_bytes
        line 100  - 'cryptography.hazmat.backends.default_backend' imported but unused | from cryptography.hazmat.backends import default_backend
        line 101  - 'cryptography.hazmat.primitives.serialization.load_der_public_key' imported but unused | from cryptography.hazmat.primitives.serialization import load_der_public_key
        line 102  - 'cryptography.hazmat.primitives.ciphers.modes' imported but unused | from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
        line 102  - 'cryptography.hazmat.primitives.ciphers.Cipher' imported but unused | from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
        line 102  - 'cryptography.hazmat.primitives.ciphers.algorithms' imported but unused | from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
        line 164  - 'nacl.encoding' imported but unused      | from nacl import encoding
        line 165  - 'nacl.signing' imported but unused       | from nacl import signing
---
 test/settings.cfg | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/settings.cfg b/test/settings.cfg
index 963ba59..4d532ff 100644
--- a/test/settings.cfg
+++ b/test/settings.cfg
@@ -162,6 +162,15 @@ pyflakes.ignore stem/prereq.py => 'unittest.mock' imported but unused
 pyflakes.ignore stem/prereq.py => 'long_to_bytes' imported but unused
 pyflakes.ignore stem/prereq.py => 'encoding' imported but unused
 pyflakes.ignore stem/prereq.py => 'signing' imported but unused
+pyflakes.ignore stem/prereq.py => 'cryptography.utils.int_to_bytes' imported but unused
+pyflakes.ignore stem/prereq.py => 'cryptography.utils.int_from_bytes' imported but unused
+pyflakes.ignore stem/prereq.py => 'cryptography.hazmat.backends.default_backend' imported but unused
+pyflakes.ignore stem/prereq.py => 'cryptography.hazmat.primitives.serialization.load_der_public_key'
+pyflakes.ignore stem/prereq.py => 'cryptography.hazmat.primitives.ciphers.modes' imported but unused
+pyflakes.ignore stem/prereq.py => 'cryptography.hazmat.primitives.ciphers.Cipher' imported but unused
+pyflakes.ignore stem/prereq.py => 'cryptography.hazmat.primitives.ciphers.algorithms'
+pyflakes.ignore stem/prereq.py => 'nacl.encoding' imported but unused
+pyflakes.ignore stem/prereq.py => 'nacl.signing' imported but unused
 pyflakes.ignore stem/interpreter/__init__.py => undefined name 'raw_input'
 pyflakes.ignore stem/util/conf.py => undefined name 'unicode'
 pyflakes.ignore stem/util/test_tools.py => 'pyflakes' imported but unused



More information about the tor-commits mailing list