Skip to content

gh-67248: Update cmd.py #92254

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

Merged
merged 5 commits into from
May 4, 2022
Merged

gh-67248: Update cmd.py #92254

merged 5 commits into from
May 4, 2022

Conversation

samwyse
Copy link
Contributor

@samwyse samwyse commented May 3, 2022

sort the miscellaneous topics, per #67248

sort the miscellaneous topics
@ghost
Copy link

ghost commented May 3, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Every change to Python requires a NEWS entry.

Please, add it using the blurb_it Web app or the blurb command-line tool.

@samwyse samwyse changed the title Update cmd.py Update cmd.py #67248 May 3, 2022
@samwyse samwyse changed the title Update cmd.py #67248 GH-67248 Update cmd.py May 3, 2022
@samwyse samwyse changed the title GH-67248 Update cmd.py gh-67248: Update cmd.py May 3, 2022
@carljm
Copy link
Member

carljm commented May 3, 2022

Looks reasonable! It looks like there are tests for some of this in https://github.com/python/cpython/blob/main/Lib/test/test_cmd.py -- might make sense to add a test that reflects this behavior change?

I talked to @ericsnowcurrently here at the PyCon sprint about fixing the issue in Tools/c-analyzer that seems to be making patchcheck unhappy on the Azure Pipelines PR check.

samwyse added 2 commits May 3, 2022 15:30
rename 'help' to 'topics', change it from a dict to a set
Add tests for miscellaneous help topics
@samwyse
Copy link
Contributor Author

samwyse commented May 3, 2022

@carljm I've added terryjreedy's suggestions from the issue comments. OTOH, I've only added one misc topic, I guess I need to think of another to test sorting.

add a second misc topic to test sorting

also, the empty command tested with mycmd.cmdloop() was repeating a command issued with mycmd.onecmd(), so I moved it into the middle of the list of commands, to make the output more dependable.
@JelleZijlstra JelleZijlstra self-assigned this May 3, 2022
@JelleZijlstra JelleZijlstra merged commit 465fdc0 into python:main May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants