Skip to content

Commit 015c39a

Browse files
committed
Tweak wording in query_single() error messages
There is a potential confusion between being a "multi set" (a set with multi cardinality) and a "multiset" (a set that can contain duplicates). Reword to avoid this.
1 parent b11b991 commit 015c39a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

edgedb/protocol/protocol.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ cdef class SansIOProtocol:
12551255
methname = _QUERY_SINGLE_METHOD[required_one][output_format]
12561256
new_exc = errors.InterfaceError(
12571257
f'query cannot be executed with {methname}() as it '
1258-
f'returns a multiset')
1258+
f'may return more than one element')
12591259
new_exc.__cause__ = exc
12601260
exc = new_exc
12611261

tests/test_async_query.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,14 @@ async def test_async_basic_datatypes_01(self):
241241

242242
with self.assertRaisesRegex(
243243
edgedb.InterfaceError,
244-
r'query_single\(\) as it returns a multiset'):
244+
r'query_single\(\) as it may return more than one element'
245+
):
245246
await self.client.query_single('SELECT {1, 2}')
246247

247248
with self.assertRaisesRegex(
248249
edgedb.InterfaceError,
249-
r'query_required_single\(\) as it returns a multiset'):
250+
r'query_required_single\(\) as it may return '
251+
r'more than one element'):
250252
await self.client.query_required_single('SELECT {1, 2}')
251253

252254
with self.assertRaisesRegex(

0 commit comments

Comments
 (0)