Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused imports #3051

Merged
merged 1 commit into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@
import gevent
import pytz
import os
import json
from pytest import approx
from datetime import datetime, timedelta
from dateutil import parser

from volttron.platform import get_services_core, jsonapi
from volttron.platform import jsonapi
from volttron.platform.agent.utils import format_timestamp, parse_timestamp_string, get_aware_utc_now
from volttron.platform.messaging import headers as headers_mod

Expand Down
1 change: 0 additions & 1 deletion services/contrib/KafkaAgent/Test/kafka_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


from kafka import KafkaProducer
from kafka.errors import KafkaError

from volttron.platform import jsonapi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

from volttron.platform.agent import utils
from volttron.platform import jsonapi
from volttron.platform.control import ControlConnection, KnownHostsStore, KeyStore
from volttron.platform.control import KnownHostsStore, KeyStore
from volttron.platform.vip.agent import Agent, RPC, Core
from volttron.platform.vip.router import ERROR, UNROUTABLE, INCOMING, OUTGOING

Expand Down
3 changes: 1 addition & 2 deletions services/core/VolttronCentral/volttroncentral/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
from volttron.platform.agent.known_identities import VOLTTRON_CENTRAL_PLATFORM
from volttron.platform.agent.utils import format_timestamp, get_aware_utc_now, \
get_utc_seconds_from_epoch
from volttron.platform.jsonrpc import INVALID_PARAMS, UNAVAILABLE_PLATFORM, \
INTERNAL_ERROR, RemoteError
from volttron.platform.jsonrpc import INVALID_PARAMS, INTERNAL_ERROR, RemoteError
from volttron.platform.messaging.health import Status, UNKNOWN_STATUS, \
GOOD_STATUS, BAD_STATUS
from volttron.platform.vip.agent.utils import build_connection
Expand Down
2 changes: 0 additions & 2 deletions services/core/VolttronCentralPlatform/vcplatform/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

import base64
import datetime
import hashlib
import logging
import os
import re
Expand Down Expand Up @@ -69,7 +68,6 @@
from volttron.platform.agent.utils import (get_aware_utc_now)
from volttron.platform.agent.utils import (get_utc_seconds_from_epoch,
format_timestamp, normalize_identity)
from volttron.platform.auth.auth_entry import AuthEntry
from volttron.platform.auth.auth_file import AuthFile
from volttron.platform.jsonrpc import (INTERNAL_ERROR, INVALID_PARAMS)
from volttron.platform.messaging import topics
Expand Down
1 change: 0 additions & 1 deletion volttron/platform/auth/auth_protocols/auth_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
# under Contract DE-AC05-76RL01830
# }}}

import os
import volttron.platform
from volttron.platform import jsonapi

Expand Down
10 changes: 2 additions & 8 deletions volttron/platform/auth/auth_protocols/auth_rmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
import ssl
import re
import logging
import grequests
from collections import defaultdict
from urllib.parse import urlparse, urlsplit
from dataclasses import dataclass
from volttron.platform.auth import certs
from volttron.platform.auth.auth_protocols import *
from volttron.platform.parameters import Parameters
from volttron.utils.rmq_config_params import RMQConfig
from volttron.utils.rmq_mgmt import RabbitMQMgmt
from volttron.platform import jsonapi
from volttron.platform.agent.utils import get_fq_identity, get_platform_instance_name
from volttron.platform.messaging.health import STATUS_BAD
from volttron.platform import get_home
from volttron.platform.agent.utils import get_fq_identity

from volttron.platform import is_rabbitmq_available

Expand Down Expand Up @@ -119,9 +115,7 @@ def build_remote_connection_param(self, cert_dir=None, retry_attempt=30, retry_d
:param retry_attempt: pika connection parameter - number of connection retry attempts
:return: instance of pika.ConnectionParameters
"""
from urllib import parse

parsed_addr = parse.urlparse(self.params.url_address)
parsed_addr = urlparse(self.params.url_address)
_, virtual_host = parsed_addr.path.split('/')

try:
Expand Down
3 changes: 1 addition & 2 deletions volttron/platform/auth/certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import six
import time
from shutil import copyfile
from socket import gethostname, getfqdn, getaddrinfo, AI_CANONNAME
from socket import gethostname, getfqdn, AI_CANONNAME
import subprocess

from cryptography import x509
Expand All @@ -58,7 +58,6 @@
from volttron.platform import jsonapi
from volttron.platform import get_home
from volttron.platform.agent.utils import (get_platform_instance_name,
get_fq_identity,
execute_command)

_log = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion volttron/platform/vip/agent/subsystems/hello.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import weakref

from .base import SubsystemBase
from ..errors import VIPError
from ..results import ResultsDictionary
from zmq import ZMQError
from zmq.green import ENOTSOCK
Expand Down