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

Allow broad exceptions in pylint #2471

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ocelotl
Copy link
Contributor

@ocelotl ocelotl commented Apr 27, 2024

Fixes #2470

@ocelotl ocelotl added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Apr 27, 2024
@ocelotl ocelotl self-assigned this Apr 27, 2024
@ocelotl ocelotl requested a review from a team as a code owner April 27, 2024 21:42
Copy link
Contributor

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong opinion, but why not keeping the check and just use builtins.Exception in the config?

@ocelotl
Copy link
Contributor Author

ocelotl commented May 2, 2024

No strong opinion, but why not keeping the check and just use builtins.Exception in the config?

So, I tried this approach because it was the one that worked for the core repo.

.pylintrc Show resolved Hide resolved
@@ -81,7 +81,8 @@ disable=missing-docstring,
missing-module-docstring, # temp-pylint-upgrade
import-error, # needed as a workaround as reported here: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/290
cyclic-import,
not-context-manager
not-context-manager,
broad-exception-raised
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be added then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did that and lint failed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocelotl I've opened a draft PR to fix them, failing because I got some the pylint exception wrong and missed to update tests when used different Exception types, will update it tomorrow

@ocelotl ocelotl requested a review from xrmx May 21, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix warning when running lint
2 participants