mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
refactor: remove unused imports
This commit is contained in:
75 files changed
+21
-101
No files matched your search
@@ -31,7 +31,6 @@ Supports loading injection skills and device/feature skills.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ from gns3server.agent.gns3_copilot.gns3_client import get_gns3_server_host
|
||||
# Import custom Netmiko device types for GNS3 emulation
|
||||
# This registers gns3_huawei_telnet_ce and other custom device types
|
||||
# NOTE: Must be imported BEFORE any Nornir operations to ensure device types are registered
|
||||
from gns3server.agent.gns3_copilot.utils import custom_netmiko, get_device_ports_from_topology
|
||||
from gns3server.agent.gns3_copilot.utils import get_device_ports_from_topology
|
||||
from gns3server.agent.gns3_copilot.utils.command_filter import (
|
||||
filter_forbidden_commands,
|
||||
)
|
||||
|
||||
@@ -51,7 +51,7 @@ from gns3server.agent.gns3_copilot.gns3_client import get_gns3_server_host
|
||||
# Import custom Netmiko device types for GNS3 emulation
|
||||
# This registers gns3_huawei_telnet_ce and other custom device types
|
||||
# NOTE: Must be imported BEFORE any Nornir operations to ensure device types are registered
|
||||
from gns3server.agent.gns3_copilot.utils import custom_netmiko, get_device_ports_from_topology
|
||||
from gns3server.agent.gns3_copilot.utils import get_device_ports_from_topology
|
||||
from gns3server.agent.gns3_copilot.utils.command_filter import (
|
||||
filter_forbidden_commands,
|
||||
)
|
||||
|
||||
@@ -51,7 +51,7 @@ from gns3server.agent.gns3_copilot.gns3_client import get_gns3_server_host
|
||||
# Import custom Netmiko device types for GNS3 emulation
|
||||
# This registers gns3_vpcs_telnet and other custom device types
|
||||
# NOTE: Must be imported BEFORE any Nornir operations to ensure device types are registered
|
||||
from gns3server.agent.gns3_copilot.utils import custom_netmiko, get_device_ports_from_topology
|
||||
from gns3server.agent.gns3_copilot.utils import get_device_ports_from_topology
|
||||
|
||||
# Explicitly register VPCS device type to ensure it is available
|
||||
try:
|
||||
@@ -585,7 +585,6 @@ class VPCSCommands(BaseTool):
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Example usage
|
||||
import sys
|
||||
|
||||
command_groups = json.dumps(
|
||||
{
|
||||
|
||||
@@ -426,7 +426,6 @@ IP/MASK : 192.168.1.20/24"""
|
||||
|
||||
def test_send_command_calls_strip_ansi(self):
|
||||
"""Test that send_command calls _strip_ansi_codes."""
|
||||
from unittest.mock import patch
|
||||
|
||||
instance = self.VPCSTelnet.__new__(self.VPCSTelnet)
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
from gns3server.utils.uuid_validator import validate_uuid
|
||||
|
||||
|
||||
Reference in new issue
Block a user