66import typer
77from rich import print
88from snyk import SnykClient
9- from typing import Dict
9+ from typing import Dict , Any
1010
1111from snyk_tags import __app_name__ , __version__ , attribute , github
1212
@@ -75,8 +75,8 @@ def apply_tags_to_projects(
7575 name : str ,
7676 tag : str ,
7777 key : str ,
78- tenant : str ,
79- filters : Dict [str , any ] ,
78+ tenant : str = "" ,
79+ filters : Dict [str , Any ] = {} ,
8080) -> None :
8181 with create_client (token = token , tenant = tenant ) as client :
8282 for org_id in org_ids :
@@ -149,7 +149,7 @@ def tag(
149149 ),
150150 tenant : str = typer .Option (
151151 "" , # Default value of comamand
152- help = f "Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant." ,
152+ help = "Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant." ,
153153 ),
154154 tagKey : str = typer .Option (
155155 ..., help = "Tag key: identifier of the tag" # Default value of comamand
@@ -163,7 +163,7 @@ def tag(
163163 bold = True ,
164164 fg = typer .colors .MAGENTA ,
165165 )
166- apply_tags_to_projects (snyktkn , [org_id ], target , tagValue , tagKey , tenant = tenant )
166+ apply_tags_to_projects (snyktkn , [org_id ], target , tagValue , tagKey , tenant )
167167
168168
169169# Collection command to apply the attributes to the collection
@@ -194,7 +194,7 @@ def attributes(
194194 ),
195195 tenant : str = typer .Option (
196196 "" , # Default value of comamand
197- help = f "Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant." ,
197+ help = "Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant." ,
198198 ),
199199):
200200 typer .secho (
@@ -209,5 +209,5 @@ def attributes(
209209 [criticality ],
210210 [environment ],
211211 [lifecycle ],
212- tenant = tenant ,
212+ tenant ,
213213 )
0 commit comments