diff options
author | Wolfgang Müller | 2021-04-28 18:57:09 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-04-28 20:15:53 +0200 |
commit | 778df7fe303aa6d9563a61b181e1f87d347fea5c (patch) | |
tree | a301e364314a0d4be7dcd5adca031f4e4d10643f | |
parent | 13a43aae41cfa791fa33636b37a1db80a559ca17 (diff) | |
download | quarg-778df7fe303aa6d9563a61b181e1f87d347fea5c.tar.gz |
filters: Rename time_from and time_to
These make more sense and are clearer if they're named after the command
line arguments that trigger them.
-rw-r--r-- | quarg/database/filters.py | 8 | ||||
-rw-r--r-- | quarg/main.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/quarg/database/filters.py b/quarg/database/filters.py index ee2b3fb..a78b117 100644 --- a/quarg/database/filters.py +++ b/quarg/database/filters.py @@ -35,11 +35,11 @@ def time_around(datetuple): start, end = datetuple return between(Backlog.time, start, end) -def time_from(start): - return Backlog.time >= start +def time_after(date): + return Backlog.time >= date -def time_to(end): - return Backlog.time <= end +def time_before(date): + return Backlog.time <= date def joined(boolean): return Buffer.joined == boolean diff --git a/quarg/main.py b/quarg/main.py index 3927723..089e43f 100644 --- a/quarg/main.py +++ b/quarg/main.py @@ -59,8 +59,8 @@ def collect_predicates(args): 'query': filters.msg_like if args.expr else filters.msg_contains, 'buffer': filters.buffer, 'nick': filters.nick, - 'after': filters.time_from, - 'before': filters.time_to, + 'after': filters.time_after, + 'before': filters.time_before, 'around': filters.time_around, 'user': filters.user, 'network': filters.network, |