mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import sys
|
||||
from typing import List, Optional, Union
|
||||
from typing import List
|
||||
|
||||
if sys.platform == "win32":
|
||||
|
||||
# Actual typename View, not exposed by the implementation
|
||||
class _View:
|
||||
def Execute(self, params: Optional[_Record] = ...) -> None: ...
|
||||
def Execute(self, params: _Record | None = ...) -> None: ...
|
||||
def GetColumnInfo(self, kind: int) -> _Record: ...
|
||||
def Fetch(self) -> _Record: ...
|
||||
def Modify(self, mode: int, record: _Record) -> None: ...
|
||||
@@ -15,9 +15,9 @@ if sys.platform == "win32":
|
||||
__init__: None # type: ignore
|
||||
# Actual typename Summary, not exposed by the implementation
|
||||
class _Summary:
|
||||
def GetProperty(self, propid: int) -> Optional[Union[str, bytes]]: ...
|
||||
def GetProperty(self, propid: int) -> str | bytes | None: ...
|
||||
def GetPropertyCount(self) -> int: ...
|
||||
def SetProperty(self, propid: int, value: Union[str, bytes]) -> None: ...
|
||||
def SetProperty(self, propid: int, value: str | bytes) -> None: ...
|
||||
def Persist(self) -> None: ...
|
||||
# Don't exist at runtime
|
||||
__new__: None # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user