Closed amogorkon closed 9 months ago
Hey @amogorkon, thanks for reporting this. I've reproduced it, and it looks to me not exactly like a bug in the refactoring (which as far as I can tell is just set([x])
-> {x}
), but rather a problem with our handling of the parenthesis wrapping. We should be able to fix this fairly quickly, I'll get back to you soon.
Description
In my fuzzylogic library, I use a "factory pattern" for functions, delegating checks and pre-computing constants to the outer function, then returning the inner function that only takes a single value. One such function that is used to combine different functions is simple_disjoint_sum, which looks like this
Sourcery detects "Unwrap a constant iterable constructor" as a problem and suggests to correct it to
which results in multiple syntax errors - an unclosed (, unexpected token "or" and removing the ( would result in further syntax errors and other problems. I realize this is a pretty exotic problem, but you should be aware of it.
Debug Information
IDE Version: Version: 1.83.0-insider (user setup) Commit: bccfade64adb249f57c8fcf03cba41609f76ce5c Date: 2023-09-15T05:35:16.508Z Electron: 25.8.1 ElectronBuildId: 23779380 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045
Sourcery Version 1.9.0