Remove use of typing.Set

Replace all use of typing.Set with its equivalent Python collection,
set. This syntax was introduced by Python 3.9 as part of PEP 585.


Change-Id: I9f70352f6b2f8f4cb21519149c04c82c1d04ad80
Fuchsia-Auto-Submit: Sam Balana <>
Commit-Queue: Auto-Submit <>
Reviewed-by: Karl Ward <>
diff --git a/packages/antlion/controllers/ b/packages/antlion/controllers/
index c32901f..28477a3 100755
--- a/packages/antlion/controllers/
+++ b/packages/antlion/controllers/
@@ -17,7 +17,7 @@
 import ipaddress
 import time
 from dataclasses import dataclass
-from typing import Any, FrozenSet, Mapping, Set
+from typing import Any, FrozenSet, Mapping
 from antlion import logger, utils
 from antlion.capabilities.ssh import SSHConfig, SSHProvider
@@ -711,7 +711,7 @@
             raise ValueError(f"Invalid identifier {identifier} given")
         return instance.hostapd.get_current_channel()
-    def get_stas(self, identifier: str) -> Set[str]:
+    def get_stas(self, identifier: str) -> set[str]:
         """Return MAC addresses of all associated STAs on the given AP."""
         instance = self._aps.get(identifier)
         if instance is None:
diff --git a/packages/antlion/controllers/ap_lib/ b/packages/antlion/controllers/ap_lib/
index 6e355f2..75de9e6 100644
--- a/packages/antlion/controllers/ap_lib/
+++ b/packages/antlion/controllers/ap_lib/
@@ -17,7 +17,7 @@
 import logging
 import re
 import time
-from typing import Any, Iterable, Set
+from typing import Any, Iterable
 from antlion.controllers.ap_lib import hostapd_constants
 from antlion.controllers.ap_lib.extended_capabilities import ExtendedCapabilities
@@ -157,7 +157,7 @@
         list_sta_cmd = "list_sta"
         return self._run_hostapd_cli_cmd(list_sta_cmd)
-    def get_stas(self) -> Set[str]:
+    def get_stas(self) -> set[str]:
         """Return MAC addresses of all associated STAs."""
         list_sta_result = self._list_sta()
         stas = set()