09406ac09be9ecb0603a104b10cc6d16053a1c21
def list() split into 3 functions: def fetching_data_from_libpagure, filtering_pull_requests() and list() for better testability
def list()
def fetching_data_from_libpagure
filtering_pull_requests()
list()
This function doesn't fetch data from Pagure, it creates a Pagure object, which holds the information about Pagure instance. But fetching of data happens only when you use the methods of this object.
True
Usually when you name or describe the function, try to avoid too much grammar in the name. If it is a verb - let it be the infinitive.
For example:
function filter_pull_requests
filter_pull_requests
description Filter pull requests according to additional parameters
Filter pull requests according to additional parameters
And so on.
It saves space on the screen, time for typing, and sounds more direct. And also later on you don't need to remember the exact wording, you always go for infinitive form when search for smth
:thumbsup: I'll amend it.
rebased onto 8aae758f7b44545ab9cc714fe9823e74a448c876
Since we set pagure instance as a global object, we don't need to pass it as a parameter, simply use it inside the function
Maybe use capitalized P here as in P = libpagure.Pagure(pagure_token=api_token, pagure_repository=project) or PAGURE?
P = libpagure.Pagure(pagure_token=api_token, pagure_repository=project)
PAGURE
To clarify that we are going to use it as a global object not a local variable
ups, I forgot to remove it, that was only for some testing purposes :)
Maybe use capitalized P here as in P = libpagure.Pagure(pagure_token=api_token, pagure_repository=project) or PAGURE? To clarify that we are going to use it as a global object not a local variable
ok, I'll fix it!
rebased onto 9810322cd8f8f58b7d27acd9a3ca45a718b4995a
rebased onto 09406ac09be9ecb0603a104b10cc6d16053a1c21
Pull-Request has been merged by lenkaseg
def list()split into 3 functions:def fetching_data_from_libpagure,filtering_pull_requests()andlist()for better testability