-
Notifications
You must be signed in to change notification settings - Fork 51
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
Added output format options for --help #180
Conversation
Automatic reply from Jenkins: Can I test this? |
@Caylo unittests required to get this merged |
# along with vsc-base. If not, see <http://www.gnu.org/licenses/>. | ||
# # | ||
""" | ||
A class that has some support functions for generating rst documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a class, just remove the whole A class that has some support
part
Jenkins: ok to test |
Refer to this link for build results (access rights to CI server needed): |
@@ -222,7 +223,13 @@ def take_action(self, action, dest, opt, value, values, parser): | |||
"""Extended take_action""" | |||
orig_action = action # keep copy | |||
|
|||
if action == 'shorthelp': | |||
# dest is None for actions like shorthelp and confighelp | |||
if dest and getattr(parser._long_opt.get('--'+dest, ''), 'store_or', '') == 'formathelp': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
magic string formathelp
, add a constant for this (or for help
)
extend unit tests, bump version, minor fixes
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
titles = [t] | ||
|
||
# small table | ||
table = '\n'.join(mk_rst_table(titles, entries)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the '\n'.join
in both, it adds nothing to the assertEqual
minor style changes in docs.py
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
from vsc.utils.fancylogger import getLogger, setLogLevel, getDetailsLogLevels | ||
from vsc.utils.missing import shell_quote, nub | ||
from vsc.utils.optcomplete import autocomplete, CompleterOption | ||
|
||
|
||
HELP_OUTPUTOPTIONS = ['', 'rst', 'short', 'config',] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename + drop trailing ,
HELP_OUTPUT_FORMAT_OPTIONS = ['', 'rst', 'short', 'config']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or better: HELP_OUTPUT_FORMATS
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
enhance tests for help options
Refer to this link for build results (access rights to CI server needed): |
Going in, thanks @Caylo! |
Added output format options for --help
No description provided.