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

Enforce linting rule RUF012 #259

Merged
merged 3 commits into from
May 1, 2024
Merged

Enforce linting rule RUF012 #259

merged 3 commits into from
May 1, 2024

Conversation

ljgray
Copy link
Contributor

@ljgray ljgray commented Jan 17, 2024

@ljgray ljgray marked this pull request as ready for review January 17, 2024 00:54
@ljgray ljgray requested review from jrs65 and ketiltrout January 17, 2024 00:54
@ljgray ljgray force-pushed the ljg/ruff-update branch from d6fe182 to feabe7f Compare May 1, 2024 18:33
Copy link
Member

@ketiltrout ketiltrout left a comment

Choose a reason for hiding this comment

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

My comment below is mostly aesthetic. I don't think it's harmful as-is.

e.__class__.__name__,
str(e),
)
msg = f"Loading task '{task_path}' caused error {e.__class__.__name__}:\n\t{e!s}"
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason for embedding e in the re-raised CaputConfigError here (I'm mostly talking about the \t{e!s} part)?

raise BarError from FooError is already going to report the original FooError in one of its two tracebacks.

And if something else is catching the CaputConfigError, isn't it better for that to get the original e out of CaputConfigError.__cause__ if it wants it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly? I'm not sure. I think it was just written this way when the original pipeline runner was put together years and years ago.

I have another branch where I'm making improvements to the pipeline runner, so I'll make some error message improvements there instead so that this branch only makes style changes

Copy link
Member

Choose a reason for hiding this comment

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

Fair.

@ljgray ljgray merged commit f2e6fa2 into master May 1, 2024
5 checks passed
@ljgray ljgray deleted the ljg/ruff-update branch May 1, 2024 23:08
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