Skip to content

Commit faa6a0b

Browse files
Merge pull request #43 from snyk-labs/fix/missing-required-arguments
fix: missing required arguments in apply_tags_to_*
2 parents 8aa2401 + ef03146 commit faa6a0b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "snyk-tags"
3-
version = "2.5.2"
3+
version = "2.5.3"
44
description = "CLI tool designed to manage tags and attributes at scale"
55
authors = ["EricFernandezSnyk <eric.fernandez@snyk.io>"]
66
license = "MIT"

snyk_tags/attribute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import typer
88
from rich import print
99
from snyk import SnykClient
10-
from typing import Dict
10+
from typing import Dict, Any
1111

1212
from snyk_tags import __app_name__, __version__
1313

@@ -96,8 +96,8 @@ def apply_attributes_to_projects(
9696
criticality: list,
9797
environment: list,
9898
lifecycle: list,
99-
tenant: str,
100-
filters: Dict[str, any],
99+
tenant: str = "",
100+
filters: Dict[str, Any] = {},
101101
) -> None:
102102
with create_client(token=token, tenant=tenant) as client:
103103
for org_id in org_ids:

snyk_tags/collection.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import typer
77
from rich import print
88
from snyk import SnykClient
9-
from typing import Dict
9+
from typing import Dict, Any
1010

1111
from 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

Comments
 (0)