misc: Run pre-commit run --all-files

This ensures `isort` is applied to all files in the repo.

Change-Id: Ib7ced1c924ef1639542bf0d1a01c5737f6ba43e9
This commit is contained in:
Bobby R. Bruce
2023-11-29 22:06:41 -08:00
parent 7d67109ca2
commit d11c40dcac
681 changed files with 3729 additions and 2487 deletions

View File

@@ -64,9 +64,11 @@
#
import os, sys, re
import subprocess
import argparse
import os
import re
import subprocess
import sys
parser = argparse.ArgumentParser()

View File

@@ -26,10 +26,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from configparser import ConfigParser
import gzip
import sys, re, os
import os
import re
import sys
from configparser import ConfigParser
class myCP(ConfigParser):

View File

@@ -70,8 +70,11 @@
import configparser
import glob, types, sys, os
import glob
import os
import os.path as osp
import sys
import types
verbose_print = False
@@ -277,7 +280,10 @@ def process_file(path, **kwargs):
if __name__ == "__main__":
from argparse import ArgumentParser, SUPPRESS
from argparse import (
SUPPRESS,
ArgumentParser,
)
parser = ArgumentParser(usage="%(prog)s [args] <filename or directory>")
parser.add_argument(

View File

@@ -86,9 +86,10 @@
# 8,35670,1,STORE,1748748,4,74,0:,6,3:,7
# 9,35670,1,COMP,500::,7
import protolib
import sys
import protolib
# Import the packet proto definitions. If they are not found, attempt
# to generate them automatically. This assumes that the script is
# executed from the gem5 root.

View File

@@ -42,9 +42,10 @@
# protoc --python_out=. inst.proto
# The ASCII trace format uses one line per request.
import protolib
import sys
import protolib
# Import the packet proto definitions
try:
import inst_pb2

View File

@@ -39,10 +39,11 @@
# format.
import os
import protolib
import subprocess
import sys
import protolib
util_dir = os.path.dirname(os.path.realpath(__file__))
# Make sure the proto definitions are up to date.
subprocess.check_call(["make", "--quiet", "-C", util_dir, "packet_pb2.py"])

View File

@@ -86,9 +86,10 @@
# 8,35670,1,STORE,1748748,4,74,0:,6,3:,7
# 9,35670,1,COMP,500::,7
import protolib
import sys
import protolib
# Import the packet proto definitions. If they are not found, attempt
# to generate them automatically. This assumes that the script is
# executed from the gem5 root.

View File

@@ -51,9 +51,10 @@
# This script can of course also be used as a template to convert
# other trace formats into the gem5 protobuf format
import protolib
import sys
import protolib
# Import the packet proto definitions. If they are not found, attempt
# to generate them automatically. This assumes that the script is
# executed from the gem5 root.

View File

@@ -4,7 +4,10 @@ import os
import re
import sys
from file_types import lang_type, find_files
from file_types import (
find_files,
lang_type,
)
mode_line = re.compile(r"(-\*- *mode:.* *-\*-)")
shell_comment = re.compile(r"^\s*#")

View File

@@ -24,8 +24,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from abc import ABC, abstractmethod
from typing import Dict, List
from abc import (
ABC,
abstractmethod,
)
from typing import (
Dict,
List,
)
class Client(ABC):

View File

@@ -24,10 +24,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import json
import requests
import base64
import json
import os
import requests
from jsonschema import validate

View File

@@ -24,10 +24,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from pathlib import Path
import json
from pathlib import Path
from typing import (
Dict,
List,
)
from api.client import Client
from typing import Dict, List
class JSONClient(Client):

View File

@@ -25,12 +25,19 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import json
from bson import json_util
from api.client import Client
from pymongo.errors import ConnectionFailure, ConfigurationError
from pymongo import MongoClient
from typing import Dict, List
from typing import (
Dict,
List,
)
import pymongo
from api.client import Client
from bson import json_util
from pymongo import MongoClient
from pymongo.errors import (
ConfigurationError,
ConnectionFailure,
)
class DatabaseConnectionError(Exception):

View File

@@ -25,17 +25,18 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import json
from pymongo import MongoClient
from api.create_resources_json import ResourceJsonCreator
import os
from dotenv import load_dotenv
import argparse
import json
import os
from itertools import cycle
from shutil import get_terminal_size
from threading import Thread
from time import sleep
from api.create_resources_json import ResourceJsonCreator
from dotenv import load_dotenv
from pymongo import MongoClient
load_dotenv()
# read MONGO_URI from environment variable

View File

@@ -24,28 +24,32 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from flask import (
render_template,
Flask,
request,
redirect,
url_for,
make_response,
)
from bson import json_util
import json
import jsonschema
import requests
import markdown
import base64
import json
import secrets
from pathlib import Path
from werkzeug.utils import secure_filename
from cryptography.fernet import Fernet, InvalidToken
from cryptography.hazmat.primitives.kdf.scrypt import Scrypt
from cryptography.exceptions import InvalidSignature
import jsonschema
import markdown
import requests
from api.json_client import JSONClient
from api.mongo_client import MongoDBClient
from bson import json_util
from cryptography.exceptions import InvalidSignature
from cryptography.fernet import (
Fernet,
InvalidToken,
)
from cryptography.hazmat.primitives.kdf.scrypt import Scrypt
from flask import (
Flask,
make_response,
redirect,
render_template,
request,
url_for,
)
from werkzeug.utils import secure_filename
databases = {}

View File

@@ -24,17 +24,18 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import flask
import contextlib
import unittest
from server import app
import server
import json
from bson import json_util
import unittest
from unittest.mock import patch
import flask
import mongomock
from api.mongo_client import MongoDBClient
import requests
import server
from api.mongo_client import MongoDBClient
from bson import json_util
from server import app
@contextlib.contextmanager

View File

@@ -24,14 +24,15 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
from server import app
import json
from bson import json_util
import copy
import mongomock
import json
import unittest
from unittest.mock import patch
import mongomock
from api.mongo_client import MongoDBClient
from bson import json_util
from server import app
class TestComprehensive(unittest.TestCase):

View File

@@ -24,14 +24,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
from api.json_client import JSONClient
from server import app
import json
from bson import json_util
from unittest.mock import patch
import unittest
from pathlib import Path
from unittest.mock import patch
from api.json_client import JSONClient
from bson import json_util
from server import app
def get_json():

View File

@@ -24,13 +24,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
from server import app, databases
import json
from bson import json_util
import mongomock
import unittest
from unittest.mock import patch
import mongomock
from api.mongo_client import MongoDBClient
from bson import json_util
from server import (
app,
databases,
)
class TestApi(unittest.TestCase):

View File

@@ -24,7 +24,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from mypy.stubgen import generate_stubs, parse_options
from mypy.stubgen import (
generate_stubs,
parse_options,
)
"""
This allows us to generate stubs for the modules in gem5. The output will be

View File

@@ -26,14 +26,14 @@
"""This is the gem5 artifact package"""
from ._artifactdb import getDBConnection
from .artifact import Artifact
from .common_queries import (
getByName,
getDiskImages,
getLinuxBinaries,
getgem5Binaries,
getLinuxBinaries,
)
from ._artifactdb import getDBConnection
__all__ = [
"Artifact",

View File

@@ -34,14 +34,24 @@ artifacts stored in the database.
Some common queries can be found in common_queries.py
"""
from abc import ABC, abstractmethod
import copy
import json
import os
from pathlib import Path
import shutil
from typing import Any, Dict, Iterable, Union, Type, List, Tuple
from abc import (
ABC,
abstractmethod,
)
from pathlib import Path
from typing import (
Any,
Dict,
Iterable,
List,
Tuple,
Type,
Union,
)
from urllib.parse import urlparse
from uuid import UUID

View File

@@ -28,14 +28,22 @@
"""
import hashlib
from inspect import cleandoc
import json
from pathlib import Path
import subprocess
import time
from typing import Any, Dict, List, Union, Optional
from uuid import UUID, uuid4
import json
from inspect import cleandoc
from pathlib import Path
from typing import (
Any,
Dict,
List,
Optional,
Union,
)
from uuid import (
UUID,
uuid4,
)
from ._artifactdb import getDBConnection

View File

@@ -28,8 +28,11 @@
from os.path import join
from pathlib import Path
from setuptools import setup, find_namespace_packages
from setuptools import (
find_namespace_packages,
setup,
)
with open(Path(__file__).parent / "README.md", encoding="utf-8") as f:
long_description = f.read()

View File

@@ -27,14 +27,20 @@
"""Tests for the Artifact object and associated functions"""
import hashlib
from pathlib import Path
import unittest
from uuid import uuid4, UUID
import sys
import io
import sys
import unittest
from pathlib import Path
from uuid import (
UUID,
uuid4,
)
from gem5art import artifact
from gem5art.artifact._artifactdb import ArtifactDB, getDBConnection
from gem5art.artifact._artifactdb import (
ArtifactDB,
getDBConnection,
)
class MockDB(ArtifactDB):

View File

@@ -29,8 +29,8 @@
import json
import os
from pathlib import Path
import unittest
from pathlib import Path
from uuid import UUID
from gem5art.artifact import Artifact

View File

@@ -35,7 +35,10 @@ from json import dump
import gem5art.artifact
from gem5art.artifact import getDBConnection
from gem5art.run import getRunsByNameLike, getRuns
from gem5art.run import (
getRuns,
getRunsByNameLike,
)
def parseArgs():

View File

@@ -35,13 +35,25 @@ experiment is reproducible and the output is saved to the database.
import hashlib
import json
import os
from pathlib import Path
import signal
import subprocess
import time
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
from uuid import UUID, uuid4
import zipfile
from pathlib import Path
from typing import (
Any,
Callable,
Dict,
Iterable,
List,
Optional,
Tuple,
Union,
)
from uuid import (
UUID,
uuid4,
)
from gem5art import artifact
from gem5art.artifact import Artifact

View File

@@ -28,8 +28,11 @@
from os.path import join
from pathlib import Path
from setuptools import setup, find_namespace_packages
from setuptools import (
find_namespace_packages,
setup,
)
with open(Path(__file__).parent / "README.md", encoding="utf-8") as f:
long_description = f.read()

View File

@@ -27,9 +27,9 @@
"""Tests for gem5Run object"""
import hashlib
from pathlib import Path
import os
import unittest
from pathlib import Path
from uuid import uuid4
from gem5art.artifact import artifact

View File

@@ -24,10 +24,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from .celery import gem5app
import multiprocessing as mp
import time
from .celery import gem5app
@gem5app.task(bind=True, serializer="pickle")
def run_gem5_instance(self, gem5_run, cwd="."):

View File

@@ -28,8 +28,11 @@
from os.path import join
from pathlib import Path
from setuptools import setup, find_namespace_packages
from setuptools import (
find_namespace_packages,
setup,
)
with open(Path(__file__).parent / "README.md", encoding="utf-8") as f:
long_description = f.read()

View File

@@ -42,13 +42,21 @@
# Script for managing a gem5 disk image.
#
from argparse import ArgumentParser
import os
from os import environ as env
import string
from subprocess import CalledProcessError, Popen, PIPE, STDOUT
from sys import exit, argv
import re
import string
from argparse import ArgumentParser
from os import environ as env
from subprocess import (
PIPE,
STDOUT,
CalledProcessError,
Popen,
)
from sys import (
argv,
exit,
)
# Some constants.
MaxLBACylinders = 16383

View File

@@ -38,14 +38,16 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from subprocess import call
from platform import machine
import os
import sys
from argparse import (
ArgumentDefaultsHelpFormatter,
ArgumentParser,
)
from distutils import spawn
from glob import glob
import sys
import os
from platform import machine
from subprocess import call
def run_cmd(explanation, working_dir, cmd, stdout=None):

View File

@@ -26,14 +26,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from gerrit import GerritResponseParser as Parser
from gerrit import GerritRestAPI
from util import add_maintainers_to_change, convert_time_in_seconds
import json
import sys
import time
import sys
from gerrit import GerritResponseParser as Parser
from gerrit import GerritRestAPI
from util import (
add_maintainers_to_change,
convert_time_in_seconds,
)
sys.path.append("..")
import maint.lib.maintainers

View File

@@ -26,10 +26,11 @@
import copy
import json
import requests
from types import SimpleNamespace
from urllib.parse import urljoin
import requests
class GerritResponseParser:
@staticmethod

View File

@@ -32,8 +32,8 @@
import os
import re
import sys
from maint.lib import maintainers
from maint.lib import maintainers
from style.repo import GitRepo

View File

@@ -36,16 +36,21 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from tempfile import TemporaryFile
import argparse
import os
import subprocess
import sys
from tempfile import TemporaryFile
from style.repo import GitRepo
from style.verifiers import all_verifiers, all_regions
from style.style import StdioUI, check_ignores
import argparse
from style.style import (
StdioUI,
check_ignores,
)
from style.verifiers import (
all_regions,
all_verifiers,
)
parser = argparse.ArgumentParser(description="gem5 git style checker hook")

View File

@@ -36,8 +36,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import subprocess
import re
import subprocess
from functools import wraps

View File

@@ -33,7 +33,10 @@
import subprocess
from collections import OrderedDict, defaultdict
from collections import (
OrderedDict,
defaultdict,
)
class OrderedDefaultDict(OrderedDict, defaultdict):

View File

@@ -26,7 +26,11 @@
import argparse
from pathlib import Path
from gem5.resources.md5_utils import md5_file, md5_dir
from gem5.resources.md5_utils import (
md5_dir,
md5_file,
)
parser = argparse.ArgumentParser(
description="A utility to determine the md5 hash of files and "

View File

@@ -38,18 +38,23 @@
# minorview.py: Minorview visuliser for MinorCPU model MinorTrace output
#
import gtk
import argparse
import os
import sys
import argparse
import gtk
# Find MinorView modules even if not called from minorview directory
minorviewDir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(minorviewDir)
from minorview.model import BlobModel
from minorview.view import BlobView, BlobController, BlobWindow
from minorview.point import Point
from minorview.view import (
BlobController,
BlobView,
BlobWindow,
)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Minor visualiser")

View File

@@ -41,17 +41,23 @@
import pygtk
pygtk.require("2.0")
import gtk
import gobject
import cairo
import re
import math
import re
import cairo
import gobject
import gtk
from . import (
colours,
model,
parse,
)
from .colours import (
backgroundColour,
black,
)
from .point import Point
from . import parse
from . import colours
from .colours import backgroundColour, black
from . import model
def centre_size_to_sides(centre, size):

View File

@@ -33,14 +33,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from . import parse
from . import colours
import os
import re
from time import time as wall_time
from . import (
blobs,
colours,
parse,
)
from .colours import unknownColour
from .point import Point
import re
from . import blobs
from time import time as wall_time
import os
id_parts = "TSPLFE"

View File

@@ -36,17 +36,25 @@
import pygtk
pygtk.require("2.0")
import gtk
import gobject
import cairo
import re
import cairo
import gobject
import gtk
from . import (
blobs,
colours,
model,
parse,
)
from .model import (
BlobDataSelect,
BlobModel,
Id,
special_state_chars,
)
from .point import Point
from . import parse
from . import colours
from . import model
from .model import Id, BlobModel, BlobDataSelect, special_state_chars
from . import blobs
class BlobView:

View File

@@ -38,9 +38,9 @@
# Pipeline activity viewer for the O3 CPU model.
import argparse
import copy
import os
import sys
import copy
# Temporary storage for instructions. The queue is filled in out-of-order
# until it reaches 'max_threshold' number of instructions. It is then

View File

@@ -41,9 +41,10 @@ build/ALL/gem5.opt util/obtain-resource.py <resource_id> [-p <path>] [-q]
"""
if __name__ == "__m5_main__":
from gem5.resources.resource import obtain_resource
import argparse
from gem5.resources.resource import obtain_resource
parser = argparse.ArgumentParser()
parser.add_argument(

View File

@@ -25,8 +25,11 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import string
import subprocess
import sys
from configparser import ConfigParser
import string, sys, subprocess, os
# Compile DSENT to generate the Python module and then import it.
# This script assumes it is executed from the gem5 root.

View File

@@ -28,9 +28,10 @@
# Parse sampled function profile output (quick hack).
import sys
import re
import getopt
import re
import sys
from categories import *

View File

@@ -36,11 +36,12 @@
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
import numpy as np
import os
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.font_manager import FontProperties
# global results dict
results = {}
idleResults = {}

View File

@@ -36,15 +36,15 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
try:
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
except ImportError:
print("Failed to import matplotlib and numpy")
exit(-1)
import sys
import re
import sys
# This script is intended to post process and plot the output from

View File

@@ -36,16 +36,16 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
try:
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
except ImportError:
print("Failed to import matplotlib and numpy")
exit(-1)
import sys
import re
import sys
# Determine the parameters of the sweep from the simout output, and

View File

@@ -35,11 +35,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import PlotPowerStates as plotter
import argparse
import os
from subprocess import call
import PlotPowerStates as plotter
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)

View File

@@ -27,7 +27,10 @@
if __name__ == "__main__":
import sys
from os.path import dirname, join
from os.path import (
dirname,
join,
)
base = dirname(__file__)
sys.path.insert(1, join(base, "../src/mem"))

View File

@@ -58,15 +58,16 @@
# APC project generation based on Gator v17 (DS-5 v5.17)
# Subsequent versions should be backward compatible
import re, sys, os
from configparser import ConfigParser
import gzip
import xml.etree.ElementTree as ET
import xml.dom.minidom as minidom
import shutil
import zlib
import argparse
import gzip
import os
import re
import shutil
import sys
import xml.dom.minidom as minidom
import xml.etree.ElementTree as ET
import zlib
from configparser import ConfigParser
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,

View File

@@ -38,12 +38,11 @@
import os
import sys
from style.file_types import lang_type
import style.verifiers
from style.region import all_regions
from style.style import StdioUI
from style import repo
from style.file_types import lang_type
from style.region import all_regions
from style.style import StdioUI
verifier_names = {c.__name__: c for c in style.verifiers.all_verifiers}

View File

@@ -35,9 +35,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from abc import *
import os
import subprocess
from abc import *
from .region import *
from .style import modified_regions

View File

@@ -39,10 +39,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from abc import ABCMeta, abstractmethod
import difflib
import re
import sys
from abc import (
ABCMeta,
abstractmethod,
)
from .region import *

View File

@@ -40,17 +40,22 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from abc import ABCMeta, abstractmethod
from difflib import SequenceMatcher
import inspect
import os
import re
import sys
from abc import (
ABCMeta,
abstractmethod,
)
from difflib import SequenceMatcher
from . import style
from . import sort_includes
from .region import *
from . import (
sort_includes,
style,
)
from .file_types import lang_type
from .region import *
def safefix(fix_func):

View File

@@ -23,13 +23,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from m5.params import *
from m5.SimObject import SimObject
from m5.params import *
from m5.proxy import *
from m5.objects.SystemC import SystemC_ScModule
from m5.objects.Tlm import TlmTargetSocket
from m5.params import *
from m5.proxy import *
from m5.SimObject import SimObject
# This class is a subclass of sc_module, and all the special magic which makes

View File

@@ -28,8 +28,8 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import m5
import m5
from m5.objects import *
# Create a config to be used by the traffic generator

View File

@@ -24,10 +24,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import argparse
import m5
import sys
from m5.objects import SystemC_Kernel, Root
import m5
from m5.objects import (
Root,
SystemC_Kernel,
)
# pylint:disable=unused-variable

View File

@@ -23,11 +23,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from m5.objects.SystemC import SystemC_ScModule
from m5.params import *
from m5.SimObject import SimObject
from m5.objects.SystemC import SystemC_ScModule
# This class is a subclass of sc_module, and all the special magic which makes
# that work is handled in the base classes.

View File

@@ -25,10 +25,15 @@
import argparse
import m5
import sys
from m5.objects import SystemC_Kernel, Root, SystemC_Printer, Gem5_Feeder
import m5
from m5.objects import (
Gem5_Feeder,
Root,
SystemC_Kernel,
SystemC_Printer,
)
# pylint:disable=unused-variable

View File

@@ -24,10 +24,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import argparse
import m5
import sys
from m5.objects import SystemC_Kernel, Root
import m5
from m5.objects import (
Root,
SystemC_Kernel,
)
# pylint:disable=unused-variable

View File

@@ -29,9 +29,11 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import m5
from m5.objects import *
from m5.util import addToPath, fatal
from m5.util import (
addToPath,
fatal,
)
addToPath("../../../configs/common/")

View File

@@ -29,11 +29,11 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import m5
from m5.objects import *
import os
# Base System Architecture:
# +-----+ ^
# | TLM | | TLM World

View File

@@ -29,9 +29,11 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import m5
from m5.objects import *
from m5.util import addToPath, fatal
from m5.util import (
addToPath,
fatal,
)
addToPath("../../../configs/common/")

View File

@@ -41,7 +41,6 @@ import subprocess
import sys
import git_filter_repo
import update_copyright
parser = argparse.ArgumentParser(