Skip to content

Commit 2344efa

Browse files
started to remove lints (documentation can/should be improved)
1 parent 92ad915 commit 2344efa

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

things/api.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,17 +386,32 @@ def get(uuid, default=None, **kwargs):
386386

387387

388388
def todos(uuid=None, **kwargs):
389+
"""
390+
Read to-dos into dicts.
391+
392+
See `api.tasks` for details.
393+
"""
389394
return tasks(uuid=uuid, type="to-do", **kwargs)
390395

391396

392397
def projects(uuid=None, **kwargs):
398+
"""
399+
Read projects into dicts.
400+
401+
See `api.tasks` for details.
402+
"""
393403
return tasks(uuid=uuid, type="project", **kwargs)
394404

395405

396406
# Filter by collections in the Things app sidebar.
397407

398408

399409
def inbox(**kwargs):
410+
"""
411+
Read inbox into dicts.
412+
413+
See `api.tasks` for details.
414+
"""
400415
return tasks(start="Inbox", **kwargs)
401416

402417

@@ -434,14 +449,29 @@ def upcoming(**kwargs):
434449

435450

436451
def anytime(**kwargs):
452+
"""
453+
Read anytime to-dos into dicts.
454+
455+
See `api.tasks` for details.
456+
"""
437457
return tasks(start="Anytime", **kwargs)
438458

439459

440460
def someday(**kwargs):
461+
"""
462+
Read someday to-dos into dicts.
463+
464+
See `api.tasks` for details.
465+
"""
441466
return tasks(start_date=False, start="Someday", **kwargs)
442467

443468

444469
def logbook(**kwargs):
470+
"""
471+
Read logbook to-dos into dicts.
472+
473+
See `api.tasks` for details.
474+
"""
445475
result = [*canceled(**kwargs), *completed(**kwargs)]
446476
result.sort(key=lambda task: task["stop_date"], reverse=True)
447477
return result
@@ -451,6 +481,11 @@ def logbook(**kwargs):
451481

452482

453483
def canceled(**kwargs):
484+
"""
485+
Read cancelled to-dos into dicts.
486+
487+
See `api.tasks` for details.
488+
"""
454489
return tasks(status="canceled", **kwargs)
455490

456491

@@ -467,6 +502,11 @@ def completed(**kwargs):
467502

468503

469504
def due(**kwargs):
505+
"""
506+
Read due to-dos into dicts.
507+
508+
See `api.tasks` for details.
509+
"""
470510
result = tasks(due_date=True, **kwargs)
471511
result.sort(key=lambda task: task["due_date"])
472512
return result
@@ -476,6 +516,10 @@ def due(**kwargs):
476516

477517

478518
def link(uuid):
519+
"""
520+
Returns a things:///show?id=uuid link.
521+
"""
522+
479523
return f"things:///show?id={uuid}"
480524

481525

0 commit comments

Comments
 (0)