Skip to content

Commit

Permalink
Remove use of Literal type (SOFTWARE-5629)
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Jul 26, 2023
1 parent ddbb929 commit 6f1eb73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stashcache.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections import defaultdict
from typing import Dict, List, Optional, Literal
from typing import Dict, List, Optional

from webapp.common import is_null, PreJSON, XROOTD_CACHE_SERVER, XROOTD_ORIGIN_SERVER
from webapp.exceptions import DataError, ResourceNotRegistered, ResourceMissingService
Expand Down Expand Up @@ -542,7 +542,7 @@ def get_namespaces_info(global_data: GlobalData) -> PreJSON:

def _service_resource_dict(
r: Resource,
service_name: Literal[XROOTD_CACHE_SERVER, XROOTD_ORIGIN_SERVER],
service_name,
auth_port_default: int,
unauth_port_default: int
):
Expand Down Expand Up @@ -594,7 +594,7 @@ def _namespace_dict(ns: Namespace):
def _resource_has_downed_service(
r: Resource,
t: Topology,
service_name: Literal[XROOTD_CACHE_SERVER, XROOTD_ORIGIN_SERVER]
service_name
):
if r.name not in t.present_downtimes_by_resource:
return False
Expand Down

0 comments on commit 6f1eb73

Please sign in to comment.