-
Notifications
You must be signed in to change notification settings - Fork 89
koji: Lint koji_build.py file a bit and relax linter #775
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
base: master
Are you sure you want to change the base?
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 <[email protected]>
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doubling newlines is not a rule we chose to enforce at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We avoided an else, but do we need to enforce that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
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.