mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Add trailing underscore to filter_ and use {} as the default dict
This commit is contained in:
@@ -469,20 +469,22 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
url_parameters
|
||||
)
|
||||
|
||||
def get_members(self, filter=github.GithubObject.NotSet,
|
||||
def get_members(self, filter_=github.GithubObject.NotSet,
|
||||
role=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /orgs/:org/members <http://developer.github.com/v3/orgs/members>`_
|
||||
:param filter: string
|
||||
:param filter_: string
|
||||
:param role: string
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser`
|
||||
"""
|
||||
assert filter is github.GithubObject.NotSet or isinstance(filter, (str, unicode)), filter
|
||||
assert role is github.GithubObject.NotSet or isinstance(role, (str, unicode)), role
|
||||
assert (filter_ is github.GithubObject.NotSet or
|
||||
isinstance(filter_, (str, unicode))), filter_
|
||||
assert (role is github.GithubObject.NotSet or
|
||||
isinstance(role, (str, unicode))), role
|
||||
|
||||
url_parameters = dict()
|
||||
if filter is not github.GithubObject.NotSet:
|
||||
url_parameters["filter"] = filter
|
||||
url_parameters = {}
|
||||
if filter_ is not github.GithubObject.NotSet:
|
||||
url_parameters["filter"] = filter_
|
||||
if role is not github.GithubObject.NotSet:
|
||||
url_parameters["role"] = role
|
||||
return github.PaginatedList.PaginatedList(
|
||||
|
||||
Reference in New Issue
Block a user