[totem/wip/hadess/re-enable-pylint: 6/10] opensubtitles: Work-around pylint not knowing about GI bindings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/re-enable-pylint: 6/10] opensubtitles: Work-around pylint not knowing about GI bindings
- Date: Thu, 23 Jun 2022 14:25:17 +0000 (UTC)
commit 5c81efd2315115bed5db6b0330e94aa919e3bb7e
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jun 23 16:22:44 2022 +0200
opensubtitles: Work-around pylint not knowing about GI bindings
src/plugins/opensubtitles/opensubtitles.py:450:14: E1101: Instance of 'Property' has no 'get_current_mrl'
member (no-member)
src/plugins/opensubtitles/opensubtitles.py:452:54: E1101: Instance of 'Property' has no 'get_current_mrl'
member (no-member)
src/plugins/opensubtitles/opensubtitles.py:794:22: E1101: Instance of 'Property' has no
'get_title_at_playlist_pos' member (no-member)
src/plugins/opensubtitles/opensubtitles.py:794:60: E1101: Instance of 'Property' has no
'get_playlist_pos' member (no-member)
src/plugins/opensubtitles/opensubtitles.py:16:0: W0611: Unused Totem imported from gi.repository
(unused-import)
src/plugins/opensubtitles/opensubtitles.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/opensubtitles/opensubtitles.py b/src/plugins/opensubtitles/opensubtitles.py
index 5caa26ddb..c5c3bae13 100644
--- a/src/plugins/opensubtitles/opensubtitles.py
+++ b/src/plugins/opensubtitles/opensubtitles.py
@@ -13,7 +13,7 @@ gi.require_version('Gtk', '3.0')
gi.require_version('Totem', '1.0')
from gi.repository import GLib, GObject # pylint: disable=wrong-import-position
from gi.repository import Peas, Gtk, Gdk # pylint: disable=wrong-import-position,
-from gi.repository import Gio, Pango, Totem # pylint: disable=wrong-import-position,no-name-in-module
+from gi.repository import Gio, Pango # pylint: disable=wrong-import-position,no-name-in-module
from hash import hash_file # pylint: disable=wrong-import-position
@@ -447,9 +447,9 @@ class OpenSubtitles (GObject.Object, # pylint: disable=R0902
server = xmlrpc.client.Server ('http://api.opensubtitles.org/xml-rpc')
self._model = OpenSubtitlesModel (server)
- mrl = self._totem.get_current_mrl ()
+ mrl = self._totem.get_current_mrl () # pylint: disable=E1101
if mrl:
- self.__on_totem__file_opened(self._totem, self._totem.get_current_mrl ())
+ self.__on_totem__file_opened(self._totem, self._totem.get_current_mrl ()) # pylint: disable=E1101
def do_deactivate (self):
if self._dialog:
@@ -791,6 +791,6 @@ class OpenSubtitles (GObject.Object, # pylint: disable=R0902
self._find_button.set_sensitive (False)
self._filename = self._totem.get_current_mrl () # pylint: disable=no-member
(movie_hash, movie_size) = hash_file (self._filename)
- movie_title = self._totem.get_title_at_playlist_pos(self._totem.get_playlist_pos())
+ movie_title = self._totem.get_title_at_playlist_pos(self._totem.get_playlist_pos()) # pylint:
disable=E1101
self._get_results (movie_hash, movie_size, movie_title)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]