11from typing import ClassVar
2+ from typing_extensions import Self
23
34import passlib .utils .handlers as uh
45
@@ -11,7 +12,7 @@ class des_crypt(uh.TruncateMixin, uh.HasManyBackends, uh.HasSalt, uh.GenericHand
1112 salt_chars : ClassVar [str ]
1213 truncate_size : ClassVar [int ]
1314 @classmethod
14- def from_string (cls , hash ): ...
15+ def from_string (cls , hash ) -> Self : ... # type: ignore[override]
1516 backends : ClassVar [tuple [str , ...]]
1617
1718class bsdi_crypt (uh .HasManyBackends , uh .HasRounds , uh .HasSalt , uh .GenericHandler ): # type: ignore[misc]
@@ -26,9 +27,9 @@ class bsdi_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler
2627 max_rounds : ClassVar [int ]
2728 rounds_cost : ClassVar [str ]
2829 @classmethod
29- def from_string (cls , hash ): ...
30+ def from_string (cls , hash ) -> Self : ... # type: ignore[override]
3031 @classmethod
31- def using (cls , ** kwds ): ...
32+ def using (cls , ** kwds ): ... # type: ignore[override]
3233 backends : ClassVar [tuple [str , ...]]
3334
3435class bigcrypt (uh .HasSalt , uh .GenericHandler ):
@@ -38,7 +39,7 @@ class bigcrypt(uh.HasSalt, uh.GenericHandler):
3839 max_salt_size : ClassVar [int ]
3940 salt_chars : ClassVar [str ]
4041 @classmethod
41- def from_string (cls , hash ): ...
42+ def from_string (cls , hash ) -> Self : ... # type: ignore[override]
4243
4344class crypt16 (uh .TruncateMixin , uh .HasSalt , uh .GenericHandler ): # type: ignore[misc]
4445 name : ClassVar [str ]
@@ -49,6 +50,6 @@ class crypt16(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore[
4950 salt_chars : ClassVar [str ]
5051 truncate_size : ClassVar [int ]
5152 @classmethod
52- def from_string (cls , hash ): ...
53+ def from_string (cls , hash ) -> Self : ... # type: ignore[override]
5354
5455__all__ = ["des_crypt" , "bsdi_crypt" , "bigcrypt" , "crypt16" ]
0 commit comments