diff --git a/services/core/DNP3OutstationAgent/demo-scripts/rpc_example.py b/services/core/DNP3OutstationAgent/demo-scripts/rpc_example.py index 471f19b3ba..6ece1cd166 100644 --- a/services/core/DNP3OutstationAgent/demo-scripts/rpc_example.py +++ b/services/core/DNP3OutstationAgent/demo-scripts/rpc_example.py @@ -7,7 +7,6 @@ - platform-driver is up and running """ -import random from volttron.platform.vip.agent.utils import build_agent from time import sleep import datetime diff --git a/services/core/DNP3OutstationAgent/dnp3_outstation_agent/agent.py b/services/core/DNP3OutstationAgent/dnp3_outstation_agent/agent.py index 02f2520f51..9afb392e23 100644 --- a/services/core/DNP3OutstationAgent/dnp3_outstation_agent/agent.py +++ b/services/core/DNP3OutstationAgent/dnp3_outstation_agent/agent.py @@ -12,7 +12,7 @@ # from dnp3_python.dnp3station.outstation import MyOutStation as MyOutStationNew from dnp3_python.dnp3station.outstation_new import MyOutStationNew from pydnp3 import opendnp3 -from typing import Callable, Dict +from typing import Dict diff --git a/services/core/DNP3OutstationAgent/tests/test_dnp3_agent.py b/services/core/DNP3OutstationAgent/tests/test_dnp3_agent.py index 74bd58a034..f7b4fa266b 100644 --- a/services/core/DNP3OutstationAgent/tests/test_dnp3_agent.py +++ b/services/core/DNP3OutstationAgent/tests/test_dnp3_agent.py @@ -12,20 +12,12 @@ import gevent import pytest import os -# from volttron.client.vip.agent import build_agent -from volttron.platform.vip.agent.utils import build_agent -from time import sleep import datetime # from dnp3_outstation.agent import Dnp3OutstationAgent from services.core.DNP3OutstationAgent.dnp3_outstation_agent.agent import Dnp3Agent as Dnp3OutstationAgent from dnp3_python.dnp3station.outstation_new import MyOutStationNew import random import subprocess -# from volttron.utils import is_volttron_running -import json -# from utils.testing_utils import * -from volttrontesting.fixtures.volttron_platform_fixtures import volttron_instance - import logging logging_logger = logging.getLogger(__name__) diff --git a/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/dnp3.py b/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/dnp3.py index 8f71f67956..c64fd775ee 100644 --- a/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/dnp3.py +++ b/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/dnp3.py @@ -6,13 +6,10 @@ # TODO-developer: Your code here # Add dependency as needed, and update in requirements -import json import logging -import random import sys -from datetime import datetime stdout_stream = logging.StreamHandler(sys.stdout) stdout_stream.setFormatter(logging.Formatter('%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s')) diff --git a/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/driver_wrapper.py b/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/driver_wrapper.py index 0284043fa8..26d490cfb3 100644 --- a/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/driver_wrapper.py +++ b/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/driver_wrapper.py @@ -36,10 +36,6 @@ # under Contract DE-AC05-76RL01830 # }}} import abc -import random -import datetime -import math -from math import pi from platform_driver.interfaces import BaseInterface, BaseRegister, BasicRevert # from ...platform_driver.interfaces import BaseInterface, BaseRegister, BasicRevert diff --git a/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/tests/test_dnp3_driver_integration_volttron.py b/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/tests/test_dnp3_driver_integration_volttron.py index 67dbd2b4ae..9a33d384c4 100644 --- a/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/tests/test_dnp3_driver_integration_volttron.py +++ b/services/core/PlatformDriverAgent/platform_driver/interfaces/dnp3/tests/test_dnp3_driver_integration_volttron.py @@ -13,7 +13,6 @@ from dnp3_python.dnp3station.outstation_new import MyOutStationNew from pathlib import Path -import sys import os TEST_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/volttron/platform/auth/auth_protocols/auth_zmq.py b/volttron/platform/auth/auth_protocols/auth_zmq.py index 0b5ec356ba..927b1cef93 100644 --- a/volttron/platform/auth/auth_protocols/auth_zmq.py +++ b/volttron/platform/auth/auth_protocols/auth_zmq.py @@ -42,7 +42,7 @@ import random import uuid import bisect -from urllib.parse import urlsplit, parse_qs, urlunsplit, urlparse +from urllib.parse import urlsplit, parse_qs, urlunsplit import gevent import gevent.time from zmq import green as zmq @@ -56,10 +56,7 @@ from volttron.platform.keystore import KeyStore, KnownHostsStore from volttron.platform.parameters import Parameters from volttron.platform.vip.socket import encode_key -from volttron.platform.agent.utils import ( - get_platform_instance_name, - get_fq_identity, -) + _log = logging.getLogger(__name__) diff --git a/volttron/platform/auth/certs.py b/volttron/platform/auth/certs.py index 3fceb484f9..adc10a4984 100644 --- a/volttron/platform/auth/certs.py +++ b/volttron/platform/auth/certs.py @@ -43,7 +43,7 @@ import six import time from shutil import copyfile -from socket import gethostname, getfqdn, AI_CANONNAME +from socket import gethostname, getfqdn import subprocess from cryptography import x509