Meta's Pyrefly sabotages competing Python extensions without telling you
Key takeaways
- These settings are never restored when Pyrefly is deactivated or uninstalled, leaving those extensions permanently broken until the user manually intervenes.
- This has been verified by live reproduction on a real machine (see below).
- export async function disableWindsurfPyrightIfInstalled() { const windsurfPyrightExtension = vscode.extensions.getExtension('codeium.windsurfpyright');
These settings are never restored when Pyrefly is deactivated or uninstalled, leaving those extensions permanently broken until the user manually intervenes.
This has been verified by live reproduction on a real machine (see below).
export async function disableWindsurfPyrightIfInstalled() { const windsurfPyrightExtension = vscode.extensions.getExtension('codeium.windsurfpyright'); if (windsurfPyrightExtension) { const config = vscode.workspace.getConfiguration('windsurfPyright'); await config.update('disableLanguageServices', true, vscode.ConfigurationTarget.Global); } } export async function disableBasedPyrightIfInstalled() { const basedPyrightExtension = vscode.extensions.getExtension('detachhead.basedpyright'); if (basedPyrightExtension) { const config = vscode.workspace.getConfiguration('basedpyright'); await config.update('disableLanguageServices', true, vscode.ConfigurationTarget.Global); } } export async function disableCursorPyrightIfInstalled() { const cursorPyrightExtension = vscode.extensions.getExtension('anysphere.cursorpyright'); if (cursorPyrightExtension) { const config = vscode.workspace.getConfiguration('cursorpyright'); await config.update('disableLanguageServices', true, vscode.ConfigurationTarget.Global); } } These are called unconditionally in lsp/src/extension.ts on activation.