Giter Club home page Giter Club logo

auto-optional's People

Contributors

browniebroke avatar danygielow avatar dependabot[bot] avatar dmytrolitvinov avatar jaap3 avatar luttik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

auto-optional's Issues

Add an exclude option.

Add an exclude option

Consider:

  • Using glob-patterns
  • Looking at other formatters and linters for the best patterns

Leave a ๐Ÿ‘ if you want this

Error: Got unexpected extra arguments (list of files)

Hi @Luttik ,

I am trying to use it in an existing project and I am adding next config to my .pre-commit-config.yaml file.
The idea that I want to specify path to command so it checks src/ folder only
Here is an overview structure of project:

...
โ”œโ”€โ”€ requirements-dev.in
โ”œโ”€โ”€ requirements-dev.txt
โ”œโ”€โ”€ requirements.in
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ src
โ”œโ”€โ”€ static
โ”œโ”€โ”€ templates
โ”œโ”€โ”€ tmp
...

This is config for auto-optional which I integrate into .pre-commit-config.yaml file

          ......
        - id: auto-optional
          name: auto-optional
          description: Adds the Optional type-hint to arguments where the default value is None
          entry: auto-optional src/
          language: python
          types: [python]
          ....

And I am getting next errors:

Error: Got unexpected extra arguments (src/asgi.py src/accounts/models/bill_blacklist_models.py src/hooks/models.py .... (continue list of files which should be proceeded)


How do I resolve it:

Added pass_filenames: false so in the end the config should be:

        - id: auto-optional
          name: auto-optional
          description: Adds the Optional type-hint to arguments where the default value is None
          entry: auto-optional src/
          language: python
          types: [python]
          pass_filenames: false

It takes longer time on the whole for verifying but this is a temp solution for that.

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.