Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Make Todo's comparable to allow for sorting? #8

@lordminx

Description

@lordminx

First: Thanks for writing and publishing a cool package!

I started using todotxtio for a little project of mine where I needed something to parse my todo.txt and while playing around with it I noticed that Todo objects are not comparable and thus can't easily be sorted using list.sort() or sorted(). Since this was functionality I was missing I implemented a very rough and NOT production/pull ready sketch of this using functools total_ordering decorator.

Only afterwards I read Issue #2, which I interpret to mean that not adding comparability was intentional and so I figured I open up a new issue and, well, ask:

Is the fact that Todo objects are not comparable to each other the way things are supposed to work or would you accept a PR to add that functionality?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions