sourcery
sourcery copied to clipboard
Type narrowing seems to confuse Sourcery
Issue description or question

- The
test2method is actually the properly typed one, yet Sourcery fails to suggest the same simplification. - The suggested simplification could be simpler in this specific case, as mentioned in the first
testmethod.
Sourcery Version
v0.10.3
Code editor or IDE name and version
VSC Version: 1.64.2 (user setup) Commit: f80445acd5a3dadef24aa209168452a3d97cc326 Date: 2022-02-09T22:02:28.252Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.22557
OS name and version
Windows 11
Good spot and thanks for raising - improving our type inference is definitely on our roadmap!