photosynthesis-team / piq

Measures and metrics for image2image tasks. PyTorch.
Apache License 2.0
1.4k stars 120 forks source link

Add pre-commit hooks #293

Closed zakajd closed 2 years ago

zakajd commented 2 years ago

Closes #271

Proposed Changes

@snk4tr you wanted to do this yourself, but I'm just tired of formatting files by hand 😄 This should eliminate "Fix flake8" and "Fix mypy" commits entirely.

Ready for review. It seems like a lot of files have changed, but it's mostly whitespace difference.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

codecov[bot] commented 2 years ago

Codecov Report

Merging #293 (b767ad9) into master (6e06c80) will decrease coverage by 2.27%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
- Coverage   93.27%   91.00%   -2.28%     
==========================================
  Files          33       33              
  Lines        2289     2289              
==========================================
- Hits         2135     2083      -52     
- Misses        154      206      +52     
Flag Coverage Δ
unittests 91.00% <100.00%> (-2.28%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
piq/base.py 88.46% <ø> (ø)
piq/dss.py 98.96% <ø> (ø)
piq/fsim.py 100.00% <ø> (ø)
piq/functional/base.py 92.10% <ø> (ø)
piq/functional/colour_conversion.py 100.00% <ø> (ø)
piq/functional/resize.py 67.14% <ø> (ø)
piq/gmsd.py 100.00% <ø> (ø)
piq/gs.py 32.96% <ø> (-57.15%) :arrow_down:
piq/haarpsi.py 100.00% <ø> (ø)
piq/mdsi.py 100.00% <ø> (ø)
... and 13 more