From d59175f7b4ae74bf32dee438fb64577140e0ac23 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 13 Apr 2020 11:47:58 +0300 Subject: [PATCH] Remove pylint comments Either use it everywhere and fully cover package, or do not leave at all. --- pygost/gost28147.py | 2 +- pygost/gost28147_mac.py | 2 +- pygost/gost34112012.py | 4 +--- pygost/gost341194.py | 2 +- pygost/gost3412.py | 2 +- pygost/pbkdf2.py | 2 +- pygost/utils.py | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pygost/gost28147.py b/pygost/gost28147.py index 9cb438e..01368f8 100644 --- a/pygost/gost28147.py +++ b/pygost/gost28147.py @@ -28,7 +28,7 @@ from pygost.gost3413 import pad_size from pygost.gost3413 import unpad2 from pygost.utils import hexdec from pygost.utils import strxor -from pygost.utils import xrange # pylint: disable=redefined-builtin +from pygost.utils import xrange KEYSIZE = 32 diff --git a/pygost/gost28147_mac.py b/pygost/gost28147_mac.py index 524b694..64712c6 100644 --- a/pygost/gost28147_mac.py +++ b/pygost/gost28147_mac.py @@ -29,7 +29,7 @@ from pygost.gost28147 import xcrypt from pygost.gost3413 import pad1 from pygost.iface import PEP247 from pygost.utils import strxor -from pygost.utils import xrange # pylint: disable=redefined-builtin +from pygost.utils import xrange digest_size = 8 SEQ_MAC = ( diff --git a/pygost/gost34112012.py b/pygost/gost34112012.py index c5caa2c..df4777f 100644 --- a/pygost/gost34112012.py +++ b/pygost/gost34112012.py @@ -26,11 +26,10 @@ from struct import unpack from pygost.iface import PEP247 from pygost.utils import hexdec from pygost.utils import strxor -from pygost.utils import xrange # pylint: disable=redefined-builtin +from pygost.utils import xrange BLOCKSIZE = 64 -# pylint: disable=bad-whitespace,bad-continuation Pi = bytearray(( 252, 238, 221, 17, 207, 110, 49, 22, 251, 196, 250, 218, 35, 197, 4, 77, 233, 119, 240, 219, 147, 46, @@ -87,7 +86,6 @@ Tau = ( 6, 14, 22, 30, 38, 46, 54, 62, 7, 15, 23, 31, 39, 47, 55, 63, ) -# pylint: disable=bad-whitespace,bad-continuation C = [hexdec("".join(s))[::-1] for s in ( ( diff --git a/pygost/gost341194.py b/pygost/gost341194.py index a6a65ef..6d58efd 100644 --- a/pygost/gost341194.py +++ b/pygost/gost341194.py @@ -33,7 +33,7 @@ from pygost.pbkdf2 import pbkdf2 as pbkdf2_base from pygost.utils import hexdec from pygost.utils import hexenc from pygost.utils import strxor -from pygost.utils import xrange # pylint: disable=redefined-builtin +from pygost.utils import xrange DEFAULT_SBOX = "id-GostR3411-94-CryptoProParamSet" diff --git a/pygost/gost3412.py b/pygost/gost3412.py index 047d460..450cc7a 100644 --- a/pygost/gost3412.py +++ b/pygost/gost3412.py @@ -23,7 +23,7 @@ from pygost.gost28147 import decrypt as gost28147_decrypt from pygost.gost28147 import encrypt as gost28147_encrypt from pygost.gost28147 import ns2block as gost28147_ns2block from pygost.utils import strxor -from pygost.utils import xrange # pylint: disable=redefined-builtin +from pygost.utils import xrange LC = bytearray(( diff --git a/pygost/pbkdf2.py b/pygost/pbkdf2.py index 33df6fe..d1e07a6 100644 --- a/pygost/pbkdf2.py +++ b/pygost/pbkdf2.py @@ -9,7 +9,7 @@ PyGOST does not register itself in hashlib anyway, so use it instead. from pygost.utils import bytes2long from pygost.utils import long2bytes from pygost.utils import strxor -from pygost.utils import xrange # pylint: disable=redefined-builtin +from pygost.utils import xrange def pbkdf2(hasher, password, salt, iterations, dklen): diff --git a/pygost/utils.py b/pygost/utils.py index 596abc2..0ec91fc 100644 --- a/pygost/utils.py +++ b/pygost/utils.py @@ -19,7 +19,7 @@ from codecs import getencoder from sys import version_info -xrange = range if version_info[0] == 3 else xrange # pylint: disable=redefined-builtin +xrange = range if version_info[0] == 3 else xrange def strxor(a, b): -- 2.44.0