Skip to content

chore: add some exception handling minor cleanup checks#662

Merged
gaborbernat merged 1 commit intopypa:mainfrom
henryiii:henryiii/chore/exceptions
Aug 25, 2023
Merged

chore: add some exception handling minor cleanup checks#662
gaborbernat merged 1 commit intopypa:mainfrom
henryiii:henryiii/chore/exceptions

Conversation

@henryiii
Copy link
Contributor

Some cleanup based on Ruff checks.

raise BuildBackendException(exception, f'Backend subprocess exited when trying to invoke {hook}') from None
except Exception as exception:
raise BuildBackendException(exception, exc_info=sys.exc_info()) # noqa: B904 # use raise from
raise BuildBackendException(exception, exc_info=sys.exc_info()) from None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think these were holdovers from Python 2 days. We are propagating the info anyway, so I think from None is correct here.

@henryiii henryiii force-pushed the henryiii/chore/exceptions branch 2 times, most recently from d79f41d to fc5e4ce Compare August 22, 2023 21:39
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/chore/exceptions branch from fc5e4ce to fa1daf1 Compare August 22, 2023 22:26
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

@gaborbernat gaborbernat merged commit 59c1f87 into pypa:main Aug 25, 2023
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