Deepreg: CI + docs: pre-commit hook with contradicting changes w/ flake8 and black

Created on 6 Jul 2020  路  4Comments  路  Source: DeepRegNet/DeepReg

Issue description

In this thread, we get discrepancies between actions for black and flake8 that cause CI to fail. Black 8 causes linting changes that fail flake8. Probably requires modification of the pre-commit hook/CI actions such that there is a preferential linter or the issue, we drop one of two, or provide some instruction to ignore such an error from flake8.

Type of Issue

Please delete options that are not relevant.

  • [x] Bug report
  • [x] New feature request

For bug report or feature request, steps to reproduce the issue, including (but not limited to):

See link above.

What's the expected result?

Pre-commit hook does not contradict itself when applying changes between flake8 and black.

docs wontfix

All 4 comments

I feel for most of the conflicts, there's a workaround way, like the example in the issue.
I also had another conflict yesterday, due to a too long comment.

But I'm not sure how you gonna solve it without specific examples? (The example in the issue, i consider it as a problem of the code, as normally the comma was unnecessary)

Ok, adding won't fix label for now but still worth thinking about... at a later stage.

Have again a too long commit,

image

So maybe we can maintain a list of possible failures/conflicts in the docs, and for each case, we consider do we have a work around or we have to solve the conflict.

Close this issue as we have this conflict section now https://deepreg.readthedocs.io/en/latest/contributing/setup.html#linting-conflicts

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mathpluscode picture mathpluscode  路  3Comments

NMontanaBrown picture NMontanaBrown  路  5Comments

NMontanaBrown picture NMontanaBrown  路  7Comments

s-sd picture s-sd  路  3Comments

NMontanaBrown picture NMontanaBrown  路  5Comments