jazzband / jsonmodels

jsonmodels is library to make it easier for you to deal with structures that are converted to, or read from JSON.
http://jsonmodels.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
334 stars 51 forks source link

Add basic pre-commit config #158

Closed hugovk closed 2 years ago

hugovk commented 2 years ago

Fixes https://github.com/jazzband/jsonmodels/issues/149. Fixes https://github.com/jazzband/jsonmodels/issues/150.

More can be added as required (see https://pre-commit.com/hooks.html), but this adds a basic pre-commit config file to stop the check erroring PRs (e.g. https://github.com/jazzband/jsonmodels/pull/157):

image

codecov[bot] commented 2 years ago

Codecov Report

Merging #158 (ce3601d) into master (48ce16b) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #158   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          764       764           
  Branches       157       157           
=========================================
  Hits           764       764           
Impacted Files Coverage Δ
jsonmodels/builders.py 100.00% <100.00%> (ø)
jsonmodels/fields.py 100.00% <100.00%> (ø)
jsonmodels/models.py 100.00% <100.00%> (ø)
jsonmodels/parsers.py 100.00% <100.00%> (ø)
jsonmodels/utilities.py 100.00% <100.00%> (ø)
jsonmodels/validators.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 48ce16b...ce3601d. Read the comment docs.

hugovk commented 2 years ago

Updated to add isort and Black, for https://github.com/jazzband/jsonmodels/issues/149 and https://github.com/jazzband/jsonmodels/issues/150.