You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What release version, tag or commit-hash did you use?
v0.1.0 (current main)
Current Behavior
When running the pre-commit task, the black tool makes changes about which then the flake8 linter complains. This causes the CI workflow to break. Because of that the release workflow can not finish as well.
Steps to Reproduce
In the vehicle application you may have code snippet like. There might be better way to express this functionality but it helps to reproduce the bug.
logger.debug(
"Seat Position Changed "+str(data.get(
self.Vehicle.Cabin.Seat.Row1.Pos1.Position).value)
)
When running the pre-commit task, black converts this to
logger.debug(
"Seat Position Changed "+str(data.get(self.Vehicle.Cabin.Seat.Row1.Pos1.Position).value)
Afterwards, flake8 complained about W503 line break before binary operator
in that line.
Expected Behavior
I would expect that black is not making modification which conflict with the configuration of flake8.
Especially, as part of the CI workflow I would not expect that the pre-commit makes any changes to my code at all.
Possible Solution
Disable black for the CI workflow or reshape the configuration for black and flake8 so that they do not create conflicting behavior.
Additional Information
No response
Code of Conduct
I agree to follow this project's "Code of Conduct".
The text was updated successfully, but these errors were encountered:
Hello @eriksven , thank you for report. We will check rules and will align black and flake8 rules.
As far as black is not a linter but formatter, it is expectation that pre-commit will fix all stlyling issues, but it is pity that both tools are not aligned.
Sounds good, thank you. At least in the CI workflow I would even prefer to disable the black formatter. Because the formatting stays inside the workflow and is not committed back to the branch. So essentially, any following linter does not work on the code in the commit but a deviatinig version.
Severity
Medium
What release version, tag or commit-hash did you use?
v0.1.0 (current main)
Current Behavior
When running the pre-commit task, the black tool makes changes about which then the flake8 linter complains. This causes the CI workflow to break. Because of that the release workflow can not finish as well.
Steps to Reproduce
In the vehicle application you may have code snippet like. There might be better way to express this functionality but it helps to reproduce the bug.
When running the pre-commit task, black converts this to
Afterwards, flake8 complained about
W503 line break before binary operator
in that line.
Expected Behavior
I would expect that black is not making modification which conflict with the configuration of flake8.
Especially, as part of the CI workflow I would not expect that the pre-commit makes any changes to my code at all.
Possible Solution
Disable black for the CI workflow or reshape the configuration for black and flake8 so that they do not create conflicting behavior.
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: