PythonFreeCourse / calendar

Apache License 2.0
34 stars 52 forks source link

Feature/add githooks #224

Closed annashtirberg closed 3 years ago

annashtirberg commented 3 years ago

this is for Add git hooks for pre-commit flake8 #196 Used pre-commit for adding git hooks before doing commit The hooks do flake8 checks like in the github actions Also did yapf for making the code look good and fit flake8 style

annashtirberg commented 3 years ago

The hooks need to be installed. The way to do it is like this:

  1. pip install -r requirements.txt (install all requirements)
  2. pre-commit install (install git hooks)

After this every commited file will be checked for style and also fixed if possible If flake8 don't like your file the commit will fail and print flake8 errors to fix If yapf changed your file the commit will fail and the file will need to "git add" again

Hope it will help everyone :)

codecov-io commented 3 years ago

Codecov Report

Merging #224 (36438cb) into develop (93ae431) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #224   +/-   ##
========================================
  Coverage    99.40%   99.40%           
========================================
  Files           47       47           
  Lines         2171     2171           
========================================
  Hits          2158     2158           
  Misses          13       13           

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 93ae431...9533f32. Read the comment docs.