lobbyboy-ssh / lobbyboy

A lobby boy will create a VPS server when you need one, and destroy it after using it.
238 stars 10 forks source link

Use pre-commit as the linter #56

Closed frostming closed 2 years ago

frostming commented 2 years ago

Close #48

Install the commit hooks in dev:

poetry run pre-commit install

Run in CI: I recommend using pre-commit ci, it can upgrade the hooks and commit linter changes automatically. It is also blazing fast, e2e run time is < 10s

BTW, the code is changed by the linter so this is better to merge after #55, otherwise there will be lots of conflicts

codecov-commenter commented 2 years ago

Codecov Report

Merging #56 (1d04bf3) into main (26b94d2) will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
+ Coverage   42.45%   42.50%   +0.04%     
==========================================
  Files          16       16              
  Lines        1279     1280       +1     
==========================================
+ Hits          543      544       +1     
  Misses        736      736              
Flag Coverage Δ
unittests 42.50% <100.00%> (+0.04%) :arrow_up:

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

Impacted Files Coverage Δ
lobbyboy/config.py 73.38% <100.00%> (+0.43%) :arrow_up:
lobbyboy/contrib/provider/digitalocean.py 29.03% <100.00%> (ø)
lobbyboy/contrib/provider/footloose.py 92.15% <100.00%> (ø)
lobbyboy/contrib/provider/ignite.py 55.76% <100.00%> (ø)
lobbyboy/contrib/provider/linode.py 29.34% <100.00%> (ø)
lobbyboy/contrib/provider/multipass.py 52.54% <100.00%> (ø)
lobbyboy/contrib/provider/vagrant.py 31.11% <100.00%> (ø)
lobbyboy/main.py 44.30% <100.00%> (ø)
lobbyboy/provider.py 67.36% <100.00%> (ø)
lobbyboy/server.py 29.12% <100.00%> (ø)
... and 3 more

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 26b94d2...1d04bf3. Read the comment docs.

messense commented 2 years ago

I've requested pre-commit ci permission, @laixintao can you grant it?

messense commented 2 years ago

Looks like pre-commit ci is configured.