Giter Site home page Giter Site logo

Comments (7)

mitsuhiko avatar mitsuhiko commented on August 25, 2024

This currently does indeed not work and the reason for this is that default is applied for individual values as it goes through the types. This is actually not such a simple change and I'm not sure if it makes sense fixing.

from click.

Raynes avatar Raynes commented on August 25, 2024

I see your point, but it seems conceptually flawed that I'm unable to set a default set of values for something that is always going to be a set of values. I can obviously just handle defaults myself (which is what I'm doing now), but this really feels unintuitive.

Any thoughts?

Also, thanks for this library. It's pretty darn swell.

from click.

RNAer avatar RNAer commented on August 25, 2024

can we check if the default is Sequence object? If it is, then check type iterativley; if not, do the checking that click current does.

from click.

hsharrison avatar hsharrison commented on August 25, 2024

Is this the same problem I'm running into with nargs > 1?

from click.

mitsuhiko avatar mitsuhiko commented on August 25, 2024

You cannot set defaults for either nargs > 1 or multiple currently.

from click.

mitsuhiko avatar mitsuhiko commented on August 25, 2024

This is fixed now for 3.x.

from click.

jck avatar jck commented on August 25, 2024

This still does not work for nargs > 1 or nargs == -1

from click.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.