sourcery-ai / sourcery

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

Sourcery plugin not working for Pycharm #426

Open Whisht opened 2 months ago

Whisht commented 2 months ago

Checklist

Description

Sourcery plugin is not working for Pycharm 2024.1. I installed Sourcery plugin from Pycharm plugins store and copy the demo code from the Default Rules - Sourcery Documentation, but no hints for these code. By the way, it works in vscode.

Code snippet that reproduces issue

I simply copy the example code from Default Rules - Sourcery Documentation, and paste it into Pycharm. But there is no underline hints for some code. And I disabled all other plugins in Pycharm, then tested it, the problem still exists.

Some config info

I enable all rule in Pycharm.

rule

It works normally in VSCode

vscode

But it perform differently in Pycharm

sourcey

Debug Information

IDE Version:

Pycharm Professional 2024.1

Sourcery Version:

Sorcery 1.16.0

Operating system and Version:

Macos 14.4.1

Sorcery.log: sourcery.log

Hellebore commented 2 months ago

Hi @Whisht - sorry you're having trouble.

I can't reproduce this yet on my end, so a few questions to help track it down:

Whisht commented 2 months ago

Hi, @Hellebore.

  1. The chat assistant is not always working normally. Sometimes I have to restart Pycharm, the chat assistant start to respond. And Soucery is stuck at the scanning without any response.

    image
  2. When I restart pycharm, the entries are shown up, but they will be vanish after I input some codes that sourcery launch a new scanning task.

  3. The config file is just a default one : coding_assistant:\n enabled: true

  4. Yes. A standard .py file.

Whisht commented 2 months ago

Here is a screen record in which I only have two operations - close and open the tabs. You will see that the entries are suddenly disappeared. CleanShot 2024-04-22 at 11 13 39

Hellebore commented 2 months ago

@Whisht thanks that's great information - we will investigate