From 3c1e0a8a12e54e45c99f09596192c13bb76a2c47 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 17 Mar 2018 16:08:20 -0400 Subject: virtManager/*: Give pylint hints about singleton classes It can't seem to figure out that what 'cls' is in this context, so make it explicit. --- virtManager/about.py | 2 +- virtManager/clone.py | 2 +- virtManager/connect.py | 2 +- virtManager/create.py | 2 +- virtManager/delete.py | 2 +- virtManager/details.py | 2 +- virtManager/engine.py | 2 +- virtManager/error.py | 2 +- virtManager/host.py | 2 +- virtManager/inspection.py | 2 +- virtManager/manager.py | 2 +- virtManager/migrate.py | 2 +- virtManager/preferences.py | 2 +- virtManager/systray.py | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) (limited to 'virtManager') diff --git a/virtManager/about.py b/virtManager/about.py index 03c15284..f9635180 100644 --- a/virtManager/about.py +++ b/virtManager/about.py @@ -28,7 +28,7 @@ class vmmAbout(vmmGObjectUI): def show_instance(cls, parentobj): try: if not cls._instance: - cls._instance = cls() + cls._instance = vmmAbout() cls._instance.show(parentobj.topwin) except Exception as e: parentobj.err.show_err( diff --git a/virtManager/clone.py b/virtManager/clone.py index 62b3c221..1be5ce2a 100644 --- a/virtManager/clone.py +++ b/virtManager/clone.py @@ -134,7 +134,7 @@ class vmmCloneVM(vmmGObjectUI): # Maintain one dialog per connection uri = vm.conn.get_uri() if uri not in cls._instances: - cls._instances[uri] = cls() + cls._instances[uri] = vmmCloneVM() cls._instances[uri].show(parentobj.topwin, vm) except Exception as e: parentobj.err.show_err( diff --git a/virtManager/connect.py b/virtManager/connect.py index 57be3375..64243cab 100644 --- a/virtManager/connect.py +++ b/virtManager/connect.py @@ -63,7 +63,7 @@ class vmmConnect(vmmGObjectUI): def get_instance(cls, parentobj): try: if not cls._instance: - cls._instance = cls() + cls._instance = vmmConnect() return cls._instance except Exception as e: parentobj.err.show_err( diff --git a/virtManager/create.py b/virtManager/create.py index 35917745..b80daa01 100644 --- a/virtManager/create.py +++ b/virtManager/create.py @@ -121,7 +121,7 @@ class vmmCreate(vmmGObjectUI): def show_instance(cls, parentobj, uri=None): try: if not cls._instance: - cls._instance = cls() + cls._instance = vmmCreate() cls._instance.show(parentobj and parentobj.topwin or None, uri=uri) except Exception as e: if not parentobj: diff --git a/virtManager/delete.py b/virtManager/delete.py index 4d8e5d69..c5691661 100644 --- a/virtManager/delete.py +++ b/virtManager/delete.py @@ -49,7 +49,7 @@ class vmmDeleteDialog(vmmGObjectUI): def show_instance(cls, parentobj, vm): try: if not cls._instance: - cls._instance = cls() + cls._instance = vmmDeleteDialog() cls._instance.show(parentobj.topwin, vm) except Exception as e: parentobj.err.show_err( diff --git a/virtManager/details.py b/virtManager/details.py index e17bcbc3..98d78da4 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -349,7 +349,7 @@ class vmmDetails(vmmGObjectUI): # Maintain one dialog per VM connkey = vm.get_connkey() if connkey not in cls._instances: - cls._instances[connkey] = cls(vm) + cls._instances[connkey] = vmmDetails(vm) return cls._instances[connkey] except Exception as e: if not parentobj: diff --git a/virtManager/engine.py b/virtManager/engine.py index 739b2f78..b2c4052f 100644 --- a/virtManager/engine.py +++ b/virtManager/engine.py @@ -53,7 +53,7 @@ class vmmEngine(vmmGObject): @classmethod def get_instance(cls): if not cls._instance: - cls._instance = cls() + cls._instance = vmmEngine() return cls._instance __gsignals__ = { diff --git a/virtManager/error.py b/virtManager/error.py index 030dd9d6..8144f3a3 100644 --- a/virtManager/error.py +++ b/virtManager/error.py @@ -53,7 +53,7 @@ class vmmErrorDialog(vmmGObject): @classmethod def get_instance(cls): if not cls._instance: - cls._instance = cls(None) + cls._instance = vmmErrorDialog(None) return cls._instance def __init__(self, parent): diff --git a/virtManager/host.py b/virtManager/host.py index 2aee4235..a93c7166 100644 --- a/virtManager/host.py +++ b/virtManager/host.py @@ -57,7 +57,7 @@ class vmmHost(vmmGObjectUI): # Maintain one dialog per connection uri = conn.get_uri() if uri not in cls._instances: - cls._instances[uri] = cls(conn) + cls._instances[uri] = vmmHost(conn) cls._instances[uri].show() except Exception as e: if not parentobj: diff --git a/virtManager/inspection.py b/virtManager/inspection.py index 76115f04..f816fc48 100644 --- a/virtManager/inspection.py +++ b/virtManager/inspection.py @@ -41,7 +41,7 @@ class vmmInspection(vmmGObject): if not cls._instance: if not cls.libguestfs_installed(): return None - cls._instance = cls() + cls._instance = vmmInspection() return cls._instance @classmethod diff --git a/virtManager/manager.py b/virtManager/manager.py index f7b86420..088b1f02 100644 --- a/virtManager/manager.py +++ b/virtManager/manager.py @@ -95,7 +95,7 @@ class vmmManager(vmmGObjectUI): def get_instance(cls, parentobj): try: if not cls._instance: - cls._instance = cls() + cls._instance = vmmManager() return cls._instance except Exception as e: if not parentobj: diff --git a/virtManager/migrate.py b/virtManager/migrate.py index 9d180966..7d13f3dd 100644 --- a/virtManager/migrate.py +++ b/virtManager/migrate.py @@ -45,7 +45,7 @@ class vmmMigrateDialog(vmmGObjectUI): def show_instance(cls, parentobj, vm): try: if not cls._instance: - cls._instance = cls() + cls._instance = vmmMigrateDialog() cls._instance.show(parentobj.topwin, vm) except Exception as e: parentobj.err.show_err( diff --git a/virtManager/preferences.py b/virtManager/preferences.py index 41e4148f..e256b608 100644 --- a/virtManager/preferences.py +++ b/virtManager/preferences.py @@ -33,7 +33,7 @@ class vmmPreferences(vmmGObjectUI): def show_instance(cls, parentobj): try: if not cls._instance: - cls._instance = cls() + cls._instance = vmmPreferences() cls._instance.show(parentobj.topwin) except Exception as e: parentobj.err.show_err( diff --git a/virtManager/systray.py b/virtManager/systray.py index f2d3dc55..ce241615 100644 --- a/virtManager/systray.py +++ b/virtManager/systray.py @@ -31,7 +31,7 @@ class vmmSystray(vmmGObject): @classmethod def get_instance(cls): if not cls._instance: - cls._instance = cls() + cls._instance = vmmSystray() return cls._instance def __init__(self): -- cgit v1.2.1