Skip to content

Commit

Permalink
Merge pull request #33 from ambitioninc/develop
Browse files Browse the repository at this point in the history
0.2.1
  • Loading branch information
somewes committed Apr 6, 2018
2 parents 4824dfd + 22bb5f0 commit a7ec6d0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release Notes
=============

v0.2.1
------
* Use property and setter for suppress exceptions

v0.2.0
------
* Handle data type mismatch comparisons and return False
Expand Down
8 changes: 8 additions & 0 deletions kmatch/kmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,11 @@ def get_field_keys(self, pattern=None):
# Pattern length is 3
keys.add(pattern[1])
return keys

@property
def suppress_exceptions(self):
return self._suppress_exceptions

@suppress_exceptions.setter
def suppress_exceptions(self, suppress_exceptions):
self._suppress_exceptions = suppress_exceptions
6 changes: 6 additions & 0 deletions kmatch/tests/kmatch_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ def test_get_field_keys_invalid_pattern(self):
with self.assertRaises(ValueError):
K(pattern).get_field_keys()

def test_properties(self):
k = K(['<=', 'f', 0])
self.assertFalse(k.suppress_exceptions)
k.suppress_exceptions = True
self.assertTrue(k.suppress_exceptions)


class KInitTest(TestCase):
"""
Expand Down
2 changes: 1 addition & 1 deletion kmatch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.0'
__version__ = '0.2.1'

0 comments on commit a7ec6d0

Please sign in to comment.