You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RF: Fix ast library type and attribute deprecation warnings
Fix `ast` library type and attribute deprecation warnings.
Fixes:
```
/home/runner/work/nibabel/nibabel/nibabel/nicom/ascconv.py:177:
DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
if isinstance(value, ast.Num):
/home/runner/work/nibabel/nibabel/nibabel/nicom/ascconv.py:179:
DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
if isinstance(value, ast.Str):
/home/runner/work/nibabel/nibabel/nibabel/nicom/ascconv.py:180:
DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead
return value.s
/home/runner/work/nibabel/nibabel/nibabel/nicom/ascconv.py:94:
DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
index = target.slice.n
/home/runner/work/nibabel/nibabel/nibabel/nicom/ascconv.py:182:
DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
return -value.operand.n
```
raised for example in:
https://github.com/nipy/nibabel/actions/runs/9637811213/job/26577586721#step:7:207
Documentation:
https://docs.python.org/3/library/ast.html
0 commit comments