Skip to content

Commit 9ecd07a

Browse files
authored
Use Final for Pre-Defined Hashing Methods in crypt (#12544)
1 parent 7b9263a commit 9ecd07a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

stdlib/crypt.pyi

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import sys
2+
from typing import Final
23

34
if sys.platform != "win32":
45
class _Method: ...
5-
METHOD_CRYPT: _Method
6-
METHOD_MD5: _Method
7-
METHOD_SHA256: _Method
8-
METHOD_SHA512: _Method
9-
METHOD_BLOWFISH: _Method
6+
METHOD_CRYPT: Final[_Method]
7+
METHOD_MD5: Final[_Method]
8+
METHOD_SHA256: Final[_Method]
9+
METHOD_SHA512: Final[_Method]
10+
METHOD_BLOWFISH: Final[_Method]
1011
methods: list[_Method]
1112
def mksalt(method: _Method | None = None, *, rounds: int | None = None) -> str: ...
1213
def crypt(word: str, salt: str | _Method | None = None) -> str: ...

0 commit comments

Comments
 (0)