ruff
ruff copied to clipboard
PyUpgrade: Turn errors into OSError
A part of #827. The following needs to be happen for this to be moved out of draft status:
- [x] Handle statements with multiple except statements
- [x] Handle
raisestatements - [x] Add the rest of the tests from pyupgrade
@colin99d - Is this all set to review?
@charliermarsh I got this done and we are passing all pyupgrade tests. I intentionally left it a little messy because I figured it would need refactored, and I wanted your input on how. This one was a lot more code because there were a lot more possible situations. Also please show me how to get Located<ExprKind> out of the box, so that I only need two implement my trait for two types. I tried using (*item).downcast::<Located<ExprKind>>(), but rust was saying that Box<Located<ExprKind>> has no method downcast (same with downcast_ref).
Ok thanks, I'll try to review today!
(And will look to answer your questions too.)
Perfect! Also is there a Discord server or something similar for people contributing to chat on?
There's not, but I've considered creating one 🤔
There's not, but I've considered creating one 🤔
Would be nice just so that I can know where you plan on taking this thing and how I can help it get there. You could make it private for now if your worried about spammers and randos.
Switched this to draft until I get done with all our changes.
@charliermarsh I am switching this out of draft now. Unfortunately, trying to consolidate to two implementations caused tests to fail, so I did not do it. Let me know if you want anything else cleaned up or more comments anywhere else.
Going to revisit this tomorrow!
Perfect! Also is there a Discord server or something similar for people contributing to chat on?
@charliermarsh If you’re interested, Zulip will happily sponsor free Zulip Cloud hosting for Ruff (as we do for any open-source project).