Commit 698b6b4
committed
STY: Annotate DWI optional data class parameters as such
Annotate DWI optional data class parameters as such: add `None` to the
type annotation of `bzero` and `eddy_xfms` attributes.
Ignore the `bzero` indexing static checking error when serializing the
data to NIfTI: the indexing operation is protected by a conditional
`no_bzero` statement, so at that point the class instance is bound to
have a non-`None` `bzero` attribute value.
Assert that `bzero` is not `None` in tests to avoid static type checking
errors.1 parent fd64c14 commit 698b6b4
2 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
287 | | - | |
| 289 | + | |
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
0 commit comments