Closed salimfadhley closed 1 year ago
This sounds pretty tricky to implement for all the different refactoring rules, so I'd prefer to fix shed when it gets something wrong instead.
(although note also that this is a side project to my main OSS volunteering, so no guarantees of timely fixes unless someone else volunteers to write them)
Hi @Zac-HD,
The thing that Shed gets wrong for me is sqlalchemycriteria: These are often expressed as:
objectname.columname == True
Which shed will refactor as:
objectnae.columname is True
Which doesn't have quite the same meaning, and will break SQLAlchemy. I've had to switch off refactor to prevent this from breaking.
I've opened an issue to make sure that this doesn't get forgotten before someone volunteers to fix it 🙂
Shed's refactor option sometimes gets it wrong.
It would be great if it were possible to selectively tell shed not to refactor certain lines of code, for example by placing a comment.
The mechanism could be consistent with how mypy works - a comment at the top of the file would tell shed not to refactor anything in that file. A comment at the top of a function would prevent that function from being refactored. A comment anywhere else would prevent that line from being refactored.