pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.32k stars 365 forks source link

inv --list not alphabetically sorted? #855

Closed honzajavorek closed 1 year ago

honzajavorek commented 2 years ago

It seems to me the --list output uses the original function name here, not the actual name given to the task:

$ inv --list
Available tasks:

  lint
  screenshots
  test
  checks.anchors
  checks.links
  sync.avatars
  sync.club-content
  ...

Note the screenshots task, which is defined as follows:

@task(name='screenshots')
def main(context):
    ...

The letter M (main) would be between L (lint) and T (test), but the actual task name is screenshots, which should be later in the list.

micahjsmith commented 1 year ago

@honzajavorek it seems to me the tasks are first sorted alphabetically and then the collections are sorted alphabetically. l < s < t. is it possible the list is already sorted correctly?

honzajavorek commented 1 year ago

You're right, I'm sorry for filing this! After a few hours of programming I probably don't even know the alphabet anymore.