-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Fix "Exception statement has no effect" #37722
Conversation
airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py
Outdated
Show resolved
Hide resolved
I was a little sceptical. We removed pylint gladly when we introduced ruff. Rather than introducing new tool for that, I'd generally wait until ruff supports such rule. |
I'm also not happy to have another linter, but yeah seems like this single rule work pretty fast. I could open issue/feature request at ruff repo with appropriate example when neither |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one!
We should open an issue on Ruff for this. |
airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py
Outdated
Show resolved
Hide resolved
Yes. Yes. |
1bb72b5
to
c97b971
Compare
I've just created new rule request at ruff GitHub Issues: astral-sh/ruff#10145 |
fbe4b32
to
92eaee0
Compare
Just to be on the same page. We do not have any objections to temporary include |
I am fine. It's fast, easy to remove |
* Fix "Exception statement has no effect" * Add link to the ruff issue tracker * update breeze hashes
* Fix "Exception statement has no effect" * Add link to the ruff issue tracker * update breeze hashes (cherry picked from commit a538e02)
* Fix "Exception statement has no effect" * Add link to the ruff issue tracker * update breeze hashes
During some code review I've accidentally found sometimes we do not raise an error or warning in our code.
Unfortunetly there is no such of check into the ruff, suggested
B018
can't detect this cases, so I propose to run this kind of check (W0133
) bypylint
, and only this one.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.