Giter Site home page Giter Site logo

Comments (5)

sijanonly avatar sijanonly commented on June 12, 2024 1

@LucasSD , Plan was to use both together. Even black do most of the formatting we still need flake8 for checking some cases; If I am not wrong.

from djangosnippets.org.

sijanonly avatar sijanonly commented on June 12, 2024

I am working on it.

from djangosnippets.org.

LucasSD avatar LucasSD commented on June 12, 2024

Given we have the workflow pythonpackage.yml using flake8, is this issue now redundant, or do we want to use Black instead of flake8? Or do we want to use both?!

from djangosnippets.org.

chriswedgwood avatar chriswedgwood commented on June 12, 2024

@sijanonly @LucasSD could we add a .pre-commit-config.yaml. I use cookicutter-django quite a lot and it has a pretty tidy setup for this:

exclude: 'docs|node_modules|migrations|.git|.tox'
default_stages: [commit]
fail_fast: true

repos:

sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date

ci:
autoupdate_schedule: weekly
skip: []
submodules: false

from djangosnippets.org.

sijanonly avatar sijanonly commented on June 12, 2024

@sijanonly @LucasSD could we add a .pre-commit-config.yaml. I use cookicutter-django quite a lot and it has a pretty tidy setup for this:

exclude: 'docs|node_modules|migrations|.git|.tox'
default_stages: [commit]
fail_fast: true

repos:

* repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v4.0.1
  hooks:
  
  * id: trailing-whitespace
  * id: end-of-file-fixer
  * id: check-yaml

* repo: https://github.com/psf/black
  rev: 21.7b0
  hooks:
  
  * id: black

* repo: https://github.com/timothycrosley/isort
  rev: 5.9.3
  hooks:
  
  * id: isort

* repo: https://gitlab.com/pycqa/flake8
  rev: 3.9.2
  hooks:
  
  * id: flake8
    args: ['--config=setup.cfg']
    additional_dependencies: [flake8-isort]

sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date

ci:
autoupdate_schedule: weekly
skip: []
submodules: false

Yes. Definitely. We can do that. Let me have a look right away.

from djangosnippets.org.

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.