diff --git a/docs/source/applications.rst b/docs/source/applications.rst index aceaeb769..e47e0444b 100644 --- a/docs/source/applications.rst +++ b/docs/source/applications.rst @@ -74,7 +74,7 @@ A simple command-line application might look something like this:: location = Str("world") def _run(self): - super(HelloApplication, self)._run() + super()._run() print("Hello "+self.location) def main(): diff --git a/docs/source/overview.rst b/docs/source/overview.rst index a6b217caf..0d6661052 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -190,7 +190,7 @@ define a very simple Python editor application with menus:: """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/application/hello_world/hello_application.py b/examples/application/hello_world/hello_application.py index 4bf44bf50..1d2d13a67 100644 --- a/examples/application/hello_world/hello_application.py +++ b/examples/application/hello_world/hello_application.py @@ -40,7 +40,7 @@ class HelloApplication(Application): id = "example_hello_application" def _run(self): - super(HelloApplication, self)._run() + super()._run() print("Hello " + self.location) diff --git a/examples/application/python_editor/python_editor.py b/examples/application/python_editor/python_editor.py index b8a784292..71b7b0cd3 100644 --- a/examples/application/python_editor/python_editor.py +++ b/examples/application/python_editor/python_editor.py @@ -184,7 +184,7 @@ def redo(self): def create(self, parent): """ Create and set the toolkit-specific contents of the editor. """ - super(PythonEditor, self).create(parent) + super().create(parent) self.ui.history = UndoHistory() self._last_save = 0 diff --git a/examples/application_window.py b/examples/application_window.py index 263cf4a9a..faa268691 100644 --- a/examples/application_window.py +++ b/examples/application_window.py @@ -30,7 +30,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Create an action that exits the application. exit_action = Action(name="E&xit", on_perform=self.close) diff --git a/examples/dialog.py b/examples/dialog.py index c7a8fea09..4181b5e5f 100644 --- a/examples/dialog.py +++ b/examples/dialog.py @@ -41,7 +41,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/explorer.py b/examples/explorer.py index c21ffb331..ce106d853 100644 --- a/examples/explorer.py +++ b/examples/explorer.py @@ -59,7 +59,7 @@ def __init__(self, **traits): """ Creates a new window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Create the window's menu, tool and status bars. self._create_action_bars() diff --git a/examples/image_widget.py b/examples/image_widget.py index 7018368c9..90bb391ce 100644 --- a/examples/image_widget.py +++ b/examples/image_widget.py @@ -51,7 +51,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/mdi_application_window.py b/examples/mdi_application_window.py index c0ed8fa41..92e18da59 100644 --- a/examples/mdi_application_window.py +++ b/examples/mdi_application_window.py @@ -32,7 +32,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/multi_toolbar_window.py b/examples/multi_toolbar_window.py index a7676bc17..3396c8c17 100644 --- a/examples/multi_toolbar_window.py +++ b/examples/multi_toolbar_window.py @@ -44,7 +44,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/progress_dialog.py b/examples/progress_dialog.py index c80acc8f1..58a956aea 100644 --- a/examples/progress_dialog.py +++ b/examples/progress_dialog.py @@ -43,7 +43,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/python_editor.py b/examples/python_editor.py index 78660994e..df5413736 100644 --- a/examples/python_editor.py +++ b/examples/python_editor.py @@ -35,7 +35,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/splash_screen.py b/examples/splash_screen.py index 8266e1c10..5311ea523 100644 --- a/examples/splash_screen.py +++ b/examples/splash_screen.py @@ -25,7 +25,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/tasks/advanced/python_editor_qt4.py b/examples/tasks/advanced/python_editor_qt4.py index 48b2bf203..52965a1b3 100644 --- a/examples/tasks/advanced/python_editor_qt4.py +++ b/examples/tasks/advanced/python_editor_qt4.py @@ -159,7 +159,7 @@ class PythonEditorEventFilter(QtCore.QObject): """ def __init__(self, editor, parent): - super(PythonEditorEventFilter, self).__init__(parent) + super().__init__(parent) self.__editor = editor def eventFilter(self, obj, event): @@ -202,4 +202,4 @@ def eventFilter(self, obj, event): event=event, ) - return super(PythonEditorEventFilter, self).eventFilter(obj, event) + return super().eventFilter(obj, event) diff --git a/examples/timer.py b/examples/timer.py index 9e3d38316..29fac9ac6 100644 --- a/examples/timer.py +++ b/examples/timer.py @@ -20,7 +20,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager( diff --git a/examples/tool_palette.py b/examples/tool_palette.py index 5a609b604..b2fa4ee34 100644 --- a/examples/tool_palette.py +++ b/examples/tool_palette.py @@ -30,7 +30,7 @@ def __init__(self, **traits): """ Creates a new application window. """ # Base class constructor. - super(MainWindow, self).__init__(**traits) + super().__init__(**traits) # Add a menu bar. self.menu_bar_manager = MenuBarManager(