clean up unused Python imports (#454)

* Remove unused python imports

These changes have been auto-generated with:

	pip3 install isort autoflake
	isort -rc -sl .
	autoflake --remove-all-unused-imports -i -r .
	isort -rc -m 3 .

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>

* python: remove redundant parenthesis

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov
2022-02-24 16:31:53 +00:00
committed by GitHub
parent 50f397b249
commit d84179e42f
36 changed files with 176 additions and 170 deletions

View File

@@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .switch import SwitchConnection
from p4.tmp import p4config_pb2
from .switch import SwitchConnection
def buildDeviceConfig(bmv2_json_file_path=None):
"Builds the device config for BMv2"

View File

@@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import math
import re
import socket
import math
'''
This package contains several helper functions for encoding to and decoding from byte strings:
- integers

View File

@@ -15,10 +15,10 @@
import sys
from google.rpc import status_pb2, code_pb2
import grpc
from google.rpc import code_pb2, status_pb2
from p4.v1 import p4runtime_pb2
from p4.v1 import p4runtime_pb2_grpc
# Used to indicate that the gRPC error Status object returned by the server has
# an incorrect format.

View File

@@ -15,11 +15,12 @@
import re
import google.protobuf.text_format
from p4.v1 import p4runtime_pb2
from p4.config.v1 import p4info_pb2
from p4.v1 import p4runtime_pb2
from .convert import encode
class P4InfoHelper(object):
def __init__(self, p4_info_filepath):
p4info = p4info_pb2.P4Info()

View File

@@ -19,11 +19,10 @@ import json
import os
import sys
from . import bmv2
from . import helper
from p4.config.v1 import p4info_pb2
from . import bmv2, helper
def error(msg):
print(' - ERROR! ' + msg, file=sys.stderr)

View File

@@ -12,14 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from queue import Queue
from abc import abstractmethod
from datetime import datetime
from queue import Queue
import grpc
from p4.v1 import p4runtime_pb2
from p4.v1 import p4runtime_pb2_grpc
from p4.tmp import p4config_pb2
from p4.v1 import p4runtime_pb2, p4runtime_pb2_grpc
MSG_LOG_MAX_LEN = 1024