GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [WIP] [1140] use longest option argument again by altendky · Pull Request #1149 · pallets/click

Conversation

@altendky

@altendky altendky commented Oct 16, 2018

Copy link
Copy Markdown
Contributor

#1140

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@altendky

altendky commented Oct 16, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

WIP for:

  • Doc fixes
  • Changes entry
  • Apply to 7.x
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

altendky
altendky commented Oct 17, 2018
View reviewed changes
Comment thread click/types.py Outdated
def __init__(self, exists=False, file_okay=True, dir_okay=True,
writable=False, readable=True, resolve_path=False,
allow_dash=False, path_type=None):
allow_dash=False, path_type=None, converter=None):

This comment was marked as off-topic.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@altendky
altendky force-pushed the 1140-use_longest_option_argument_again branch from fe85a3a to 8c80220 Compare October 17, 2018 02:23
altendky added 2 commits October 19, 2018 13:03
@altendky
Correct test and functionality
57837d1
@altendky
Make docs consistent
090f0ad
@altendky
altendky force-pushed the 1140-use_longest_option_argument_again branch from ea3daba to 090f0ad Compare October 19, 2018 17:04
@altendky
altendky changed the base branch from master to 7.x October 19, 2018 17:04
@altendky
Add to CHANGES.rst
6f0e7e1
@altendky altendky changed the title [WIP] [1140] use longest option argument again [1140] use longest option argument again Oct 19, 2018
@altendky altendky mentioned this pull request Oct 23, 2018
Longest option argument not used as internal/variable name #1140
Closed
amiryal
amiryal approved these changes Oct 23, 2018
View reviewed changes

@amiryal amiryal left a comment

Copy link
Copy Markdown

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.

My only feedback, other than LGTM 👍, is regarding commit messages. Maybe you could provide more context, i.e. what the change actually does and why, and possibly squash some or all of them together.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@altendky altendky changed the title [1140] use longest option argument again [WIP] [1140] use longest option argument again Oct 23, 2018
@amiryal

amiryal commented Oct 23, 2018

Copy link
Copy Markdown

Just wanted to echo your earlier #1140 (comment) here as well:

It's kind of tempting to deprecate this 'feature' and just say 'if you have multiple of the longest type of parameter, specify the name'. Or maybe provide a marker so you don't have to repeat. Maybe '+--the-default' or somesuch? I dunno, explicit over implicit and all. This just seems like a bit of a fiddly mess with little benefit.
Sorry, make it backwards compatible but fix the situation by deprecating the implicit order-based selection.

👍
I fully agree, Zen of Python and all.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sirosen
sirosen reviewed Nov 9, 2018
View reviewed changes

@sirosen sirosen left a comment

Copy link
Copy Markdown
Contributor

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.

@altendky, is this still a work in progress?

Since this is the course of action which you and @davidism agreed on, and the changes appear to be complete to me, I'd like to merge.

I agree that your commit messages are a bit minimal -- personally, I'd prefer them either squashed or fleshed out with explanation -- but all of the important discussion is in GitHub anyway.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/test_options.py
(['--aggressive', '--all', '-a'], 'aggressive'),
(['--first', '--second', '--third', '-a', '-b', '-c'], 'first'),
(['--apple', '--banana', '--cantaloupe', '-a', '-b', '-c'], 'apple'),
(['--first', '--second', '--third', '-a', '-b', '-c'], 'second'),

@sirosen sirosen Nov 9, 2018

Copy link
Copy Markdown
Contributor

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 makes me so dizzy to read. 😂

I understand that we're going back to documented behavior, but this is pretty much the perfect example of why I think this comment of yours is spot on. We should really just tell people to write down what they mean...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@altendky

altendky commented Nov 10, 2018

Copy link
Copy Markdown
Contributor Author

After #1140 (comment) and #1140 (comment) I figured we should figure out where we are going since we have no totally obvious thing to revert to. If we want to 'just revert' for now I would think we would want the previous functionality which would be 'last long' not 'longest' like this implements.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sirosen

sirosen commented Nov 10, 2018

Copy link
Copy Markdown
Contributor

Ah, I thought after this comment that we should revert the behavior that this reverts #794.

Reading that PR again, it looks like we switched from "last long opt" to "first long opt" but never updated the docs? I didn't realize we never had the also-documented "longest option" behavior.

Sorry for jumping in on this without properly grasping the situation.

Now that I do, I actually think this PR is probably a bad call -- we should either keep the new behavior in 7.0 and document it, or revert to pre #794 behavior and note it as a bugfix in the 7.1 changelog.

IMO, keeping the new behavior and just updating the docs is the cheapest/easiest solution. If someone showed up as a new user of 7.0, then any behavior change appears to be breaking.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@altendky

altendky commented Nov 10, 2018

Copy link
Copy Markdown
Contributor Author

I only left this open to avoid thrash just in case... But yeah, this is likely just totally dead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@altendky altendky closed this Nov 10, 2018
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
@kdeldycke kdeldycke added the parsing Parsing, parameters, commands, chaining, context label Aug 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@sirosen sirosen sirosen left review comments
@amiryal amiryal amiryal approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

parsing Parsing, parameters, commands, chaining, context

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@altendky @amiryal @sirosen @kdeldycke
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.