1616
1717# pylint: disable=C0103, W0108, R0915, C0116, C0115
1818
19- from __future__ import annotations
20-
2119try :
2220 from typing import Union
2321except ImportError :
@@ -421,7 +419,7 @@ def hexdigest(self) -> str:
421419 """
422420 return "" .join (["%.2x" % i for i in self .digest ()])
423421
424- def copy (self ) -> sha256 :
422+ def copy (self ) -> " sha256" :
425423 """Return a copy (“clone”) of the hash object."""
426424 new = sha256 ()
427425 new ._sha = self ._sha .copy ()
@@ -495,7 +493,7 @@ def update(self, msg: Union[bytes, bytearray]) -> None:
495493 """Update this hashing object with the string msg."""
496494 self .inner .update (msg )
497495
498- def copy (self ) -> HMAC :
496+ def copy (self ) -> " HMAC" :
499497 """Return a separate copy of this hashing object.
500498
501499 An update to this copy won't affect the original object.
@@ -508,7 +506,7 @@ def copy(self) -> HMAC:
508506 other .outer = self .outer .copy ()
509507 return other
510508
511- def _current (self ) -> sha256 :
509+ def _current (self ) -> " sha256" :
512510 """Return a hash object for the current state.
513511
514512 To be used only internally with digest() and hexdigest().
@@ -533,7 +531,9 @@ def hexdigest(self) -> str:
533531 return hmac .hexdigest ()
534532
535533
536- def new_hmac (key : Union [bytes , bytearray ], msg : Union [bytes , bytearray ] = None ) -> HMAC :
534+ def new_hmac (
535+ key : Union [bytes , bytearray ], msg : Union [bytes , bytearray ] = None
536+ ) -> "HMAC" :
537537 """Create a new hashing object and return it.
538538
539539 key: The starting key for the hash.
0 commit comments