Skip to content

Commit d009e91

Browse files
authored
Replace Path.not_exists() with Path.does_not_exist() (#335)
1 parent 46112de commit d009e91

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

pynamodb/attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def is_in(self, *values):
105105
def exists(self):
106106
return AttributePath(self).exists()
107107

108-
def not_exists(self):
109-
return AttributePath(self).not_exists()
108+
def does_not_exist(self):
109+
return AttributePath(self).does_not_exist()
110110

111111
def is_type(self):
112112
# What makes sense here? Are we using this to check if deserialization will be successful?

pynamodb/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
GE: '__ge__',
227227
GT: '__gt__',
228228
NOT_NULL: 'exists',
229-
NULL: 'not_exists',
229+
NULL: 'does_not_exist',
230230
CONTAINS: 'contains',
231231
NOT_CONTAINS: 'contains', # special cased
232232
BEGINS_WITH: 'startswith',

pynamodb/expressions/condition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __getitem__(self, idx):
105105
def exists(self):
106106
return Exists(self)
107107

108-
def not_exists(self):
108+
def does_not_exist(self):
109109
return NotExists(self)
110110

111111
def is_type(self, attr_type):

pynamodb/tests/test_expressions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ def test_exists(self):
167167
assert placeholder_names == {'foo': '#0'}
168168
assert expression_attribute_values == {}
169169

170-
def test_not_exists(self):
171-
condition = self.attribute.not_exists()
170+
def test_does_not_exist(self):
171+
condition = self.attribute.does_not_exist()
172172
placeholder_names, expression_attribute_values = {}, {}
173173
expression = condition.serialize(placeholder_names, expression_attribute_values)
174174
assert expression == "attribute_not_exists (#0)"

0 commit comments

Comments
 (0)