Skip to content

Conversation

@DimitriPapadopoulos
Copy link
Contributor

B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling

https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/

B018 Found useless expression. Either assign it to a variable or remove it.

https://docs.astral.sh/ruff/rules/useless-expression/

Also, do not ignore ruff/bugbear rule B015 and B009:
https://docs.astral.sh/ruff/rules/useless-comparison/
https://docs.astral.sh/ruff/rules/get-attr-with-constant/

@DimitriPapadopoulos DimitriPapadopoulos changed the title Fix ruff/bugbear issues (UP) Fix ruff/bugbear issues (B) Mar 10, 2024
Copy link
Member

@brettcannon brettcannon left a comment

Choose a reason for hiding this comment

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

I'm fine w/ the changes if @pradyunsg is.

	B904 Within an `except` clause, raise exceptions with `raise ... from err` or
	     `raise ... from None` to distinguish them from errors in exception handling
	B028 No explicit `stacklevel` keyword argument found
	B018 Found useless expression. Either assign it to a variable or remove it.
@brettcannon brettcannon merged commit 6c5698a into pypa:main Aug 8, 2024
@brettcannon
Copy link
Member

Since @pradyunsg hasn't said anything in a month I decided to go ahead and merge.

Thanks, @DimitriPapadopoulos !

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.

3 participants