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
[pontos-release]: Remove project parameter, f-string-ed strings, refactor #105
Conversation
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 88.34% 88.72% +0.37%
==========================================
Files 9 10 +1
Lines 678 683 +5
Branches 106 104 -2
==========================================
+ Hits 599 606 +7
+ Misses 61 60 -1
+ Partials 18 17 -1
Continue to review full report at Codecov.
|
pontos/release/helper.py
Outdated
args.append(to) | ||
if develop: | ||
args.append('--develop') | ||
executed, filename = _version.main(False, args=args) |
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.
I would recommend to only pass boolean args by keyword.
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.
The called main looks like this:
def main(leave=True, args=None):
So i can not pass any parameter but leave
and args
...
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.
For the readability it is always better to pass pass booleans as keywords. somefunc(True, False, True)
is not readable. In our case version.main(leave=False, args=args)
is easier to read.
Co-authored-by: Björn Ricks <bjoern.ricks@greenbone.net>
What:
--project
parameter and resolve the project name withget_project_name()
.format()
to f-string inrelease.py
helper.py
, to reduce LoC per file ...Why:
How:
Checklist: