Open suhaibmujahid opened 1 year ago
@suhaibmujahid I would like to work on this issue!
def get_ids(params: dict) -> List[int]:
"""
Retrieves a list of bug IDs from Bugzilla based on the given parameters.
Args:
params (dict): A dictionary of parameters to pass to the Bugzilla API.
Returns:
list of int: A list of bug IDs.
Raises:
None
"""
assert "include_fields" not in params or params["include_fields"] == "id"
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
Bugzilla.BUGZILLA_CHUNK_SIZE = 7000
all_ids = []
def bughandler(bug):
all_ids.append(bug["id"])
params["include_fields"] = "id"
Bugzilla(params, bughandler=bughandler).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
return all_ids
This is an example for get_ids function, @suhaibmujahid I'm I on track with this?
@suhaibmujahid I would like to work on this issue!
@Karnankita04 Anyone can work on any issue as long as it is not linked to an open pull request.
It's always good to have descriptive and informative docstrings ...
@fadebowaley Please do not post auto-generated content in this project
This is an example for get_ids function, @suhaibmujahid I'm I on track with this?
@skynette It will be more efficient to give feedback on code in a PR than here in the issue. Here some notes:
Raises
if the function is not raising specific exceptions"""
okay noted, will make a PR soon
@suhaibmujahid @Karnankita04 I apologise if my content was misleading. Thank you for further explanation on Docstring and type annotations
Adding
Args
andReturns
should follow Google Style Python Docstrings. The docstrings should not include type annotations; these types should be added to the function itself.