Closed TimCarbo closed 8 months ago
I was able to replicate
:: [23:53:38.354] <- LSP-ruff window/logMessage: {'message': 'Using interpreter executable: /Users/dvitto/Library/Caches/Sublime Text/Package Storage/LSP-ruff/bin/ruff', 'type': 4}
:: [23:53:38.354] <- LSP-ruff window/logMessage: {'message': "Running Ruff with: /Users/dvitto/Library/Caches/Sublime Text/Package Storage/LSP-ruff/bin/ruff ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--format', 'json', '-', '--fix', '--extend-ignore', 'ALL', '--extend-select', 'I001', '--stdin-filename', '/Users/dvitto/projects/cerrada-movie-summary/summary.py']", 'type': 4}
LSP-ruff: error: unexpected argument '--format' found
tip: to pass '--format' as a value, use '-- --format'
ruff 0.1.1 according to ruff --version
ruff 0.0.39 according to the logs
Sublime Text build `4152 `
I found this on ruff's change log, so it makes sense, the --format
should now be --output-format
True, I can see it in the log:
:: [01:30:09.239] <<< LSP-ruff (1) (duration: 780ms): {
'capabilities': {
'codeActionProvider': {
'resolveProvider': True,
'codeActionKinds': ['quickfix', 'source.fixAll', 'source.organizeImports', 'source.fixAll.ruff', 'source.organizeImports.ruff']
},
'hoverProvider': True,
'positionEncoding': 'utf-16',
'workspace': {
'workspaceFolders': {
'supported': True,
'changeNotifications': True
},
'fileOperations': {}
},
'textDocumentSync': {
'change': {
'syncKind': 2
},
'save': {},
'didOpen': {},
'didClose': {}
},
'executeCommandProvider': {
'commands': ['ruff.applyAutofix', 'ruff.applyOrganizeImports']
}
},
'serverInfo': {'version': '0.0.39', 'name': 'Ruff'}
}
But I am confused then, why did it suddenly stop working?
Because your system ruff was probably updated to > 0.1 This will be fixed once the ruff-lsp dependency is bumped to 0.0.41. See https://github.com/astral-sh/ruff-lsp/commit/55568c48dd82959f58d73fcded630fd5ab8a7cae
Pushed 0.0.41 just now. Should be on Package Control within a few hours.
It works, thanks a lot !
Ruff does not work and logs the following:
I tried overriding args in my project's and global config but the wrong ones keep being passed.
Versions: Sublime Text Build 4152 ruff 0.1.1 according to ruff --version ruff 0.0.39 according to the logs
serverInfo.version
Python 3.11.4 LSP 1.25.0 LSP-ruff 1.0.10