Pylint: Specifying exception names in the overgeneral-exceptions option without module name is deprecated

Question:

pylint: Command line or configuration file:1: UserWarning: Specifying
exception names in the overgeneral-exceptions option without module
name is deprecated and support for it will be removed in pylint 3.0.
Use fully qualified name (maybe ‘builtins.BaseException’ ?) instead.

Getting PyLint error.
I dont have any Except clause in my file and yet I see this error.

Asked By: Aseem

||

Answers:

This is just a warning for future pylint releases, you can ignore it. If you want to address it now you will need to open your .pylintrc configuration file (should be located at ~/.pylintrc) and replace:

overgeneral-exceptions=BaseException,
                       Exception

with:

overgeneral-exceptions=builtins.BaseException,
                       builtins.Exception
Answered By: Kleomenis Katevas
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.