koji: Lint koji_build.py file a bit and relax linter#775
Conversation
This is a first pass fixing important and low hanging fruits. Pylint now passing (with relaxed header). It will be appreciated if future changes can pass linter, and feel free to make it strictier. Signed-off-by: Philippe Coval <philippe.coval@vates.tech>
|
Have you talked with Yann and Gaëtan about it? There may be a need for coordination with the broader linting efforts. |
| # prev_branch is empty when the head was detached | ||
| subprocess.check_call(['git', 'checkout', prev_branch or commit]) | ||
|
|
||
|
|
There was a problem hiding this comment.
Doubling newlines is not a rule we chose to enforce at the moment.
There was a problem hiding this comment.
ok i can revert this, fyi flake8 complained about that
| return f'{spec.release}.0.{test_build_id}.{build_nb}' | ||
| else: | ||
| return f'{spec.release}~{pre_build_id}.{build_nb}' | ||
| return f'{spec.release}~{pre_build_id}.{build_nb}' |
There was a problem hiding this comment.
We avoided an else, but do we need to enforce that?
There was a problem hiding this comment.
Sure we can skip it
scripts/koji/koji_build.py:145:4: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
|
We haven't updated the project configuration in this repository, as we did in most other python projects, like xcp-ng-tests or xcp-ng-build-env. |
This is a first pass fixing important and low hanging fruits. Pylint now passing (with relaxed header).
It will be appreciated if future changes can pass linter, and feel free to make it strictier.