Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pre-commit as the linter #56

Closed
wants to merge 1 commit into from
Closed

Use pre-commit as the linter #56

wants to merge 1 commit into from

Conversation

frostming
Copy link
Collaborator

@frostming frostming commented Dec 14, 2021

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
Copy link

codecov-commenter commented Dec 14, 2021

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%) ⬆️

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%) ⬆️
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
Copy link
Collaborator

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

@messense
Copy link
Collaborator

Looks like pre-commit ci is configured.

@messense messense closed this Dec 16, 2021
@messense messense reopened this Dec 16, 2021
@luxiaba luxiaba mentioned this pull request Dec 17, 2021
@messense messense closed this in #57 Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recommended use pre-commit to make code style consistency
3 participants