We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1de757d commit 28b649eCopy full SHA for 28b649e
boltstub/packstream.py
@@ -20,6 +20,7 @@
20
from codecs import decode
21
import inspect
22
from io import BytesIO
23
+import re
24
from struct import pack as struct_pack
25
from struct import unpack as struct_unpack
26
@@ -125,7 +126,12 @@ def __repr__(self):
125
126
127
def __eq__(self, other):
128
try:
- if self.tag in (StructTagV1.path, StructTagV2.path):
129
+ assert all(
130
+ StructTagV1.path == value.path
131
+ for key, value in locals().items()
132
+ if re.match(r"^StructTagV[1-9]\d*$", key)
133
+ )
134
+ if self.tag == StructTagV1.path:
135
# path struct => order of nodes and rels is irrelevant
136
return (other.tag == self.tag
137
and len(other.fields) == 3
0 commit comments