]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
ty 0.0.14 lint
authorBob Halley <halley@dnspython.org>
Sat, 31 Jan 2026 14:28:50 +0000 (06:28 -0800)
committerBob Halley <halley@dnspython.org>
Sat, 31 Jan 2026 14:28:50 +0000 (06:28 -0800)
dns/tsig.py

index 333f9aa47540961103faaa8ecb28e95b4394bd29..ce736f1ea16ab5ff46caf7753bb202a697b3d3ac 100644 (file)
@@ -183,7 +183,7 @@ class HMACTSig:
 
         # create the HMAC context
         if isinstance(hashinfo, tuple):
-            self.hmac_context = hmac.new(key, digestmod=hashinfo[0])
+            self.hmac_context = hmac.new(key, digestmod=hashinfo[0])  # type: ignore
             self.size = hashinfo[1]
         else:
             self.hmac_context = hmac.new(key, digestmod=hashinfo)
@@ -199,6 +199,7 @@ class HMACTSig:
         # defer to the HMAC digest() function for that digestmod
         digest = self.hmac_context.digest()
         if self.size:
+            assert isinstance(self.size, int)
             digest = digest[: (self.size // 8)]
         return digest