aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-24 12:59:13 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-24 12:59:13 -0600
commit2f97c6371c4f4bf75a583241c57f393f6e8ca1a4 (patch)
treec0ac11e60dc2bb5136e7c3d02e987d0d40fb6160
parent79cdb55f469b4a493f2c084b8cf786723c01fbac (diff)
parent3eaf823260b289993e09515482f1506d521f1d15 (diff)
downloadcryptography-2f97c6371c4f4bf75a583241c57f393f6e8ca1a4.tar.gz
cryptography-2f97c6371c4f4bf75a583241c57f393f6e8ca1a4.tar.bz2
cryptography-2f97c6371c4f4bf75a583241c57f393f6e8ca1a4.zip
Merge pull request #682 from dreid/flake8-select-all
Flake8 select all
-rw-r--r--cryptography/hazmat/primitives/twofactor/hotp.py4
-rw-r--r--tox.ini1
2 files changed, 3 insertions, 2 deletions
diff --git a/cryptography/hazmat/primitives/twofactor/hotp.py b/cryptography/hazmat/primitives/twofactor/hotp.py
index 535a94c7..a5c88dae 100644
--- a/cryptography/hazmat/primitives/twofactor/hotp.py
+++ b/cryptography/hazmat/primitives/twofactor/hotp.py
@@ -37,7 +37,7 @@ class HOTP(object):
def generate(self, counter):
truncated_value = self._dynamic_truncate(counter)
- hotp = truncated_value % (10**self._length)
+ hotp = truncated_value % (10 ** self._length)
return "{0:0{1}}".format(hotp, self._length).encode()
def verify(self, hotp, counter):
@@ -52,5 +52,5 @@ class HOTP(object):
offset_bits = six.indexbytes(hmac_value, 19) & 0b1111
offset = int(offset_bits)
- P = hmac_value[offset:offset+4]
+ P = hmac_value[offset:offset + 4]
return struct.unpack(">I", P)[0] & 0x7fffffff
diff --git a/tox.ini b/tox.ini
index 5ff08779..4248db38 100644
--- a/tox.ini
+++ b/tox.ini
@@ -41,3 +41,4 @@ commands = flake8 .
[flake8]
exclude = .tox,*.egg
+select = E,W,F