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

Fix linter issues and turn on linter checking in CI #46

Open
2 tasks
cwmeijer opened this issue Feb 18, 2021 · 0 comments
Open
2 tasks

Fix linter issues and turn on linter checking in CI #46

cwmeijer opened this issue Feb 18, 2021 · 0 comments

Comments

@cwmeijer
Copy link
Member

We have a linter profile in place, and a Github Action that is checking the style, but the linter returns many style messages.

  • fix these issues
  • turn on linter in GA (remove the --zero-exit flag in the workflow)

Example of the list with linter messages at the time of writing this issue:

Messages

scripts/Actitracker_train.py
Line: 6
pylint: unused-import / Unused import sys
Line: 9
pylint: import-error / Unable to import 'pandas'
Line: 12
pylint: unused-import / Unused storage imported from mcfly
Line: 55
pep8: E117 / over-indented (col 9)
pylint: bad-indentation / Bad indentation. Found 8 spaces, expected 4
Line: 59
pylint: unexpected-keyword-arg / Unexpected keyword argument 'outputpath' in function call (col 40)
Line: 98
pylint: trailing-newlines / Trailing newlines

scripts/EEG_alcoholic_train.py
Line: 6
pylint: unused-import / Unused import sys
Line: 9
pylint: import-error / Unable to import 'pandas'
pylint: unused-import / Unused pandas imported as pd
Line: 11
pylint: unused-import / Unused storage imported from mcfly
Line: 59
pep8: E117 / over-indented (col 9)
pylint: bad-indentation / Bad indentation. Found 8 spaces, expected 4
Line: 65
pylint: unexpected-keyword-arg / Unexpected keyword argument 'early_stopping' in function call (col 40)
Line: 79
pylint: trailing-newlines / Trailing newlines

scripts/experiment_PAMAP.py
Line: 13
pylint: import-error / Unable to import 'pandas'
Line: 15
pylint: unused-import / Unused storage imported from mcfly
Line: 16
pylint: import-error / Unable to import 'keras.models'
pylint: unused-import / Unused load_model imported from keras.models
Line: 26
pep8: E501 / line too long (233 > 159 characters) (col 160)
Line: 59
pylint: pointless-statement / Statement seems to have no effect
Line: 100
pep8: E117 / over-indented (col 9)
pylint: bad-indentation / Bad indentation. Found 8 spaces, expected 4
Line: 149
pylint: trailing-newlines / Trailing newlines

scripts/experiment_PAMAP2_9fold.py
Line: 12
pylint: unused-import / Unused import sys
Line: 15
pylint: import-error / Unable to import 'pandas'
pylint: unused-import / Unused pandas imported as pd
Line: 37
pep8: E117 / over-indented (col 9)
pylint: bad-indentation / Bad indentation. Found 8 spaces, expected 4
Line: 58
pep8: E501 / line too long (527 > 159 characters) (col 160)
Line: 81
pep8: E501 / line too long (290 > 159 characters) (col 160)
Line: 105
pylint: import-error / Unable to import 'keras.optimizers'
Line: 106
pylint: import-error / Unable to import 'keras.models'
Line: 134
pylint: unexpected-keyword-arg / Unexpected keyword argument 'early_stopping' in function call (col 44)
Line: 154
pylint: not-an-iterable / Non-iterable value len(Xs) is used in an iterating context (col 9)
Line: 191
pep8: E501 / line too long (343 > 159 characters) (col 160)
Line: 236
pylint: trailing-newlines / Trailing newlines

scripts/pamap2.py
Line: 10
pylint: import-error / Unable to import 'pandas'
Line: 65
pylint: pointless-statement / Statement seems to have no effect

tests/test_tutorial_pamap2.py
Line: 3
pylint: import-error / Unable to import 'pandas'
Line: 4
pylint: import-error / Unable to import 'nose.tools'
pylint: unused-import / Unused assert_equal imported from nose.tools
Line: 5
pylint: unused-import / Unused listdir imported from os
Line: 20
pylint: unused-variable / Unused variable 'splitted_y' (col 19)
Line: 32
pylint: unused-variable / Unused variable 'y_train' (col 17)
Line: 69
pep8: E712 / comparison to True should be 'if cond is True:' or 'if cond:' (col 17)
pylint: singleton-comparison / Comparison to True should be just 'expr' (col 11)
Line: 86
pylint: import-outside-toplevel / Import outside toplevel (tensorflow.keras.models.load_model) (col 8)
Line: 90
pep8: E305 / expected 2 blank lines after class or function definition, found 1 (col 1)

utils/init.py
Line: 1
pyflakes: F401 / '.tutorial_pamap2.*' imported but unused (col 1)

utils/tutorial_pamap2.py
Line: 8
pylint: import-error / Unable to import 'pandas'
Line: 79
pylint: consider-using-enumerate / Consider using enumerate instead of iterating with range and len (col 4)
Line: 134
pylint: consider-using-enumerate / Consider using enumerate instead of iterating with range and len (col 4)
Line: 204
pylint: unused-variable / Unused variable 'local_fn' (col 12)
Line: 250
pylint: consider-using-in / Consider merging these comparisons with "in" to 'tty in ("<class 'slice'>", "<type 'slice'>")' (col 7)
Line: 254
pylint: unnecessary-comprehension / Unnecessary use of a comprehension
Line: 255
pylint: unnecessary-comprehension / Unnecessary use of a comprehension
Line: 272
pylint: useless-return / Useless return at end of function or method
Line: 452
pylint: unused-variable / Unused variable 'local_fn' (col 12)

utils/tutorial_racketsports.py
Line: 33
pylint: unused-variable / Unused variable 'local_fn' (col 12)
Line: 77
pylint: useless-return / Useless return at end of function or method
Line: 143
pylint: unused-variable / Unused variable 'local_fn' (col 12)
Line: 169
pep8: E741 / ambiguous variable name 'l' (col 21)

utils/tutorial_vu.py
Line: 7
pylint: import-error / Unable to import 'xlrd'
Line: 47
pylint: logging-format-interpolation / Use lazy % formatting in logging functions (col 20)
Line: 49
pylint: logging-format-interpolation / Use lazy % formatting in logging functions (col 20)
Line: 51
pylint: logging-format-interpolation / Use lazy % formatting in logging functions (col 20)
Line: 53
pylint: logging-format-interpolation / Use lazy % formatting in logging functions (col 20)
Line: 119
pylint: logging-format-interpolation / Use lazy % formatting in logging functions (col 20)

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

No branches or pull requests

1 participant