Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Simplify changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Porges authored Nov 10, 2022
1 parent 8486fdf commit 0f37a2a
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/deployment/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import uuid
import zipfile
from datetime import datetime, timedelta
from typing import Any, Dict, List, Optional, Tuple, TypeVar, Union, cast
from typing import Any, Dict, List, Optional, Tuple, Union, cast
from uuid import UUID

from azure.common.credentials import get_cli_profile
Expand Down Expand Up @@ -103,17 +103,6 @@
]
logger = logging.getLogger("deploy")

T = TypeVar("T")


def union_lists(list1: List[T], list2: List[T]) -> List[T]:
# this doesn’t use the set() type since we need
# to support values that are not hashable
result = []
result.extend(list1)
result.extend([x for x in list2 if x not in result])
return result


def gen_guid() -> str:
return str(uuid.uuid4())
Expand Down Expand Up @@ -525,8 +514,8 @@ def update_existing_app_registration(

# find any identifier URIs that need updating
identifier_uris: List[str] = app["identifierUris"]
updated_identifier_uris = union_lists(
identifier_uris, self.get_identifier_urls()
updated_identifier_uris = list(
set(identifier_uris) | set(self.get_identifier_urls())
)
if len(updated_identifier_uris) > len(identifier_uris):
update_properties["identifierUris"] = updated_identifier_uris
Expand Down

0 comments on commit 0f37a2a

Please sign in to comment.