From 778df7fe303aa6d9563a61b181e1f87d347fea5c Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Wed, 28 Apr 2021 18:57:09 +0200 Subject: 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. --- quarg/database/filters.py | 8 ++++---- 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, -- cgit v1.2.3-2-gb3c3