Skip to content

Commit

Permalink
Various code style improvements, mainly to TaxBrain views
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassz committed Jun 14, 2018
1 parent 20578c3 commit 53264e1
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 111 deletions.
7 changes: 6 additions & 1 deletion webapp/apps/taxbrain/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@

BOOL = WILDCARD | TRUE | FALSE
MORE_BOOLS = COMMON + BOOL
INPUT = pp.Optional(REVERSE) + BOOL + pp.ZeroOrMore(MORE_BOOLS) | pp.Optional(REVERSE) + VALUE + pp.ZeroOrMore(MORE_VALUES)
INPUT = (pp.Optional(REVERSE)
+ BOOL
+ pp.ZeroOrMore(MORE_BOOLS) | pp.Optional(REVERSE)
+ VALUE
+ pp.ZeroOrMore(MORE_VALUES))

TRUE_REGEX = re.compile('(?i)true')
FALSE_REGEX = re.compile('(?i)false')


def is_wildcard(x):
if isinstance(x, six.string_types):
return x in ('*', '*') or x.strip() in ('*', '*')
Expand Down
Loading

0 comments on commit 53264e1

Please sign in to comment.