diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-18 22:41:52 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-19 20:32:26 +0200 |
commit | ac6a6c1aaaab2320631036aab2a6da856c41be66 (patch) | |
tree | 29e5874e6659ae314f513dc6c85b275091db6a22 | |
parent | c8b1b0ea5e2807826928190205417726c0044893 (diff) | |
download | astroid-git-ac6a6c1aaaab2320631036aab2a6da856c41be66.tar.gz |
Fix pylint warnings in astroid/brain/brain_gi
-rw-r--r-- | astroid/brain/brain_gi.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/astroid/brain/brain_gi.py b/astroid/brain/brain_gi.py index b6acd4d6..ee415e03 100644 --- a/astroid/brain/brain_gi.py +++ b/astroid/brain/brain_gi.py @@ -19,6 +19,8 @@ Helps with understanding everything imported from 'gi.repository' """ +# pylint:disable=import-error,import-outside-toplevel + import inspect import itertools import sys @@ -188,11 +190,14 @@ def _import_gi_module(modname): # Just inspecting the code can raise gi deprecation # warnings, so ignore them. try: - from gi import PyGIDeprecationWarning, PyGIWarning + from gi import ( # pylint:disable=import-error + PyGIDeprecationWarning, + PyGIWarning, + ) warnings.simplefilter("ignore", PyGIDeprecationWarning) warnings.simplefilter("ignore", PyGIWarning) - except Exception: + except Exception: # pylint:disable=broad-except pass __import__(m) @@ -242,7 +247,7 @@ def _register_require_version(node): import gi gi.require_version(node.args[0].value, node.args[1].value) - except Exception: + except Exception: # pylint:disable=broad-except pass return node |