Add linting tool: flake8 both to pyproject.toml and CI pipeline #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
With some investigations, I added an step in the
lint
job of github actions for flake8. Hope it's correct.For now, I added all the errors and warnings emitted by flake8 to the
ignore
entry to keep these commits simple.One of these warnings was about the length of the line. This can be configured in
pyproject.toml
for both black (line-length
) and flake8 (max-line-length
). Some of the lines were above 200 chars of length, so I simply ignored that warning.Further, among these errors, I think the
E712
1 warning can be simply fixed by replacing==
withis True
and!=
withis not True
.Let me know if you think I can help with any of these.
Footnotes
E712: comparison to
True
should be'if cond is True:'
or'if cond:'
↩