File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -559,10 +559,6 @@ class Membership(GitHubCore):
559
559
560
560
"""The wrapper for information about Team and Organization memberships."""
561
561
562
- def __init__ (self , membership , session = None ):
563
- super (Membership , self ).__init__ (membership , session )
564
- self ._update_attributes (membership )
565
-
566
562
def _repr (self ):
567
563
return '<Membership [{0}]>' .format (self .organization )
568
564
@@ -581,10 +577,12 @@ def edit(self, state):
581
577
582
578
:param str state: (required), the state the membership should be in.
583
579
Only accepts ``"active"``.
584
- :returns: itself
580
+ :returns: whether the edit was successful or not
581
+ :rtype: bool
585
582
"""
586
583
if state and state .lower () == 'active' :
587
584
data = dumps ({'state' : state .lower ()})
588
585
json = self ._json (self ._patch (self ._api , data = data ))
589
586
self ._update_attributes (json )
590
- return self
587
+ return True
588
+ return False
You can’t perform that action at this time.
0 commit comments