misc: Run pre-commit run --all-files
This is reflect the updates made to black when running `pre-commit autoupdate`. Change-Id: Ifb7fea117f354c7f02f26926a5afdf7d67bc5919
This commit is contained in:
@@ -1252,7 +1252,7 @@ class SimObject(object, metaclass=MetaSimObject):
|
||||
# The order of the dict is implementation dependent, so sort
|
||||
# it based on the key (name) to ensure the order is the same
|
||||
# on all hosts
|
||||
for (name, child) in sorted(self._children.items()):
|
||||
for name, child in sorted(self._children.items()):
|
||||
for obj in child.descendants():
|
||||
yield obj
|
||||
|
||||
@@ -1275,7 +1275,7 @@ class SimObject(object, metaclass=MetaSimObject):
|
||||
def connectPorts(self):
|
||||
# Sort the ports based on their attribute name to ensure the
|
||||
# order is the same on all hosts
|
||||
for (attr, portRef) in sorted(self._port_refs.items()):
|
||||
for attr, portRef in sorted(self._port_refs.items()):
|
||||
portRef.ccConnect()
|
||||
|
||||
# Default function for generating the device structure.
|
||||
|
||||
@@ -453,6 +453,7 @@ VectorParam = ParamFactory(VectorParamDesc)
|
||||
#
|
||||
#####################################################################
|
||||
|
||||
|
||||
# String-valued parameter. Just mixin the ParamValue class with the
|
||||
# built-in str class.
|
||||
class String(ParamValue, str):
|
||||
@@ -1524,10 +1525,11 @@ class Time(ParamValue):
|
||||
# derive the new type from the appropriate base class on the fly.
|
||||
|
||||
allEnums = {}
|
||||
|
||||
|
||||
# Metaclass for Enum types
|
||||
class MetaEnum(MetaParamValue):
|
||||
def __new__(mcls, name, bases, dict):
|
||||
|
||||
cls = super().__new__(mcls, name, bases, dict)
|
||||
allEnums[name] = cls
|
||||
return cls
|
||||
@@ -1963,6 +1965,7 @@ class MemoryBandwidth(float, ParamValue):
|
||||
# "Constants"... handy aliases for various values.
|
||||
#
|
||||
|
||||
|
||||
# Special class for NULL pointers. Note the special check in
|
||||
# make_param_value() above that lets these be assigned where a
|
||||
# SimObject is required.
|
||||
@@ -2030,6 +2033,7 @@ AllMemory = AddrRange(0, MaxAddr)
|
||||
#
|
||||
#####################################################################
|
||||
|
||||
|
||||
# Port reference: encapsulates a reference to a particular port on a
|
||||
# particular SimObject.
|
||||
class PortRef(object):
|
||||
@@ -2371,6 +2375,7 @@ SlavePort = ResponsePort
|
||||
VectorMasterPort = VectorRequestPort
|
||||
VectorSlavePort = VectorResponsePort
|
||||
|
||||
|
||||
# 'Fake' ParamDesc for Port references to assign to the _pdesc slot of
|
||||
# proxy objects (via set_param_desc()) so that proxy error messages
|
||||
# make sense.
|
||||
|
||||
@@ -65,6 +65,7 @@ _drain_manager = _m5.drain.DrainManager.instance()
|
||||
|
||||
_instantiated = False # Has m5.instantiate() been called?
|
||||
|
||||
|
||||
# The final call to instantiate the SimObject graph and initialize the
|
||||
# system.
|
||||
def instantiate(ckpt_dir=None):
|
||||
|
||||
@@ -29,6 +29,7 @@ import decimal
|
||||
import sys
|
||||
from m5.util import warn
|
||||
|
||||
|
||||
# fix the global frequency
|
||||
def fixGlobalFrequency():
|
||||
import _m5.core
|
||||
|
||||
@@ -48,6 +48,7 @@ from . import convert
|
||||
from .attrdict import attrdict, multiattrdict, optiondict
|
||||
from .multidict import multidict
|
||||
|
||||
|
||||
# panic() should be called when something happens that should never
|
||||
# ever happen regardless of what the user does (i.e., an acutal m5
|
||||
# bug).
|
||||
|
||||
@@ -45,7 +45,6 @@ class TerminalFormatter:
|
||||
return w, h
|
||||
|
||||
def __get_paragraphs(self, text, flatten=False):
|
||||
|
||||
"""
|
||||
This function takes a text and returns a list of constituent
|
||||
paragraphs, defining a paragraph as a block of text separated from
|
||||
|
||||
Reference in New Issue
Block a user