containers / qm

QM is a containerized environment for running Functional Safety qm (Quality Management) software
https://github.com/containers/qm
GNU General Public License v2.0
22 stars 25 forks source link

car-dashboard is not passing flake8 test #112

Closed sandrobonazzola closed 1 year ago

sandrobonazzola commented 1 year ago

pre-commit hooks requires flake8 test to pass but car-dashboard is not passing:

tests/e2e/dashboard-tui/car-dashboard:1:1: D100 Missing docstring in public module
tests/e2e/dashboard-tui/car-dashboard:33:1: D101 Missing docstring in public class
tests/e2e/dashboard-tui/car-dashboard:60:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:61:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:62:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:63:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:64:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:65:16: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:69:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:70:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:71:15: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:72:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:73:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:74:16: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:78:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:79:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:80:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:81:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:82:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:83:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:84:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:85:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:86:16: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:97:1: D101 Missing docstring in public class
tests/e2e/dashboard-tui/car-dashboard:101:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:101:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:101:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:130:1: D202 No blank lines allowed after function docstring
tests/e2e/dashboard-tui/car-dashboard:130:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:164:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:188:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:188:1: D412 No blank lines allowed between a section header and its content
tests/e2e/dashboard-tui/car-dashboard:221:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:221:1: D412 No blank lines allowed between a section header and its content
tests/e2e/dashboard-tui/car-dashboard:255:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:255:1: D412 No blank lines allowed between a section header and its content
tests/e2e/dashboard-tui/car-dashboard:287:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:287:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:287:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:312:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:345:1: D210 No whitespaces allowed surrounding docstring text
tests/e2e/dashboard-tui/car-dashboard:345:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:362:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:390:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:425:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:447:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:459:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:534:1: D102 Missing docstring in public method
rhatdan commented 1 year ago

Not sure how this is a qm bug?

sandrobonazzola commented 1 year ago

well, car-dashboard is in tests/e2e/dashboard-tui/car-dashboard within qm project and if you run pre-commit run --all-files within qm project it fails.

dougsland commented 1 year ago

Not sure how this is a qm bug?

It's not bug on qm but "is part" of e2e and demo. It uses qm behind the scenes to demonstrate e2e works and also could be used as a purely as demo. I will fix this today, should be trivial.

dougsland commented 1 year ago

Interesting, flake8 tool didn't show any warning or issue but pre-commit did:

[root@dell730 dashboard-tui]# rpm -qf /bin/flake8
python3-flake8-5.0.3-2.fc38.noarch
[root@dell730 dashboard-tui]# flake8 car-dashboard
[root@dell730 dashboard-tui]#

pre-commit

# pre-commit run --all-files
trim trailing whitespace.................................................Passed
shellcheck...............................................................Failed
- hook id: shellcheck
- exit code: 1

In tests/e2e/lib/tests line 31:
                $(echo "${node_name}")
                ^--------------------^ SC2046 (warning): Quote this to prevent word splitting.
                ^--------------------^ SC2116 (style): Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2116 -- Useless echo? Instead of 'cmd $(e...

markdownlint.............................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/e2e/dashboard-tui/car-dashboard:1:1: D100 Missing docstring in public module
tests/e2e/dashboard-tui/car-dashboard:33:1: D101 Missing docstring in public class
tests/e2e/dashboard-tui/car-dashboard:60:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:61:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:62:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:63:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:64:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:65:16: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:69:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:70:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:71:15: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:72:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:73:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:74:16: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:78:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:79:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:80:13: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:81:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:82:12: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:83:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:84:14: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:85:10: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:86:16: ISC002 implicitly concatenated string literals over continuation line
tests/e2e/dashboard-tui/car-dashboard:97:1: D101 Missing docstring in public class
tests/e2e/dashboard-tui/car-dashboard:101:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:101:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:101:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:130:1: D202 No blank lines allowed after function docstring
tests/e2e/dashboard-tui/car-dashboard:130:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:164:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:188:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:188:1: D412 No blank lines allowed between a section header and its content
tests/e2e/dashboard-tui/car-dashboard:221:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:221:1: D412 No blank lines allowed between a section header and its content
tests/e2e/dashboard-tui/car-dashboard:255:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:255:1: D412 No blank lines allowed between a section header and its content
tests/e2e/dashboard-tui/car-dashboard:287:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:287:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:287:1: D414 Section has no content
tests/e2e/dashboard-tui/car-dashboard:312:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:345:1: D210 No whitespaces allowed surrounding docstring text
tests/e2e/dashboard-tui/car-dashboard:345:1: D400 First line should end with a period
tests/e2e/dashboard-tui/car-dashboard:362:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:390:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:425:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:447:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:459:1: D102 Missing docstring in public method
tests/e2e/dashboard-tui/car-dashboard:534:1: D102 Missing docstring in public method

@Yarboa seems a good change to include in our GH Actions scripts?

dougsland commented 1 year ago

Solved via: https://github.com/containers/qm/pull/125