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 — Reorder `ParameterSource` by kdeldycke · Pull Request #3248 · pallets/click

Conversation

@kdeldycke

@kdeldycke kdeldycke commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

This reorder the ParameterSource enum by precedence, as suggested in #2879.

It brings an interesting property of being able to check if a value was explicitly provided with that kind of code:

        source = ctx.get_parameter_source("port")
        if source < click.ParameterSource.DEFAULT_MAP:
            ...  # value was explicitly set

Additionally, this PR:

  • change enum type from generic Enum to IntEnum
  • document the precedence in the Sphinx docs
  • expose ParameterSource to the package root

Sorry, something went wrong.

Uh oh!

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

All reactions
@kdeldycke kdeldycke mentioned this pull request Mar 5, 2026
Reorder ParameterSource #2879
Closed
@kdeldycke kdeldycke changed the title Reorder ParameterSource from most to least explicit Reorder ParameterSource Mar 5, 2026
@kdeldycke
kdeldycke force-pushed the reorder-parameter-source branch from c8306cf to 1f42ba5 Compare March 5, 2026 18:54
kdeldycke added a commit to kdeldycke/click-extra that referenced this pull request Mar 5, 2026
@kdeldycke
Update parameter's value precedence
72772be
Refs: pallets/click#3248
@kdeldycke kdeldycke added docs Updates to documentation, readme, docstrings, typos f:parameters labels Mar 16, 2026
@kdeldycke kdeldycke added this to the 8.3.3 milestone Mar 16, 2026
@kdeldycke
kdeldycke force-pushed the reorder-parameter-source branch 2 times, most recently from d7d41bb to d44d711 Compare April 9, 2026 12:00
@kdeldycke

kdeldycke commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator Author

This PR will need its documentation rewritten from rST to Markdown if #3259 is merged.

All reactions

Sorry, something went wrong.

Uh oh!

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

@kdeldycke kdeldycke mentioned this pull request Apr 9, 2026
Move Commands-and-Groups doc from reST to MyST #3259
Merged
@kdeldycke
kdeldycke requested review from Rowlando13 and davidism April 13, 2026 06:21
davidism
davidism approved these changes Apr 13, 2026
View reviewed changes
@kdeldycke

kdeldycke commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator Author

I intentionally keep this PR in unmergeable state as I am waiting for #3259 to be merge beforehand.

davidism reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@kdeldycke
kdeldycke force-pushed the reorder-parameter-source branch from d44d711 to 4d0a4dd Compare April 16, 2026 08:20
@kdeldycke
Reorder ParameterSource from most to least explicit
ac5cec5
Closes pallets#2879
@kdeldycke
kdeldycke force-pushed the reorder-parameter-source branch from 4d0a4dd to ac5cec5 Compare April 16, 2026 08:23
@kdeldycke

kdeldycke commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator Author

Now that #3259 has been translated from rST to MyST, I was able to fix the merge conflict. This PR is ready to be merged upstream.

All reactions

Sorry, something went wrong.

Uh oh!

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

@Rowlando13
Rowlando13 merged commit c7e1ba8 into pallets:stable Apr 16, 2026
11 checks passed

Uh oh!

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

@kdeldycke
kdeldycke deleted the reorder-parameter-source branch April 16, 2026 08:30
@kdeldycke kdeldycke linked an issue Apr 16, 2026 that may be closed by this pull request
Reorder ParameterSource #2879
Closed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 1, 2026
@kdeldycke kdeldycke added parsing Parsing, parameters, commands, chaining, context and removed f:parameters labels Aug 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@davidism davidism davidism approved these changes
@Rowlando13 Rowlando13 Awaiting requested review from Rowlando13

Uh oh!

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

Assignees

No one assigned

Labels

docs Updates to documentation, readme, docstrings, typos parsing Parsing, parameters, commands, chaining, context

Projects

None yet

Milestone

8.3.3

Development

Successfully merging this pull request may close these issues.

Reorder ParameterSource

Uh oh!

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

3 participants

@kdeldycke @davidism @Rowlando13
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.