diff options
author | Brandon Potter <brandon.potter@amd.com> | 2017-05-15 15:13:19 -0500 |
---|---|---|
committer | Brandon Potter <Brandon.Potter@amd.com> | 2017-05-15 23:12:44 +0000 |
commit | f44ddb94a6f72fe1ef04739817ee2102cee36c0f (patch) | |
tree | d0748d3a1eb2bf00b5b3b05063a4c50af065af73 /src/python/m5/SimObject.py | |
parent | c8c406bc305a6bf52304d5f158f5d8def0dea51f (diff) | |
download | gem5-f44ddb94a6f72fe1ef04739817ee2102cee36c0f.tar.xz |
style: fix line lengths and include ordering
The style checker complains about line length and ordering for these
files. This fix should make these two files kosher.
Change-Id: I822a0518a98d9e379a543d2017e90c4e9666a58d
Reviewed-on: https://gem5-review.googlesource.com/3380
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/python/m5/SimObject.py')
-rw-r--r-- | src/python/m5/SimObject.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index b5ad977d5..d60d7cec1 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -477,7 +477,8 @@ class MetaSimObject(type): if isinstance(c, MetaSimObject): bTotal += 1 if bTotal > 1: - raise TypeError, "SimObjects do not support multiple inheritance" + raise TypeError, \ + "SimObjects do not support multiple inheritance" base = bases[0] @@ -679,9 +680,10 @@ class MetaSimObject(type): code('''#include "pybind11/pybind11.h" #include "pybind11/stl.h" -#include "sim/sim_object.hh" #include "params/$cls.hh" #include "sim/init.hh" +#include "sim/sim_object.hh" + #include "${{cls.cxx_header}}" ''') @@ -982,7 +984,8 @@ class SimObject(object): if keys in self._hr_values\ and keys in self._values\ - and not isinstance(self._values[keys], m5.proxy.BaseProxy): + and not isinstance(self._values[keys], + m5.proxy.BaseProxy): cmd_str = cmd_line_str + keys acc_str = access_str + keys flags_dict[cmd_str] = ParamInfo(ptype, @@ -1182,8 +1185,9 @@ class SimObject(object): self._parent = parent self._name = name - # Return parent object of this SimObject, not implemented by SimObjectVector - # because the elements in a SimObjectVector may not share the same parent + # Return parent object of this SimObject, not implemented by + # SimObjectVector because the elements in a SimObjectVector may not share + # the same parent def get_parent(self): return self._parent @@ -1275,7 +1279,8 @@ class SimObject(object): match_obj = self._values[pname] if found_obj != None and found_obj != match_obj: raise AttributeError, \ - 'parent.any matched more than one: %s and %s' % (found_obj.path, match_obj.path) + 'parent.any matched more than one: %s and %s' % \ + (found_obj.path, match_obj.path) found_obj = match_obj return found_obj, found_obj != None |