ci: format

This commit is contained in:
Barrett Ruth 2026-03-12 21:01:11 -04:00
parent 1472b2f333
commit fb633294dc
3 changed files with 25 additions and 10 deletions

View file

@ -1192,7 +1192,10 @@ function M.archive(arg)
log.debug(('archive: days=%d cutoff=%s total_tasks=%d'):format(days, cutoff, #tasks)) log.debug(('archive: days=%d cutoff=%s total_tasks=%d'):format(days, cutoff, #tasks))
local count = 0 local count = 0
for _, task in ipairs(tasks) do for _, task in ipairs(tasks) do
if (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') and task['end'] then if
(task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled')
and task['end']
then
if task['end'] < cutoff then if task['end'] < cutoff then
count = count + 1 count = count + 1
end end
@ -1213,7 +1216,10 @@ function M.archive(arg)
function() function()
local kept = {} local kept = {}
for _, task in ipairs(tasks) do for _, task in ipairs(tasks) do
if (task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled') and task['end'] then if
(task.status == 'done' or task.status == 'deleted' or task.status == 'cancelled')
and task['end']
then
if task['end'] < cutoff then if task['end'] < cutoff then
goto skip goto skip
end end

View file

@ -275,9 +275,9 @@ function M.category_view(tasks)
category = cat, category = cat,
priority = task.priority, priority = task.priority,
overdue = task.status ~= 'done' overdue = task.status ~= 'done'
and task.status ~= 'cancelled' and task.status ~= 'cancelled'
and task.due ~= nil and task.due ~= nil
and parse.is_overdue(task.due) and parse.is_overdue(task.due)
or nil, or nil,
recur = task.recur, recur = task.recur,
forge_spans = compute_forge_spans(task, prefix_len), forge_spans = compute_forge_spans(task, prefix_len),
@ -332,9 +332,9 @@ function M.priority_view(tasks)
category = task.category, category = task.category,
priority = task.priority, priority = task.priority,
overdue = task.status ~= 'done' overdue = task.status ~= 'done'
and task.status ~= 'cancelled' and task.status ~= 'cancelled'
and task.due ~= nil and task.due ~= nil
and parse.is_overdue(task.due) and parse.is_overdue(task.due)
or nil, or nil,
show_category = true, show_category = true,
recur = task.recur, recur = task.recur,

View file

@ -245,8 +245,17 @@ end, {
for word in after_filter:gmatch('%S+') do for word in after_filter:gmatch('%S+') do
used[word] = true used[word] = true
end end
local candidates = local candidates = {
{ 'clear', 'overdue', 'today', 'priority', 'done', 'pending', 'wip', 'blocked', 'cancelled' } 'clear',
'overdue',
'today',
'priority',
'done',
'pending',
'wip',
'blocked',
'cancelled',
}
local store = require('pending.store') local store = require('pending.store')
local s = store.new(store.resolve_path()) local s = store.new(store.resolve_path())
s:load() s:load()