Commit e97f572
committed
FIX: Restore access to private attr Nifti1Extension._content
gh-1336 reused the private attribute ``ext._content`` to exclusively
refer to the ``bytes`` representation of the extension contents.
This neglected that subclasses might depend on this implementation
detail.
Let's be nice to people and rename the attribute to ``_raw`` and provide
a ``_content`` property that calls ``self.get_content()``.
Also adds a test to ensure that multiple accesses continue to work as
expected.1 parent 1712cb0 commit e97f572
2 files changed
+38
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
358 | 362 | | |
359 | 363 | | |
360 | 364 | | |
| |||
394 | 398 | | |
395 | 399 | | |
396 | 400 | | |
397 | | - | |
| 401 | + | |
398 | 402 | | |
399 | 403 | | |
400 | 404 | | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
405 | | - | |
| 409 | + | |
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
| |||
425 | 429 | | |
426 | 430 | | |
427 | 431 | | |
428 | | - | |
| 432 | + | |
429 | 433 | | |
430 | 434 | | |
431 | 435 | | |
| |||
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
455 | | - | |
| 459 | + | |
456 | 460 | | |
457 | 461 | | |
458 | 462 | | |
| |||
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
491 | | - | |
| 495 | + | |
492 | 496 | | |
493 | 497 | | |
494 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1253 | 1280 | | |
1254 | 1281 | | |
1255 | 1282 | | |
| |||
0 commit comments