mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-27 22:31:12 +08:00
Update various comments now non-types dependencies are allowed (#9527)
This commit is contained in:
@@ -7,10 +7,8 @@ from typing_extensions import Literal, TypeAlias
|
||||
from PIL import Image
|
||||
|
||||
_Frame: TypeAlias = Image.Image | Incomplete
|
||||
# TODO: Complete types once we can import non-types dependencies
|
||||
# See: #5768
|
||||
# stub_uploader doesn't allow numpy and torch because D3DShot doesn't declare it as a dependency
|
||||
# from torch import Tensor
|
||||
# from comtypes import IUnknown
|
||||
# import numpy.typing as npt
|
||||
# _Frame: TypeAlias = Image.Image | npt.NDArray[np.int32] | npt.NDArray[np.float32] | Tensor
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ from typing_extensions import Literal, TypeAlias
|
||||
from d3dshot.capture_output import CaptureOutput
|
||||
from PIL import Image
|
||||
|
||||
# TODO: Complete types once we can import non-types dependencies
|
||||
# See: #5768
|
||||
# stub_uploader doesn't allow numpy because D3DShot doesn't declare it as a dependency
|
||||
# import numpy as np
|
||||
# import numpy.typing as npt
|
||||
# _NDArray: TypeAlias = npt.NDArray[np.int32]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from d3dshot.capture_outputs.numpy_capture_output import NumpyCaptureOutput
|
||||
|
||||
# TODO: Once we can import non-types dependencies, this CaptureOutput should be float based
|
||||
# See: #5768
|
||||
# stub_uploader doesn't allow numpy because D3DShot doesn't declare it as a dependency
|
||||
# this CaptureOutput should be float based
|
||||
class NumpyFloatCaptureOutput(NumpyCaptureOutput): ...
|
||||
|
||||
@@ -6,8 +6,7 @@ from typing_extensions import Literal, TypeAlias
|
||||
from d3dshot.capture_output import CaptureOutput
|
||||
from PIL import Image
|
||||
|
||||
# TODO: Complete types once we can import non-types dependencies
|
||||
# See: https://github.com/python/typeshed/issues/5768
|
||||
# stub_uploader doesn't allow torch because D3DShot doesn't declare it as a dependency
|
||||
# from torch import Tensor
|
||||
_Tensor: TypeAlias = Incomplete
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ if sys.platform == "win32":
|
||||
else:
|
||||
_HRESULT: TypeAlias = Incomplete
|
||||
|
||||
# TODO: Use comtypes.IUnknown once we can import non-types dependencies
|
||||
# See: #5768
|
||||
# comtypes is not typed
|
||||
# from comtypes import IUnknown
|
||||
class _IUnknown(_CData):
|
||||
def QueryInterface(self, interface: type, iid: _CData | None = ...) -> _HRESULT: ...
|
||||
def AddRef(self) -> c_ulong: ...
|
||||
|
||||
Reference in New Issue
Block a user