From 5f54b018b3a84ba4b68009a1c326ba73eaea8cfd Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 5 Sep 2009 01:54:41 -0700 Subject: [PATCH] standardized the Element inheritance __init__ usage in gui --- grc/gui/Block.py | 2 +- grc/gui/Connection.py | 2 ++ grc/gui/Element.py | 2 +- grc/gui/FlowGraph.py | 2 +- grc/gui/Param.py | 2 ++ grc/gui/Platform.py | 3 ++- grc/gui/Port.py | 2 +- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/grc/gui/Block.py b/grc/gui/Block.py index 0f3e511d..68c4da9c 100644 --- a/grc/gui/Block.py +++ b/grc/gui/Block.py @@ -37,7 +37,7 @@ BLOCK_MARKUP_TMPL="""\ class Block(Element): """The graphical signal block.""" - def __init__(self, *args, **kwargs): + def __init__(self): """ Block contructor. Add graphics related params to the block. diff --git a/grc/gui/Connection.py b/grc/gui/Connection.py index 013bcb00..a85650ee 100644 --- a/grc/gui/Connection.py +++ b/grc/gui/Connection.py @@ -32,6 +32,8 @@ class Connection(Element): The arrow coloring exposes the enabled and valid states. """ + def __init__(self): Element.__init__(self) + def get_coordinate(self): """ Get the 0,0 coordinate. diff --git a/grc/gui/Element.py b/grc/gui/Element.py index 31519172..ecf1de1c 100644 --- a/grc/gui/Element.py +++ b/grc/gui/Element.py @@ -32,7 +32,7 @@ class Element(object): and methods to detect selection of those areas. """ - def __init__(self, *args, **kwargs): + def __init__(self): """ Make a new list of rectangular areas and lines, and set the coordinate and the rotation. """ diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 5e645be7..8a908ff5 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -39,7 +39,7 @@ class FlowGraph(Element): and the connections between inputs and outputs. """ - def __init__(self, *args, **kwargs): + def __init__(self): """ FlowGraph contructor. Create a list for signal blocks and connections. Connect mouse handlers. diff --git a/grc/gui/Param.py b/grc/gui/Param.py index 4955d333..5cc8d9c7 100644 --- a/grc/gui/Param.py +++ b/grc/gui/Param.py @@ -114,6 +114,8 @@ Error: class Param(Element): """The graphical parameter.""" + def __init__(self): Element.__init__(self) + def get_input_class(self): """ Get the graphical gtk class to represent this parameter. diff --git a/grc/gui/Platform.py b/grc/gui/Platform.py index 8f0aa533..8bbfaca2 100644 --- a/grc/gui/Platform.py +++ b/grc/gui/Platform.py @@ -19,4 +19,5 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA from Element import Element -class Platform(Element): pass +class Platform(Element): + def __init__(self): Element.__init__(self) diff --git a/grc/gui/Port.py b/grc/gui/Port.py index 6fc2c4b1..9c8d87a1 100644 --- a/grc/gui/Port.py +++ b/grc/gui/Port.py @@ -34,7 +34,7 @@ PORT_MARKUP_TMPL="""\ class Port(Element): """The graphical port.""" - def __init__(self, *args, **kwargs): + def __init__(self): """ Port contructor. Create list of connector coordinates. -- 2.30.2