From 636f9911fda4bb79fd0b0e1899a59eed8355218e Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 20 Jun 2022 20:12:16 +0200 Subject: [PATCH] Replace typing.re import (#2788) --- netmiko/snmp_autodetect.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netmiko/snmp_autodetect.py b/netmiko/snmp_autodetect.py index e21381eca..f514a435c 100644 --- a/netmiko/snmp_autodetect.py +++ b/netmiko/snmp_autodetect.py @@ -20,8 +20,7 @@ Note, pysnmp is a required dependency for SNMPDetect and is intentionally not included in netmiko requirements. So installation of pysnmp might be required. """ -from typing import Optional, Dict -from typing.re import Pattern +from typing import Optional, Dict, Pattern import re try: @@ -334,7 +333,7 @@ def autodetect(self) -> Optional[str]: for entry in snmp_mapper_list: for device_type, v in entry.items(): oid: str = v["oid"] # type: ignore - regex: Pattern = v["expr"] + regex: Pattern[str] = v["expr"] # type: ignore # Used cache data if we already queryied this OID if self._response_cache.get(oid):