From 377600340c6a1216e4fa0ed2d4af42c2d1f2870a Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sat, 6 Jul 2024 20:35:18 -0700 Subject: [PATCH] Update black --- netmiko/a10/a10_ssh.py | 1 + netmiko/adva/__init__.py | 1 + netmiko/adva/adva_aos_fsp_150_f2.py | 1 + netmiko/adva/adva_aos_fsp_150_f3.py | 1 + netmiko/alcatel/alcatel_aos_ssh.py | 1 + netmiko/aruba/aruba_aoscx.py | 1 + netmiko/aruba/aruba_os.py | 1 + netmiko/base_connection.py | 1 + netmiko/calix/calix_b6.py | 1 + netmiko/centec/centec_os.py | 1 + netmiko/ciena/ciena_saos.py | 1 + netmiko/cisco/cisco_asa_ssh.py | 1 + netmiko/cisco/cisco_ftd_ssh.py | 1 + netmiko/cisco/cisco_tp_tcce.py | 1 + netmiko/cisco/cisco_viptela.py | 1 + netmiko/cisco/cisco_wlc_ssh.py | 1 + netmiko/cisco_base_connection.py | 1 + netmiko/dell/dell_dnos6.py | 1 + netmiko/dell/dell_force10_ssh.py | 1 + netmiko/dell/dell_os10_ssh.py | 1 + netmiko/dell/dell_powerconnect.py | 1 + netmiko/dell/dell_sonic_ssh.py | 1 + netmiko/digi/digi_transport.py | 1 + netmiko/enterasys/enterasys_ssh.py | 1 + netmiko/ericsson/ericsson_ipos.py | 1 + netmiko/ericsson/ericsson_mltn.py | 1 + netmiko/extreme/extreme_ers_ssh.py | 1 + netmiko/extreme/extreme_exos.py | 1 + netmiko/extreme/extreme_nos_ssh.py | 1 + netmiko/extreme/extreme_slx_ssh.py | 1 + netmiko/extreme/extreme_tierraos_ssh.py | 1 + netmiko/extreme/extreme_vsp_ssh.py | 1 + netmiko/fiberstore/fiberstore_fsos.py | 1 + netmiko/mellanox/mellanox_mlnxos_ssh.py | 1 + netmiko/mrv/mrv_lx.py | 1 + netmiko/mrv/mrv_ssh.py | 1 + netmiko/netgear/netgear_prosafe_ssh.py | 1 + netmiko/oneaccess/oneaccess_oneos.py | 1 + netmiko/ruijie/ruijie_os.py | 1 + netmiko/scp_functions.py | 1 + netmiko/scp_handler.py | 1 + netmiko/snmp_autodetect.py | 1 + netmiko/sophos/sophos_sfos_ssh.py | 1 + netmiko/ssh_autodetect.py | 1 + netmiko/ssh_dispatcher.py | 1 + netmiko/terminal_server/terminal_server.py | 1 + netmiko/utilities.py | 1 + 47 files changed, 47 insertions(+) diff --git a/netmiko/a10/a10_ssh.py b/netmiko/a10/a10_ssh.py index 5ca269d7a..22c08efdd 100644 --- a/netmiko/a10/a10_ssh.py +++ b/netmiko/a10/a10_ssh.py @@ -1,4 +1,5 @@ """A10 support.""" + from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/adva/__init__.py b/netmiko/adva/__init__.py index dd6368b08..971b1994e 100644 --- a/netmiko/adva/__init__.py +++ b/netmiko/adva/__init__.py @@ -1,4 +1,5 @@ """Adva Device Drivers""" + from netmiko.adva.adva_aos_fsp_150_f2 import AdvaAosFsp150F2SSH from netmiko.adva.adva_aos_fsp_150_f3 import AdvaAosFsp150F3SSH diff --git a/netmiko/adva/adva_aos_fsp_150_f2.py b/netmiko/adva/adva_aos_fsp_150_f2.py index f53a2e753..c1f9af8f4 100644 --- a/netmiko/adva/adva_aos_fsp_150_f2.py +++ b/netmiko/adva/adva_aos_fsp_150_f2.py @@ -1,4 +1,5 @@ """Adva support.""" + import re from typing import Any, Optional from netmiko.no_enable import NoEnable diff --git a/netmiko/adva/adva_aos_fsp_150_f3.py b/netmiko/adva/adva_aos_fsp_150_f3.py index 23e32ec11..6576392e3 100644 --- a/netmiko/adva/adva_aos_fsp_150_f3.py +++ b/netmiko/adva/adva_aos_fsp_150_f3.py @@ -1,4 +1,5 @@ """Adva F3 Device Support""" + import re from typing import ( Optional, diff --git a/netmiko/alcatel/alcatel_aos_ssh.py b/netmiko/alcatel/alcatel_aos_ssh.py index 6c8da7a8d..81a65441c 100644 --- a/netmiko/alcatel/alcatel_aos_ssh.py +++ b/netmiko/alcatel/alcatel_aos_ssh.py @@ -1,4 +1,5 @@ """Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).""" + from netmiko.no_enable import NoEnable from netmiko.no_config import NoConfig from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/aruba/aruba_aoscx.py b/netmiko/aruba/aruba_aoscx.py index c26978ce9..a055da045 100644 --- a/netmiko/aruba/aruba_aoscx.py +++ b/netmiko/aruba/aruba_aoscx.py @@ -4,6 +4,7 @@ For use with Aruba AOS CX devices. """ + from typing import Any from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/aruba/aruba_os.py b/netmiko/aruba/aruba_os.py index 1c3b5e718..884d313ea 100644 --- a/netmiko/aruba/aruba_os.py +++ b/netmiko/aruba/aruba_os.py @@ -4,6 +4,7 @@ For use with Aruba OS Controllers. """ + from typing import Any from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 299763dcd..307223da9 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -6,6 +6,7 @@ Also defines methods that should generally be supported by child classes """ + from typing import ( Optional, Callable, diff --git a/netmiko/calix/calix_b6.py b/netmiko/calix/calix_b6.py index 593c5d592..a1c5bf963 100644 --- a/netmiko/calix/calix_b6.py +++ b/netmiko/calix/calix_b6.py @@ -1,4 +1,5 @@ """Calix B6 SSH Driver for Netmiko""" + from typing import Any import time from os import path diff --git a/netmiko/centec/centec_os.py b/netmiko/centec/centec_os.py index d1e1307f6..e02c214b2 100644 --- a/netmiko/centec/centec_os.py +++ b/netmiko/centec/centec_os.py @@ -1,4 +1,5 @@ """Centec OS Support""" + from netmiko.cisco_base_connection import CiscoBaseConnection diff --git a/netmiko/ciena/ciena_saos.py b/netmiko/ciena/ciena_saos.py index b74a61c64..a8d97f789 100644 --- a/netmiko/ciena/ciena_saos.py +++ b/netmiko/ciena/ciena_saos.py @@ -1,4 +1,5 @@ """Ciena SAOS support.""" + from typing import Optional, Any import re import os diff --git a/netmiko/cisco/cisco_asa_ssh.py b/netmiko/cisco/cisco_asa_ssh.py index e87c766f3..0f24ffe78 100644 --- a/netmiko/cisco/cisco_asa_ssh.py +++ b/netmiko/cisco/cisco_asa_ssh.py @@ -1,4 +1,5 @@ """Subclass specific to Cisco ASA.""" + from typing import Any, Union, List, Dict, Optional import re import time diff --git a/netmiko/cisco/cisco_ftd_ssh.py b/netmiko/cisco/cisco_ftd_ssh.py index 6cc94a0c1..7226a8d6e 100644 --- a/netmiko/cisco/cisco_ftd_ssh.py +++ b/netmiko/cisco/cisco_ftd_ssh.py @@ -1,4 +1,5 @@ """Subclass specific to Cisco FTD.""" + from typing import Any from netmiko.no_enable import NoEnable from netmiko.no_config import NoConfig diff --git a/netmiko/cisco/cisco_tp_tcce.py b/netmiko/cisco/cisco_tp_tcce.py index 5e37e5851..596020bab 100644 --- a/netmiko/cisco/cisco_tp_tcce.py +++ b/netmiko/cisco/cisco_tp_tcce.py @@ -6,6 +6,7 @@ Written by Ahmad Barrin Updated by Kirk Byers """ + from typing import Any, Union, List, Dict import time import re diff --git a/netmiko/cisco/cisco_viptela.py b/netmiko/cisco/cisco_viptela.py index 86b058976..81bff0f5b 100644 --- a/netmiko/cisco/cisco_viptela.py +++ b/netmiko/cisco/cisco_viptela.py @@ -1,4 +1,5 @@ """Subclass specific to Cisco Viptela.""" + from typing import Union, Sequence, Iterator, TextIO, Any import re diff --git a/netmiko/cisco/cisco_wlc_ssh.py b/netmiko/cisco/cisco_wlc_ssh.py index b4ece3b23..464a6dedf 100644 --- a/netmiko/cisco/cisco_wlc_ssh.py +++ b/netmiko/cisco/cisco_wlc_ssh.py @@ -1,4 +1,5 @@ """Netmiko Cisco WLC support.""" + from typing import Any, Union, Sequence, Iterator, TextIO import time import re diff --git a/netmiko/cisco_base_connection.py b/netmiko/cisco_base_connection.py index 6de5062d0..848537764 100644 --- a/netmiko/cisco_base_connection.py +++ b/netmiko/cisco_base_connection.py @@ -1,4 +1,5 @@ """CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.""" + from typing import Optional import re import time diff --git a/netmiko/dell/dell_dnos6.py b/netmiko/dell/dell_dnos6.py index e901abe8e..23fa5cd79 100644 --- a/netmiko/dell/dell_dnos6.py +++ b/netmiko/dell/dell_dnos6.py @@ -1,4 +1,5 @@ """Dell N2/3/4000 base driver- supports DNOS6.""" + from netmiko.dell.dell_powerconnect import DellPowerConnectBase diff --git a/netmiko/dell/dell_force10_ssh.py b/netmiko/dell/dell_force10_ssh.py index babc8bee1..afab5d0d9 100644 --- a/netmiko/dell/dell_force10_ssh.py +++ b/netmiko/dell/dell_force10_ssh.py @@ -1,4 +1,5 @@ """Dell Force10 Driver - supports DNOS9.""" + from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/dell/dell_os10_ssh.py b/netmiko/dell/dell_os10_ssh.py index 5ed6605ac..20658df4e 100644 --- a/netmiko/dell/dell_os10_ssh.py +++ b/netmiko/dell/dell_os10_ssh.py @@ -1,4 +1,5 @@ """Dell EMC Networking OS10 Driver - supports dellos10.""" + from typing import Any, Optional from netmiko.base_connection import BaseConnection from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/dell/dell_powerconnect.py b/netmiko/dell/dell_powerconnect.py index 8614b4c03..c689feabb 100644 --- a/netmiko/dell/dell_powerconnect.py +++ b/netmiko/dell/dell_powerconnect.py @@ -1,4 +1,5 @@ """Dell PowerConnect Driver.""" + from typing import Optional from paramiko import SSHClient import time diff --git a/netmiko/dell/dell_sonic_ssh.py b/netmiko/dell/dell_sonic_ssh.py index e3a3ad083..b22730d45 100644 --- a/netmiko/dell/dell_sonic_ssh.py +++ b/netmiko/dell/dell_sonic_ssh.py @@ -2,6 +2,7 @@ Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic. """ + from netmiko.no_enable import NoEnable from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko import log diff --git a/netmiko/digi/digi_transport.py b/netmiko/digi/digi_transport.py index 0aa832bf8..ae970b171 100644 --- a/netmiko/digi/digi_transport.py +++ b/netmiko/digi/digi_transport.py @@ -1,4 +1,5 @@ """Digi TransPort Routers""" + from typing import Any from netmiko.no_enable import NoEnable from netmiko.no_config import NoConfig diff --git a/netmiko/enterasys/enterasys_ssh.py b/netmiko/enterasys/enterasys_ssh.py index 79c1c2f8e..2ddc3a1cf 100644 --- a/netmiko/enterasys/enterasys_ssh.py +++ b/netmiko/enterasys/enterasys_ssh.py @@ -1,4 +1,5 @@ """Enterasys support.""" + from typing import Any from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/ericsson/ericsson_ipos.py b/netmiko/ericsson/ericsson_ipos.py index f641195a7..6e747391f 100644 --- a/netmiko/ericsson/ericsson_ipos.py +++ b/netmiko/ericsson/ericsson_ipos.py @@ -1,6 +1,7 @@ """ Ericsson Ipos looks like it was RedBack equipment. """ + from typing import Optional, Any, Union, Sequence, Iterator, TextIO import re import warnings diff --git a/netmiko/ericsson/ericsson_mltn.py b/netmiko/ericsson/ericsson_mltn.py index 1b6eb8f8c..e68ab5b6b 100644 --- a/netmiko/ericsson/ericsson_mltn.py +++ b/netmiko/ericsson/ericsson_mltn.py @@ -1,4 +1,5 @@ """Ericsson MiniLink driver.""" + import time import re from os import path diff --git a/netmiko/extreme/extreme_ers_ssh.py b/netmiko/extreme/extreme_ers_ssh.py index 514295631..9fe850746 100644 --- a/netmiko/extreme/extreme_ers_ssh.py +++ b/netmiko/extreme/extreme_ers_ssh.py @@ -1,4 +1,5 @@ """Netmiko support for Extreme Ethernet Routing Switch.""" + import re from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko.exceptions import NetmikoAuthenticationException diff --git a/netmiko/extreme/extreme_exos.py b/netmiko/extreme/extreme_exos.py index 064e9b726..f37d3df7b 100644 --- a/netmiko/extreme/extreme_exos.py +++ b/netmiko/extreme/extreme_exos.py @@ -1,4 +1,5 @@ """Extreme support.""" + import os from typing import Any, Callable, Optional, Union, List, Dict import re diff --git a/netmiko/extreme/extreme_nos_ssh.py b/netmiko/extreme/extreme_nos_ssh.py index bf9e8904f..4361a0202 100644 --- a/netmiko/extreme/extreme_nos_ssh.py +++ b/netmiko/extreme/extreme_nos_ssh.py @@ -1,4 +1,5 @@ """Support for Extreme NOS/VDX.""" + import time from netmiko.no_enable import NoEnable from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/extreme/extreme_slx_ssh.py b/netmiko/extreme/extreme_slx_ssh.py index 75a3f478a..6df516ef5 100644 --- a/netmiko/extreme/extreme_slx_ssh.py +++ b/netmiko/extreme/extreme_slx_ssh.py @@ -1,4 +1,5 @@ """Support for Extreme SLX.""" + import time from netmiko.no_enable import NoEnable from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/extreme/extreme_tierraos_ssh.py b/netmiko/extreme/extreme_tierraos_ssh.py index a436e8e6c..afa325945 100644 --- a/netmiko/extreme/extreme_tierraos_ssh.py +++ b/netmiko/extreme/extreme_tierraos_ssh.py @@ -1,4 +1,5 @@ """Support for Extreme TierraOS.""" + import time from netmiko.no_enable import NoEnable from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/extreme/extreme_vsp_ssh.py b/netmiko/extreme/extreme_vsp_ssh.py index 8e01a867f..654240071 100644 --- a/netmiko/extreme/extreme_vsp_ssh.py +++ b/netmiko/extreme/extreme_vsp_ssh.py @@ -1,4 +1,5 @@ """Extreme Virtual Services Platform Support.""" + from netmiko.cisco_base_connection import CiscoSSHConnection diff --git a/netmiko/fiberstore/fiberstore_fsos.py b/netmiko/fiberstore/fiberstore_fsos.py index c5d2c206b..2b3038f76 100644 --- a/netmiko/fiberstore/fiberstore_fsos.py +++ b/netmiko/fiberstore/fiberstore_fsos.py @@ -1,4 +1,5 @@ """Fiberstore FSOS Driver.""" + from typing import Optional from paramiko import SSHClient from netmiko.ssh_auth import SSHClient_noauth diff --git a/netmiko/mellanox/mellanox_mlnxos_ssh.py b/netmiko/mellanox/mellanox_mlnxos_ssh.py index b6e2fb3f1..75bb38543 100644 --- a/netmiko/mellanox/mellanox_mlnxos_ssh.py +++ b/netmiko/mellanox/mellanox_mlnxos_ssh.py @@ -1,4 +1,5 @@ """Mellanox MLNX-OS Switch support.""" + import re from typing import Optional diff --git a/netmiko/mrv/mrv_lx.py b/netmiko/mrv/mrv_lx.py index 507a0a2f9..9441032f1 100644 --- a/netmiko/mrv/mrv_lx.py +++ b/netmiko/mrv/mrv_lx.py @@ -1,4 +1,5 @@ """MRV Communications Driver (LX).""" + import time import re from typing import Optional diff --git a/netmiko/mrv/mrv_ssh.py b/netmiko/mrv/mrv_ssh.py index 7c23d8108..b05b7d0a4 100644 --- a/netmiko/mrv/mrv_ssh.py +++ b/netmiko/mrv/mrv_ssh.py @@ -1,4 +1,5 @@ """MRV Communications Driver (OptiSwitch).""" + import time import re from typing import Optional diff --git a/netmiko/netgear/netgear_prosafe_ssh.py b/netmiko/netgear/netgear_prosafe_ssh.py index 437a0648b..9fe395fcf 100644 --- a/netmiko/netgear/netgear_prosafe_ssh.py +++ b/netmiko/netgear/netgear_prosafe_ssh.py @@ -1,4 +1,5 @@ """ProSafe OS support""" + import time from typing import Any diff --git a/netmiko/oneaccess/oneaccess_oneos.py b/netmiko/oneaccess/oneaccess_oneos.py index c6acc6b6c..29f6194f5 100644 --- a/netmiko/oneaccess/oneaccess_oneos.py +++ b/netmiko/oneaccess/oneaccess_oneos.py @@ -1,4 +1,5 @@ """Netmiko driver for OneAccess ONEOS""" + from typing import Any from netmiko.cisco_base_connection import CiscoBaseConnection diff --git a/netmiko/ruijie/ruijie_os.py b/netmiko/ruijie/ruijie_os.py index f3a070da4..18c4cf958 100644 --- a/netmiko/ruijie/ruijie_os.py +++ b/netmiko/ruijie/ruijie_os.py @@ -1,4 +1,5 @@ """Ruijie RGOS Support""" + import time from typing import Any diff --git a/netmiko/scp_functions.py b/netmiko/scp_functions.py index 72aa76813..20c5737ff 100644 --- a/netmiko/scp_functions.py +++ b/netmiko/scp_functions.py @@ -5,6 +5,7 @@ SCP requires a separate SSH connection for a control channel. """ + from typing import AnyStr, Optional, Callable, Any, Dict from typing import TYPE_CHECKING from netmiko.scp_handler import BaseFileTransfer diff --git a/netmiko/scp_handler.py b/netmiko/scp_handler.py index cd85ebb14..6e8564d63 100644 --- a/netmiko/scp_handler.py +++ b/netmiko/scp_handler.py @@ -5,6 +5,7 @@ SCP requires a separate SSH connection for a control channel. """ + from typing import Callable, Optional, Any, Type from typing import TYPE_CHECKING from types import TracebackType diff --git a/netmiko/snmp_autodetect.py b/netmiko/snmp_autodetect.py index da4c8c970..bbf775c00 100644 --- a/netmiko/snmp_autodetect.py +++ b/netmiko/snmp_autodetect.py @@ -20,6 +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, List from typing.re import Pattern import re diff --git a/netmiko/sophos/sophos_sfos_ssh.py b/netmiko/sophos/sophos_sfos_ssh.py index c1295c0bd..3d44a7069 100644 --- a/netmiko/sophos/sophos_sfos_ssh.py +++ b/netmiko/sophos/sophos_sfos_ssh.py @@ -1,4 +1,5 @@ """SophosXG (SFOS) Firewall support""" + from typing import Any import time import os diff --git a/netmiko/ssh_autodetect.py b/netmiko/ssh_autodetect.py index 1722688d4..15d48c8d9 100644 --- a/netmiko/ssh_autodetect.py +++ b/netmiko/ssh_autodetect.py @@ -38,6 +38,7 @@ >>> remote_device['device_type'] = best_match >>> connection = ConnectHandler(**remote_device) """ + from typing import Any, List, Optional, Union, Dict import re import time diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index 796f8e8c4..bbec65b54 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -1,4 +1,5 @@ """Controls selection of proper class based on the device type.""" + from typing import Any, Type, Optional from typing import TYPE_CHECKING import re diff --git a/netmiko/terminal_server/terminal_server.py b/netmiko/terminal_server/terminal_server.py index b8335b045..f98e18305 100644 --- a/netmiko/terminal_server/terminal_server.py +++ b/netmiko/terminal_server/terminal_server.py @@ -1,4 +1,5 @@ """Generic Terminal Server driver.""" + from typing import Any from netmiko.base_connection import BaseConnection diff --git a/netmiko/utilities.py b/netmiko/utilities.py index d6cfecd82..2bc60cfe8 100644 --- a/netmiko/utilities.py +++ b/netmiko/utilities.py @@ -1,4 +1,5 @@ """Miscellaneous utility functions.""" + from typing import ( Any, AnyStr,