Skip to content

Commit f5900d3

Browse files
CBroz1ethho
andauthored
Apply suggestions from code review
Co-authored-by: Ethan Ho <[email protected]>
1 parent ed21f34 commit f5900d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

datajoint/table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def delete(
498498
safemode: If `True`, prohibit nested transactions and prompt to confirm. Default
499499
is `dj.config['safemode']`.
500500
force_parts: Delete from parts even when not deleting from their masters.
501-
include_parts: If `True`, include part/master pairs in the cascade.
501+
force_masters: If `True`, include part/master pairs in the cascade.
502502
Default is `True`.
503503
504504
Returns:
@@ -573,7 +573,7 @@ def cascade(table):
573573

574574
master_name = get_master(child.full_table_name)
575575
if (
576-
include_parts
576+
force_masters
577577
and master_name
578578
and master_name != table.full_table_name
579579
and master_name not in visited_masters

tests/test_cascading_delete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ def test_delete_parts_error(schema_simp_pop):
115115
"""test issue #151"""
116116
with pytest.raises(dj.DataJointError):
117117
Profile().populate_random()
118-
Website().delete(include_parts=False)
118+
Website().delete(force_masters=False)
119119

120120

121121
def test_delete_parts(schema_simp_pop):
122122
"""test issue #151"""
123123
Profile().populate_random()
124-
Website().delete(include_parts=True)
124+
Website().delete(force_masters=True)
125125

126126

127127
def test_delete_parts_complex(schema_simp_pop):

0 commit comments

Comments
 (0)