GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — Support `show_default` string in prompts by MirrorDNA-Reflection-Protocol · Pull Request #3165 · pallets/click ConversationSummaryFixes #2836 When Before@click.option('--name', default='default', show_default='show_default', prompt=True)Help: AfterHelp: Changes
TestingManually tested with the reproduction case from the issue. The prompt now correctly shows the custom
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. show_default string in prompts
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
Fixes #2836 When show_default is set to a string on an Option with prompt=True, the string was only used in the help text but not in the actual prompt. Now the custom string is also shown in the prompt. Changes: - Update _build_prompt() to accept str | bool for show_default - When show_default is a string, display it in parentheses like the help text - Update prompt() signature to accept str | bool for show_default - Pass show_default to prompt() regardless of type (was only passing bool) Before: Help: --name TEXT [default: (show_default)] Prompt: Name [default]: After: Help: --name TEXT [default: (show_default)] Prompt: Name [(show_default)]:
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
@davidism : this PR may have been initially AI generated, but still fix a legitimate issue. That's why I took over it 2 weeks ago to amend and fix its slop. See the comment history. Now that 8.3.2 has been release, I propose to start the 8.3.3 merging phase with this PR first: it is addressing an issue that a lot of AI have tried to solve in the past few weeks. So merging this will cut all the AI generated siblings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I'm not interested in cleaning up AI generated code. I don't want those contributions. I'm sorry you put time into this, but I'd rather that time be spent on creating a PR by hand rather than laundering an AI contribution Look at the users contribution graph. It's obvious that they're not putting time into anything they're doing. I'm not interested in encouraging that behavior. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I understand. When I started working on that issue I realized we had a human-contributed solution at #2837. But the initial user deleted his forked repository so I could not rework its contribution within the #2837 PR. So I defaulted to the oldest PR which is this one. I wasn't 100% sure this PR was AI-generated so with the benefits of the doubt, and to not erase the original author commit infos, I decided to build on top of it. I can recreate a clean PR with my modifications to fix #2836 once and for all. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You can still get the patch for a PR, even if the branch has been deleted by appending .patch to the URL. You can apply that in a new branch to re-create the PR while preserving that users credit. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR has been superseded by #3328. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
show_default as a string isn't used in prompts as the default shown
There was an error while loading. Please reload this page.