mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import List, Optional, Union
|
||||
from typing import List
|
||||
|
||||
class _Method: ...
|
||||
|
||||
@@ -13,9 +13,9 @@ if sys.version_info >= (3, 7):
|
||||
methods: List[_Method]
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def mksalt(method: Optional[_Method] = ..., *, rounds: Optional[int] = ...) -> str: ...
|
||||
def mksalt(method: _Method | None = ..., *, rounds: int | None = ...) -> str: ...
|
||||
|
||||
else:
|
||||
def mksalt(method: Optional[_Method] = ...) -> str: ...
|
||||
def mksalt(method: _Method | None = ...) -> str: ...
|
||||
|
||||
def crypt(word: str, salt: Optional[Union[str, _Method]] = ...) -> str: ...
|
||||
def crypt(word: str, salt: str | _Method | None = ...) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user