1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From: Debian Science Maintainers
<debian-science-maintainers@lists.alioth.debian.org>
Date: Sun, 21 Dec 2025 16:22:50 +1100
Subject: python-syntaxwarning
---
nxs/napi.py | 2 +-
nxs/tree.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/nxs/napi.py b/nxs/napi.py
index 88dcbe7..57b1597 100755
--- a/nxs/napi.py
+++ b/nxs/napi.py
@@ -1137,7 +1137,7 @@ class NeXus(object):
Corresponds to NXgetattr(handle,name,data,&length,&storage)
"""
- if dtype is 'char': length += 1 # HDF4 needs zero-terminator
+ if dtype == 'char': length += 1 # HDF4 needs zero-terminator
dummy_data,pdata,size,datafn = self._poutput(str(dtype),[length])
storage = c_int(_nxtype_code[str(dtype)])
# print("getattr", self._loc(), name, length, size, dtype)
diff --git a/nxs/tree.py b/nxs/tree.py
index 6b4365e..8f31793 100644
--- a/nxs/tree.py
+++ b/nxs/tree.py
@@ -539,7 +539,7 @@ def _readaxes(axes):
The delimiter separating each axis can be white space, a comma, or a colon.
"""
import re
- sep=re.compile('[\[]*(\s*,*:*)+[\]]*')
+ sep=re.compile(r'[\[]*(\s*,*:*)+[\]]*')
return filter(lambda x: len(x)>0, sep.split(axes))
|