Skip to content

Commit 58e8d13

Browse files
docs: Format restrict() equivalence table as code block
The space-aligned table was rendering as a paragraph in mkdocstrings. Using :: and indentation creates a literal block that preserves formatting. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 59dd1d6 commit 58e8d13

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/datajoint/expression.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -190,27 +190,27 @@ def restrict(self, restriction, semantic_check=True):
190190
(logical disjunction of conditions).
191191
Inverse restriction is accomplished by either using the subtraction operator or the Not class.
192192
193-
The expressions in each row are equivalent:
194-
195-
rel & True rel
196-
rel & False the empty entity set
197-
rel & 'TRUE' rel
198-
rel & 'FALSE' the empty entity set
199-
rel - cond rel & Not(cond)
200-
rel - 'TRUE' rel & False
201-
rel - 'FALSE' rel
202-
rel & AndList((cond1,cond2)) rel & cond1 & cond2
203-
rel & AndList() rel
204-
rel & [cond1, cond2] rel & OrList((cond1, cond2))
205-
rel & [] rel & False
206-
rel & None rel & False
207-
rel & any_empty_entity_set rel & False
208-
rel - AndList((cond1,cond2)) rel & [Not(cond1), Not(cond2)]
209-
rel - [cond1, cond2] rel & Not(cond1) & Not(cond2)
210-
rel - AndList() rel & False
211-
rel - [] rel
212-
rel - None rel
213-
rel - any_empty_entity_set rel
193+
The expressions in each row are equivalent::
194+
195+
rel & True rel
196+
rel & False the empty entity set
197+
rel & 'TRUE' rel
198+
rel & 'FALSE' the empty entity set
199+
rel - cond rel & Not(cond)
200+
rel - 'TRUE' rel & False
201+
rel - 'FALSE' rel
202+
rel & AndList((cond1,cond2)) rel & cond1 & cond2
203+
rel & AndList() rel
204+
rel & [cond1, cond2] rel & OrList((cond1, cond2))
205+
rel & [] rel & False
206+
rel & None rel & False
207+
rel & any_empty_entity_set rel & False
208+
rel - AndList((cond1,cond2)) rel & [Not(cond1), Not(cond2)]
209+
rel - [cond1, cond2] rel & Not(cond1) & Not(cond2)
210+
rel - AndList() rel & False
211+
rel - [] rel
212+
rel - None rel
213+
rel - any_empty_entity_set rel
214214
215215
When arg is another QueryExpression, the restriction ``rel & arg`` restricts rel to elements
216216
that match at least one element in arg (hence arg is treated as an OrList).

0 commit comments

Comments
 (0)