Skip to content

Conversation

@matusvalo
Copy link
Collaborator

Type of Changes

Type
πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
βœ“ πŸ“œ Docs

Description

Closes partially #5953

Co-authored-by: Vladyslav Krylasov <[email protected]>
@coveralls
Copy link

coveralls commented Mar 27, 2022

Pull Request Test Coverage Report for Build 2047857185

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.154%

Totals Coverage Status
Change from base Build 2047793050: 0.0%
Covered Lines: 15334
Relevant Lines: 16286

πŸ’› - Coveralls

Comment on lines +5 to +6
except Exception:
raise
Copy link
Member

Choose a reason for hiding this comment

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

This would emit try-except-raise, I think, so maybe we should model doing something with the exception?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on this discussion #5992 (comment) we should prefer simplicity/readability over code cleanness.

Copy link
Member

Choose a reason for hiding this comment

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

That's fair, but I think a flexible approach to this is worth considering, because I suspect we'll get an issue someday "I rewrote my code the way pylint said to but then I got another error".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I leave the decision to @Pierre-Sassoulas and @DanielNoord

Copy link
Member

Choose a reason for hiding this comment

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

How about a pass instead of a raise ? Still simple, but no try-except-raise ?

Copy link
Member

Choose a reason for hiding this comment

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

I guess it's a losing battle because bare-exception is also in play (probably?). So I'm willing to leave this be πŸ˜„

@DanielNoord DanielNoord merged commit fa0a1ae into pylint-dev:main Mar 28, 2022
@matusvalo matusvalo deleted the bad-except-order branch March 28, 2022 09:05
@Pierre-Sassoulas Pierre-Sassoulas removed this from the 2.14.0 milestone May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants