mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Split stdlib into Python 2 and 3 versions (#5442)
All new files in stdlib/@python2 are straight copies of the corresponding files in stdlib.
This commit is contained in:
22
stdlib/@python2/crypt.pyi
Normal file
22
stdlib/@python2/crypt.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
import sys
|
||||
from typing import List, Optional, Union
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
class _Method: ...
|
||||
METHOD_CRYPT: _Method
|
||||
METHOD_MD5: _Method
|
||||
METHOD_SHA256: _Method
|
||||
METHOD_SHA512: _Method
|
||||
if sys.version_info >= (3, 7):
|
||||
METHOD_BLOWFISH: _Method
|
||||
|
||||
methods: List[_Method]
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def mksalt(method: Optional[_Method] = ..., *, rounds: Optional[int] = ...) -> str: ...
|
||||
else:
|
||||
def mksalt(method: Optional[_Method] = ...) -> str: ...
|
||||
def crypt(word: str, salt: Optional[Union[str, _Method]] = ...) -> str: ...
|
||||
|
||||
else:
|
||||
def crypt(word: str, salt: str) -> str: ...
|
||||
Reference in New Issue
Block a user