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.
See https://peps.python.org/pep-0585/
Change-Id: I9f70352f6b2f8f4cb21519149c04c82c1d04ad80
Reviewed-on: https://fuchsia-review.googlesource.com/c/antlion/+/890276
Fuchsia-Auto-Submit: Sam Balana <sbalana@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Reviewed-by: Karl Ward <karlward@google.com>
diff --git a/packages/antlion/controllers/access_point.py b/packages/antlion/controllers/access_point.py
index c32901f..28477a3 100755
--- a/packages/antlion/controllers/access_point.py
+++ b/packages/antlion/controllers/access_point.py
@@ -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/hostapd.py b/packages/antlion/controllers/ap_lib/hostapd.py
index 6e355f2..75de9e6 100644
--- a/packages/antlion/controllers/ap_lib/hostapd.py
+++ b/packages/antlion/controllers/ap_lib/hostapd.py
@@ -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()