Code Monkey home page Code Monkey logo

Comments (8)

andreroggeri avatar andreroggeri commented on August 15, 2024

Is it possible to use black formatter with single quotes ? (It's my preference)

from ynab-sdk-python.

Tommaso-n avatar Tommaso-n commented on August 15, 2024

You can use --skip-string-normalization option to avoid converting single quotes to double quotes

from ynab-sdk-python.

andreroggeri avatar andreroggeri commented on August 15, 2024

Ok, I'm still undecided about single/double quotes, but I agree that black can be a good addition to this project.

I have zero knowledge abou github actions, can we mix them with travis ?

Also, do you want to tackle this one ?

And last but not least, add the black badge on the readme 🏴

from ynab-sdk-python.

Tommaso-n avatar Tommaso-n commented on August 15, 2024

We can use pre-commit. I've found this guide:

https://www.mattlayman.com/blog/2018/python-code-black/

You have to add pre-commit to requirements-dev.txt, create the file .pre-commit-config.yaml in your repo and add to this file the following:

repos:

This way black will check and modify every code before being committed.
Although i don't know if it can be used with the --skip-string-normalization option

from ynab-sdk-python.

andreroggeri avatar andreroggeri commented on August 15, 2024

The pre-commit could be an extra, but since it can be skipped, its important to run the check on the CI.

It seems to be easy to do this in the lint step (That currently does nothing 😆 )

from ynab-sdk-python.

Tommaso-n avatar Tommaso-n commented on August 15, 2024

ok, so you just have to add "black --check ." to the lint step?

from ynab-sdk-python.

andreroggeri avatar andreroggeri commented on August 15, 2024

from ynab-sdk-python.

andreroggeri avatar andreroggeri commented on August 15, 2024

Done by #71

from ynab-sdk-python.

Related Issues (15)

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.