@@ -738,7 +738,7 @@ def members_patch(
738738 )
739739
740740
741- @cli .command (name = "teams-list" , short_help = "Get a list of organization teams." )
741+ @cli .command (short_help = "Get a list of organization teams." )
742742@click .argument ("organization" )
743743@click .pass_context
744744def teams_list (ctx : Context , organization : str ) -> None :
@@ -749,8 +749,8 @@ def teams_list(ctx: Context, organization: str) -> None:
749749 print_json (teams_list )
750750 else :
751751 log (f'Teams members in organization "{ organization } ":' )
752- for team in teams_list :
753- log (f'{ team ["team" ]} ' )
752+ for object_team in teams_list :
753+ log (f'{ object_team ["team" ]} ' )
754754
755755
756756@cli .command (name = "teams-create" , short_help = "Create an organization team." )
@@ -759,12 +759,12 @@ def teams_list(ctx: Context, organization: str) -> None:
759759@click .pass_context
760760def teams_create (ctx : Context , organization : str , team_name : str ) -> None :
761761 """Create a new team named TEAM_NAME in ORGANIZATION."""
762- team = ctx .obj ["client" ].create_organization_team (organization , team_name )
762+ object_team = ctx .obj ["client" ].create_organization_team (organization , team_name )
763763
764764 if ctx .obj ["format_json" ]:
765- print_json (team )
765+ print_json (object_team )
766766 else :
767- log (f'Team "{ team ["team" ]} " created in organization "{ organization } ".' )
767+ log (f'Team "{ object_team ["team" ]} " created in organization "{ organization } ".' )
768768
769769
770770@cli .command (name = "teams-get" , short_help = "Get a list of teams on an organization." )
@@ -773,35 +773,35 @@ def teams_create(ctx: Context, organization: str, team_name: str) -> None:
773773@click .pass_context
774774def teams_get (ctx : Context , organization : str , team_name : str ) -> None :
775775 """Get details of team TEAM_NAME in ORGANIZATION."""
776- team = ctx .obj ["client" ].get_organization_team (organization , team_name )
776+ object_team = ctx .obj ["client" ].get_organization_team (organization , team_name )
777777
778778 if ctx .obj ["format_json" ]:
779- print_json (team )
779+ print_json (object_team )
780780 else :
781- log (f'Team " { team_name } " in organization " { organization } ":' )
782- log ( f' Name: { team [ "team " ]} ' )
783- log ( f' Organization: { team [ "organization" ] } ' )
784- log (f' Members: { ", " .join (team ["members" ])} ' )
781+ log (
782+ f'Team " { object_team [ "team" ] } " in organization " { object_team [ "organization " ]} ":'
783+ )
784+ log (f' Members: { ", " .join (object_team ["members" ])} ' )
785785
786786
787787@cli .command (name = "teams-patch" , short_help = "Rename an organization team." )
788788@click .argument ("organization" )
789789@click .argument ("team_name" )
790- @click .argument ( "new_team_name" )
790+ @click .option ( "--name" , "new_team_name" )
791791@click .pass_context
792792def teams_patch (
793793 ctx : Context , organization : str , team_name : str , new_team_name : str
794794) -> None :
795795 """Rename team TEAM_NAME to NEW_TEAM_NAME in ORGANIZATION."""
796- team = ctx .obj ["client" ].patch_organization_team (
796+ object_team = ctx .obj ["client" ].patch_organization_team (
797797 organization , team_name , new_team_name
798798 )
799799
800800 if ctx .obj ["format_json" ]:
801- print_json (team )
801+ print_json (object_team )
802802 else :
803803 log (
804- f'Team "{ team_name } " in organization "{ organization } " was renamed to "{ team ["team" ]} ".'
804+ f'Team "{ team_name } " in organization "{ organization } " was renamed to "{ object_team ["team" ]} ".'
805805 )
806806
807807
@@ -830,8 +830,9 @@ def team_members_list(ctx: Context, organization: str, team_name: str) -> None:
830830 print_json (members )
831831 else :
832832 log (f'Members of team "{ team_name } " in organization "{ organization } ":' )
833- for member in members :
834- log (member ["member" ])
833+
834+ for object_member in members :
835+ log (object_member ["member" ])
835836
836837
837838@cli .command (
@@ -845,15 +846,15 @@ def team_members_add(
845846 ctx : Context , organization : str , team_name : str , member_username : str
846847) -> None :
847848 """Add member MEMBER_USERNAME to team TEAM_NAME in ORGANIZATION."""
848- member = ctx .obj ["client" ].add_organization_team_member (
849+ object_member = ctx .obj ["client" ].add_organization_team_member (
849850 organization , team_name , member_username
850851 )
851852
852853 if ctx .obj ["format_json" ]:
853- print_json (member )
854+ print_json (object_member )
854855 else :
855856 log (
856- f'Member "{ member ["member" ]} " added to team "{ team_name } " in organization "{ organization } ".'
857+ f'Member "{ object_member ["member" ]} " added to team "{ team_name } " in organization "{ organization } ".'
857858 )
858859
859860
0 commit comments