Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pylint): overgeneral-exceptions fully qualified name #3576

Merged
merged 1 commit into from
May 24, 2024

Conversation

gardar
Copy link
Contributor

@gardar gardar commented May 23, 2024

Fixes errors like this:

- MegaLinter key: [PYTHON_PYLINT]
- Rules config: [.pylintrc]
- Number of files analyzed: [6]
--Error detail:
pylint: Command line or configuration file:1: UserWarning: 'Exception' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.Exception' ?) instead. This will cease to be checked at runtime when the configuration upgrader is released.

Proposed Changes

The overgeneral-exceptions option in pylint now requires a fully qualified name.
Even though this has already been fixed in the megalinter pylint docs:

--overgeneral-exceptions <comma-separated class names>
Exceptions that will emit a warning when caught.
(default: ('builtins.BaseException',
'builtins.Exception'))

Ps. Perhaps linter config should also be auto updated in addition to the linter docs?

Readiness Checklist

Author/Contributor

  • Add entry to the CHANGELOG listing the change and linking to the corresponding issue (if appropriate)
  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

Signed-off-by: gardar <gardar@users.noreply.github.com>
@echoix echoix merged commit cb0bce7 into oxsecurity:main May 24, 2024
6 checks passed
@echoix
Copy link
Collaborator

echoix commented May 24, 2024

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants