Skip to content

Conversation

@janiversen
Copy link
Collaborator

Allow pylint to work with broad exceptions again.

@janiversen
Copy link
Collaborator Author

@jamesbraza seems your latest commit broke pylint, I have no idea why our CI did not catch it

@janiversen janiversen merged commit 7b585d9 into dev Apr 25, 2023
@janiversen janiversen deleted the broad branch April 25, 2023 08:33
@alexrudd2
Copy link
Collaborator

I also don't understand, but found this:

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.Exception' ?) instead.

@janiversen
Copy link
Collaborator Author

That was exactly what caused the problem.

@jamesbraza
Copy link
Contributor

Oh actually that change from Exception to builtins.Exception was intentional: https://stackoverflow.com/questions/75370815/pylint-specifying-exception-names-in-the-overgeneral-exceptions-option-without

This message comes with newer pylint, which #1519 moved to.
overgeneral-exceptions=builtins.Exception is the correct configuration option.

Now after this PR, on my machine, I see all over the place:

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.Exception' ?) instead.
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.Exception' ?) instead.
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.Exception' ?) instead.

Note the warning is actually asking for builtins.Exception.

@jamesbraza
Copy link
Contributor

While using pylint<3 (what we're using), this will be fine, but when we go to pylint>=3 this will ultimately break.

I would advocate for this PR to be reverted, so that we can roll smoothly into the future 👌

@janiversen
Copy link
Collaborator Author

sounds like a good idea, unless pylint continue telling me to remove the disable for a lot of lines (which for some reason seems solved with this PR).

janiversen added a commit that referenced this pull request Apr 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants