-
Notifications
You must be signed in to change notification settings - Fork 27
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
Pages flag added for listing jobs based on page number #265
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: pranjalg1331 <[email protected]>
@fgibertoni Please review. |
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.
Hi! Thank you for your submission. I suggested only some small changes.
Also, I noticed that the unit tests covering your new code are missing, please add them.
Regarding your question, yes. I think that this new functionality should be added in the doc
@@ -581,6 +581,24 @@ def get_all_jobs(self) -> List[Dict[str, Any]]: | |||
response = self.__make_request("GET", url=url) | |||
return response.json() | |||
|
|||
def get_jobs_by_page(self, page: int) -> List[Dict[str, Any]]: |
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.
Just to align the parameter to the others.
def get_jobs_by_page(self, page: int) -> List[Dict[str, Any]]: | |
def get_jobs_by_page(self, page: Union[int, str]) -> List[Dict[str, Any]]: |
@@ -42,12 +42,22 @@ def jobs(): | |||
show_choices=True, | |||
help="Only show jobs having a particular status", | |||
) | |||
@click.option( | |||
"-p", | |||
"--page", |
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 think this parameter should be added so that the --help
option of the ls
command shows that it's expecting an interger and not text.
"--page", | |
"--page", | |
type=int, |
Description
I have added a new function
get_jobs_by_page
that returns a jobs list based on the page number.Please include a summary of the change.
Related issues
Closes #264
Type of change
Please delete options that are not relevant.
Checklist
Black
gave 0 errors.Flake
gave 0 errors.please follow these rules
Real World Example
Please delete if the PR is for bug fixing.
Otherwise, please provide the resulting raw JSON of a finished analysis (and, if you like, a screenshot of the results). This is to allow the maintainers to understand how the analyzer works.