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 = [
130
130
" ISC001" , # Conflicts with formatter
131
131
" PLW1641" , # Object does not implement `__hash__` method
132
132
" PYI041" , # Use `float` instead of `int | float`
133
+ " TD002" , # Missing author in TODO
134
+ " TD003" , # Missing issue link for this TOOD
133
135
]
134
136
135
137
[tool .ruff .lint .pylint ]
Original file line number Diff line number Diff line change @@ -62,10 +62,20 @@ def dtype(self) -> DType_co:
62
62
...
63
63
64
64
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
+
65
74
@docstring_setter (** _array_docstrings )
66
75
class Array (
67
76
# ------ Attributes -------
68
77
HasDType [DType_co ],
78
+ HasDevice ,
69
79
# ------ Methods -------
70
80
HasArrayNamespace [NS_co ],
71
81
op .CanPosSelf ,
You can’t perform that action at this time.
0 commit comments