Skip to content

Commit

Permalink
Replace typing.re import (#2788)
Browse files Browse the repository at this point in the history
  • Loading branch information
srittau authored Jun 20, 2022
1 parent ee1d552 commit 636f991
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions netmiko/snmp_autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 636f991

Please sign in to comment.