Skip to content

Commit

Permalink
Merge pull request #396 from data-8/predicate_warning_everytime
Browse files Browse the repository at this point in the history
Warns every time for (possibly) incorrect predicate usage
  • Loading branch information
davidwagner committed Jul 3, 2019
2 parents 8fbb623 + 8ebc92b commit 4967a1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datascience/predicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numbers
import numpy as np
import warnings
warnings.simplefilter('always', SyntaxWarning)

__all__ = ['are']

Expand Down Expand Up @@ -256,4 +257,5 @@ def check_iterable(y):
warnings.warn("Do not pass an array or list to a predicate. \
If you are trying to find rows where two columns are the \
same, use table.where('c', are.equal_to, table.column('d'))\
instead of table.where('c', are.equal_to(table.column('d'))).")
instead of table.where('c', are.equal_to(table.column('d'))).",
SyntaxWarning)

0 comments on commit 4967a1b

Please sign in to comment.