File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ ignore = [
130130 " ISC001" , # Conflicts with formatter
131131 " PLW1641" , # Object does not implement `__hash__` method
132132 " PYI041" , # Use `float` instead of `int | float`
133+ " TD002" , # Missing author in TODO
134+ " TD003" , # Missing issue link for this TOOD
133135]
134136
135137[tool .ruff .lint .pylint ]
Original file line number Diff line number Diff line change @@ -62,10 +62,20 @@ def dtype(self) -> DType_co:
6262 ...
6363
6464
65+ class HasDevice (Protocol ):
66+ """Protocol for array classes that have a device attribute."""
67+
68+ @property
69+ def device (self ) -> object : # TODO: more specific type
70+ """Hardware device the array data resides on."""
71+ ...
72+
73+
6574@docstring_setter (** _array_docstrings )
6675class Array (
6776 # ------ Attributes -------
6877 HasDType [DType_co ],
78+ HasDevice ,
6979 # ------ Methods -------
7080 HasArrayNamespace [NS_co ],
7181 op .CanPosSelf ,
You can’t perform that action at this time.
0 commit comments