dbrattli / Expression

Pragmatic functional programming for Python inspired by F#
https://expression.readthedocs.io
MIT License
466 stars 31 forks source link

Use pre-commit to run code checks (also in CI) #8

Closed erlendvollset closed 3 years ago

erlendvollset commented 3 years ago

This PR enables running code checks as pre-commit hooks for a shorter feedback loop. Install the hooks by running:

pre-commit install

We also now run all the code checks as part of the CI pipeline.

I took the liberty of adding isort and autoflake aswell - these will sort and remove unused imports.

codecov[bot] commented 3 years ago

Codecov Report

Merging #8 (1705182) into main (786df45) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
+ Coverage   80.16%   80.19%   +0.03%     
==========================================
  Files          37       37              
  Lines        2112     2111       -1     
==========================================
  Hits         1693     1693              
+ Misses        419      418       -1     
Impacted Files Coverage Δ
expression/collections/map.py 60.27% <ø> (ø)
expression/core/aiotools.py 62.79% <ø> (+1.42%) :arrow_up:
expression/__init__.py 100.00% <100.00%> (ø)
expression/collections/maptree.py 58.64% <100.00%> (ø)