From 40469c4100c53f24bc1082dca0afd7fbc241160e Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 2 Dec 2017 21:13:44 +0200 Subject: [PATCH] tox: pep8 -> pycodestyle --- libagent/gpg/decode.py | 2 ++ libagent/gpg/keyring.py | 1 + tox.ini | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libagent/gpg/decode.py b/libagent/gpg/decode.py index 4cf0481..f3b620f 100644 --- a/libagent/gpg/decode.py +++ b/libagent/gpg/decode.py @@ -186,6 +186,7 @@ def _parse_pubkey(stream, packet_type='pubkey'): log.debug('key ID: %s', util.hexlify(p['key_id'])) return p + _parse_subkey = functools.partial(_parse_pubkey, packet_type='subkey') @@ -195,6 +196,7 @@ def _parse_user_id(stream, packet_type='user_id'): to_hash = b'\xb4' + util.prefix_len('>L', value) return {'type': packet_type, 'value': value, '_to_hash': to_hash} + # User attribute is handled as an opaque user ID _parse_attribute = functools.partial(_parse_user_id, packet_type='user_attribute') diff --git a/libagent/gpg/keyring.py b/libagent/gpg/keyring.py index cd73d99..ad60085 100644 --- a/libagent/gpg/keyring.py +++ b/libagent/gpg/keyring.py @@ -113,6 +113,7 @@ def _parse_ecdsa_sig(args): return (util.bytes2num(sig_r), util.bytes2num(sig_s)) + # DSA and EDDSA happen to have the same structure as ECDSA signatures _parse_dsa_sig = _parse_ecdsa_sig _parse_eddsa_sig = _parse_ecdsa_sig diff --git a/tox.ini b/tox.ini index 2ef3532..1165b3f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = py27,py3 -[pep8] +[pycodestyle] max-line-length = 100 [pep257] add-ignore = D401 @@ -8,14 +8,14 @@ add-ignore = D401 deps= pytest mock - pep8 + pycodestyle coverage pylint semver pydocstyle isort commands= - pep8 libagent + pycodestyle libagent # isort --skip-glob .tox -c -r libagent pylint --reports=no --rcfile .pylintrc libagent pydocstyle libagent