Commit bd7ffd7
committed
STYLE: Use the
Use the `dipy.core.gradientsGradientTable` class for type hinting
instead of `dipy.core.gradients.gradient_table`: the latter is a
function name and hence does not provide type information.
Fixes:
```
src/nifreeze/testing/simulations.py:151: error:
Function "dipy.core.gradients.gradient_table" is not valid as a type [valid-type]
src/nifreeze/testing/simulations.py:151: note:
Perhaps you need "Callable[...]" or a callback protocol?
src/nifreeze/testing/simulations.py:185: error:
Function "dipy.core.gradients.gradient_table" is not valid as a type [valid-type]
src/nifreeze/testing/simulations.py:185: note:
Perhaps you need "Callable[...]" or a callback protocol?
src/nifreeze/testing/simulations.py:207: error:
gradient_table? has no attribute "b0s_mask" [attr-defined]
src/nifreeze/testing/simulations.py:208: error:
gradient_table? has no attribute "bvecs" [attr-defined]
```GradientTable class for type hinting1 parent a5c2bf8 commit bd7ffd7
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
0 commit comments