sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.55k stars 68 forks source link

Rules that add imports do not show up in the CLI #288

Open ghost opened 1 year ago

ghost commented 1 year ago

Checklist

Description

When I use Sourcery inside of VSCode, it shows me this warning: bug1 When I now scan the same file using the sourcery cli (installed with pip3 install sourcery-cli), this warning is not shown: bug2

Debug Information

IDE Version: VSCode 1.72.0

Sourcery Version: 0.12.9

Operating system and Version: Ubuntu 22.04

reka commented 1 year ago

Hi @Ascii67 ,

Thanks a lot for reporting this. :+1: That's peculiar. Is there something about this algorithms.py module that might be relevant for reproducing this :bug: ? :thinking:

E.g. Does it contain any

reka commented 1 year ago

Hi @Ascii67 ,

The refactoring use-itertools-product needs to add a new import to the module: itertools. Currently, this is supported in VSCode and PyCharm, but not in the CLI.

I agree that this inconsistency is a :bug: We'll change it, so that we'll at least show the refactoring in the CLI even if we can't fix it.

ghost commented 1 year ago

Alright, thanks for your help!