New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing first line of task's docsting by --list #105 #110

Merged
merged 4 commits into from May 6, 2014

Conversation

Projects
None yet
5 participants
@hirokiky
Contributor

hirokiky commented Jan 18, 2014

Supported issue #105.

I also added a test but I'm not similar with the testing tool 'spec'.
So that, please teach me about it of fix the code If you don't like the addition.

Show outdated Hide outdated invoke/cli.py
docstring = collection[primary].__doc__
if docstring:
max_width = max(map(len, names))
out += " " * (max_width - len(primary) + 1) + docstring.split('\n')[0]

This comment has been minimized.

@rread

rread Jan 21, 2014

suggest adding an lstrip() there (e.g. "... + docstring.lstrip().split('\n')[0]") to support docstrings that start on the line after the quotes.

@rread

rread Jan 21, 2014

suggest adding an lstrip() there (e.g. "... + docstring.lstrip().split('\n')[0]") to support docstrings that start on the line after the quotes.

@hirokiky

This comment has been minimized.

Show comment
Hide comment
@hirokiky

hirokiky Jan 22, 2014

Contributor

@rread Thanks! I fixed it just now.

Contributor

hirokiky commented Jan 22, 2014

@rread Thanks! I fixed it just now.

@jthigpen

This comment has been minimized.

Show comment
Hide comment
@jthigpen

jthigpen Feb 8, 2014

When a submodule has a default task, the denotation of that task causes a bug in the formatting of that output.

  aws.elb_status           Check Status of all load balancers.
  deploy.deploy (deploy)            Deploy the branch (default=stable) to staging.
  deploy.jenkins           Establish ssh tunnel to jenkins on port 9000 and open Jenkins.

jthigpen commented Feb 8, 2014

When a submodule has a default task, the denotation of that task causes a bug in the formatting of that output.

  aws.elb_status           Check Status of all load balancers.
  deploy.deploy (deploy)            Deploy the branch (default=stable) to staging.
  deploy.jenkins           Establish ssh tunnel to jenkins on port 9000 and open Jenkins.
@hirokiky

This comment has been minimized.

Show comment
Hide comment
@hirokiky

hirokiky Feb 9, 2014

Contributor

@jthigpen Thank you. You are completely right. I will fix it as soon as I can!.

It seems this bug caused by a task with some aliases, not only the case of 'default task'.
so that when I fix tests, I will add a task decorated with task(aliases=('',)).
Because It is easier to write and understand that meaning than adding a taks having default task.

Contributor

hirokiky commented Feb 9, 2014

@jthigpen Thank you. You are completely right. I will fix it as soon as I can!.

It seems this bug caused by a task with some aliases, not only the case of 'default task'.
so that when I fix tests, I will add a task decorated with task(aliases=('',)).
Because It is easier to write and understand that meaning than adding a taks having default task.

@patcon

This comment has been minimized.

Show comment
Hide comment

patcon commented Feb 23, 2014

👍

@hirokiky

This comment has been minimized.

Show comment
Hide comment
@hirokiky

hirokiky May 3, 2014

Contributor

This pull-request still can be merged with master safely.
I tried with 0bcf45a.

Contributor

hirokiky commented May 3, 2014

This pull-request still can be merged with master safely.
I tried with 0bcf45a.

@bitprophet bitprophet merged commit d321987 into pyinvoke:master May 6, 2014

1 check passed

default The Travis CI build passed
Details

bitprophet added a commit that referenced this pull request May 6, 2014

@bitprophet

This comment has been minimized.

Show comment
Hide comment
@bitprophet

bitprophet May 6, 2014

Member

Thanks a bunch! Very useful change :)

Merged this in, rejiggered a bunch of it (there was existing code to handle this display format so I used that), added changelog, and seems to all work now. Just pushed.

Member

bitprophet commented May 6, 2014

Thanks a bunch! Very useful change :)

Merged this in, rejiggered a bunch of it (there was existing code to handle this display format so I used that), added changelog, and seems to all work now. Just pushed.

@hirokiky

This comment has been minimized.

Show comment
Hide comment
@hirokiky

hirokiky May 7, 2014

Contributor

Im glad, thanks a lot.

Contributor

hirokiky commented May 7, 2014

Im glad, thanks a lot.

@hirokiky hirokiky deleted the hirokiky:list-with-docstring branch May 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment