[totem/wip/hadess/pylint-error] opensubtitles: Disable "import locale" pylint warning



commit a5cf3e6626e3111b88d7a1c196e6e15e5fcdbfb0
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Feb 12 11:56:38 2020 +0100

    opensubtitles: Disable "import locale" pylint warning
    
    Disable the pylint warning that resulted in this code being an error:
    src/plugins/opensubtitles/opensubtitles.py:263:12: C0415: Import outside toplevel (locale) 
(import-outside-toplevel)
    
    Closes: #389

 src/plugins/opensubtitles/opensubtitles.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/plugins/opensubtitles/opensubtitles.py b/src/plugins/opensubtitles/opensubtitles.py
index 8f4be065f..1b82a5322 100644
--- a/src/plugins/opensubtitles/opensubtitles.py
+++ b/src/plugins/opensubtitles/opensubtitles.py
@@ -260,7 +260,7 @@ class OpenSubtitlesModel:
         self._token = None
 
         try:
-            import locale
+            import locale # pylint: disable=import-outside-toplevel
             (language_code, _) = locale.getlocale ()
             self.lang = LANGUAGES[language_code.split ('_')[0]]
         except (ImportError, IndexError, AttributeError, KeyError):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]