Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename shadowed file code action doesn't show up #6328

Closed
StellaHuang95 opened this issue Aug 29, 2024 · 4 comments
Closed

Rename shadowed file code action doesn't show up #6328

StellaHuang95 opened this issue Aug 29, 2024 · 4 comments
Assignees

Comments

@StellaHuang95
Copy link
Contributor

Environment data

  • Pylance version: 2024.8.104

Repro Steps

  1. Clone pylance-release
  2. Open pylance-release\testing\single folder in VS Code
  3. Open codeaction.py, place cursor on mailbox

Expected behavior

Lightbulb shows up and trigger quick fix and Rename "...mailbox" to "...mailbox_x" entry is listed

Actual behavior

Rename "...mailbox" to "...mailbox_x" code action isn't showing up

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 29, 2024
@StellaHuang95
Copy link
Contributor Author

StellaHuang95 commented Aug 29, 2024

That's because the reportShadowedImports is not set in pyrightconfig.json so it uses the default value off. However, this doesn't explain why the issue doesn't occur with previous Pylance versions, where I also don't have any diagnostic rules set in settings.json.

@rchiodo
Copy link
Contributor

rchiodo commented Aug 29, 2024

Default is on in pylance. That's the default for that setting. But since pyrightconfig.json is present all defaults come from that.

@StellaHuang95
Copy link
Contributor Author

Why is this diagnostic rule special-cased in Pylance?

@rchiodo
Copy link
Contributor

rchiodo commented Aug 30, 2024

Because Eric didn't want that behavior for the command line in Pyright. So we override it in Pylance.

@StellaHuang95 StellaHuang95 added by design and removed needs repro Issue has not been reproduced yet labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants