From 763491310ac399a6cd01b63fd09547b65ae7d4e8 Mon Sep 17 00:00:00 2001 From: Sebastien Besson Date: Tue, 18 Aug 2015 20:43:27 +0100 Subject: [PATCH] Add trailing underscore to filter_ and use {} as the default dict --- github/Organization.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index ea52e228..e043cac1 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -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 `_ - :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(