Error in pipeline while pushing to training

Hello, I’m trying to push a challenge but unfortunately I get rejected by the pipeline
in the checks I get this message:
hookid: flake8
70 code/codeabbey/003/calderonsin.py:4:1: E302 expected 2 blank lines, found 0
71 code/codeabbey/003/calderonsin.py:7:5: E303 too many blank lines (2)
72 code/codeabbey/003/calderonsin.py:20:1: E305 expected 2 blank lines after class or function definition, found 0
73 code/codeabbey/003/calderonsin.py:21:1: W391 blank line at end of file
74 [pylint] pylint…Failed
75 hookid: pylint

and this is the code that I’m trying to push:

and in the commitlint i get this message:
36 :heavy_multiplication_x: header must not be longer than 50 characters, current length is 57 [header-max-length]
37 :heavy_multiplication_x: subject may not be empty [subject-empty]
38 :heavy_multiplication_x: type may not be empty [type-empty]
39 :heavy_multiplication_x: scope may not be empty [scope-empty]
40 :heavy_multiplication_x: found 4 problems, 0 warnings
41 (Need help? -> https://github.com/conventional-changelog/commitlint#what-is-commitlint )
this is my commit message:

  • others: 28 in, 27 out, 52 total.
  • score: 1 initial, 3.24 final, 2.4 progress.
  • global-rank: 20000 initial, 19803 final, 100 progress.
  • national-rank: 780 initial, 750 final, 30 progress.
  • effort: 4 hours during immersion, productivity 0,56 points/hour.

Please replace the images with formatted text directly from the log output to redirect other trainees with the same issue to this post.

The issue you are having is related to pylint and flake8 linters, try following the recommendations:

[68] Flake8................................................................Failed

[69] hookid: flake8

[70] 4:1: E302 expected 2 blank lines, found 0

[71] 7:5: E303 too many blank lines (2)

[72] 20:1: E305 expected 2 blank lines after class or function definition, found 0

[73] 21:1: W391 blank line at end of file

[74] pylint................................................................Failed

[76] ************* Module calderonsin

[77] C: 21, 0: Trailing newlines (trailing-newlines)

I also suggest you to run locally flake8 and pylint before pushing the changes to avoid this kind of refactor.

I will follow your recomendations and what about commitlin’s errors, I’m using the commit template.

Since you are pushing several commits in your branch, Danger will test every commit msg and will fail if the message is not compilant with the template. You have to git squash and rebase, merging your commits into a single one to avoid these kind of issues

I did what you say(git squash and rebase) but comitlint keep trowing me the same error, I know I forgot to put the header but the others errors is what concern me
⧗ input: sol(): #0 , ()
28 - others: 28 in, 27 out, 2.4 total.
29 - score: 1 initial, 3.24 final, 2.4 progress.
30 - global-rank: 20000 initial, 19803 final, 100 progress.
31 - national-rank: 780 initial, 750 final, 30 progress.
32 - effort: 4 hours during immersion, productivity 0,56 points/hour.
33 :heavy_multiplication_x: header must not be longer than 50 characters, current length is 57 [header-max-length]
34 :heavy_multiplication_x: subject may not be empty [subject-empty]
35 :heavy_multiplication_x: type may not be empty [type-empty]
36 :heavy_multiplication_x: scope may not be empty [scope-empty]
37 :heavy_multiplication_x: found 4 problems, 0 warnings

You are adding 13 commits in your branch with different commit messages, and you are 6 commits behind master:

update your local repo, fix the commits, delete your remote branch and push your changes again :wink: