From: Sergey Matveev Date: Sun, 20 May 2018 08:55:32 +0000 (+0300) Subject: pylint X-Git-Tag: 3.7~19 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=5b15d6d7bdfe67388f01fd2ab1638f8c02c1294b pylint --- diff --git a/pyderasn.py b/pyderasn.py index c8e29e3..099e8a4 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -4313,8 +4313,8 @@ class Sequence(Obj): values = {} for name, spec in self.specs.items(): if spec.optional and ( - (lenindef and v[:EOC_LEN].tobytes() == EOC) or - len(v) == 0 + (lenindef and v[:EOC_LEN].tobytes() == EOC) or + len(v) == 0 ): continue sub_decode_path = decode_path + (name,) diff --git a/tests/test_pyderasn.py b/tests/test_pyderasn.py index 10ad675..62954d7 100644 --- a/tests/test_pyderasn.py +++ b/tests/test_pyderasn.py @@ -1505,8 +1505,8 @@ class TestBitString(CommonMixin, TestCase): with assertRaisesRegex(self, DecodeError, "unallowed BER"): BitString(impl=tag_encode(impl)).decode(encoded_indefinite) for lenindef_expected, encoded in ( - (True, encoded_indefinite), - (False, encoded_definite), + (True, encoded_indefinite), + (False, encoded_definite), ): obj, tail = BitString(impl=tag_encode(impl)).decode( encoded, ctx={"bered": True} @@ -1891,8 +1891,8 @@ class TestOctetString(CommonMixin, TestCase): with assertRaisesRegex(self, DecodeError, "unallowed BER"): OctetString(impl=tag_encode(impl)).decode(encoded_indefinite) for lenindef_expected, encoded in ( - (True, encoded_indefinite), - (False, encoded_definite), + (True, encoded_indefinite), + (False, encoded_definite), ): obj, tail = OctetString(impl=tag_encode(impl)).decode( encoded, ctx={"bered": True}