Closed Wesztman closed 5 months ago
Here is a verbose log which I run with the following devcontainer.json
Here I start the devcontainer, go into a python file, press ctrl+s, run Ruff: sort import from the command palette, followed by Ruff: format (think that was the order).
Nothing happens to my open python file :(
Log
2024-02-06 12:51:45.508 [info] Name: Ruff
2024-02-06 12:51:45.508 [info] Module: ruff
2024-02-06 12:51:45.508 [info] Python extension loading
2024-02-06 12:51:45.508 [info] Waiting for interpreter from python extension.
2024-02-06 12:51:46.636 [info] Python extension loaded
2024-02-06 12:51:46.718 [info] Server run command: /workspaces/project/.venv/bin/python /home/vscode/.vscode-server/extensions/charliermarsh.ruff-2024.10.0-linux-x64/bundled/tool/server.py
2024-02-06 12:51:46.719 [info] Server: Start requested.
2024-02-06 12:51:46.996 [info] [Trace - 12:51:46 PM] Sending request 'initialize - (0)'.
2024-02-06 12:51:46.996 [info] Params: {
"processId": 2355,
"clientInfo": {
"name": "Visual Studio Code",
"version": "1.86.0"
},
"locale": "en",
"rootPath": "/workspaces/project",
"rootUri": "file:///workspaces/project",
"capabilities": {
"workspace": {
"applyEdit": true,
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
],
"failureHandling": "textOnlyTransactional",
"normalizesLineEndings": true,
"changeAnnotationSupport": {
"groupsOnLabel": true
}
},
"configuration": true,
"didChangeWatchedFiles": {
"dynamicRegistration": true,
"relativePatternSupport": true
},
"symbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"tagSupport": {
"valueSet": [
1
]
},
"resolveSupport": {
"properties": [
"location.range"
]
}
},
"codeLens": {
"refreshSupport": true
},
"executeCommand": {
"dynamicRegistration": true
},
"didChangeConfiguration": {
"dynamicRegistration": true
},
"workspaceFolders": true,
"semanticTokens": {
"refreshSupport": true
},
"fileOperations": {
"dynamicRegistration": true,
"didCreate": true,
"didRename": true,
"didDelete": true,
"willCreate": true,
"willRename": true,
"willDelete": true
},
"inlineValue": {
"refreshSupport": true
},
"inlayHint": {
"refreshSupport": true
},
"diagnostics": {
"refreshSupport": true
}
},
"textDocument": {
"publishDiagnostics": {
"relatedInformation": true,
"versionSupport": false,
"tagSupport": {
"valueSet": [
1,
2
]
},
"codeDescriptionSupport": true,
"dataSupport": true
},
"synchronization": {
"dynamicRegistration": true,
"willSave": true,
"willSaveWaitUntil": true,
"didSave": true
},
"completion": {
"dynamicRegistration": true,
"contextSupport": true,
"completionItem": {
"snippetSupport": true,
"commitCharactersSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"deprecatedSupport": true,
"preselectSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"insertReplaceSupport": true,
"resolveSupport": {
"properties": [
"documentation",
"detail",
"additionalTextEdits"
]
},
"insertTextModeSupport": {
"valueSet": [
1,
2
]
},
"labelDetailsSupport": true
},
"insertTextMode": 2,
"completionItemKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
]
},
"completionList": {
"itemDefaults": [
"commitCharacters",
"editRange",
"insertTextFormat",
"insertTextMode"
]
}
},
"hover": {
"dynamicRegistration": true,
"contentFormat": [
"markdown",
"plaintext"
]
},
"signatureHelp": {
"dynamicRegistration": true,
"signatureInformation": {
"documentationFormat": [
"markdown",
"plaintext"
],
"parameterInformation": {
"labelOffsetSupport": true
},
"activeParameterSupport": true
},
"contextSupport": true
},
"definition": {
"dynamicRegistration": true,
"linkSupport": true
},
"references": {
"dynamicRegistration": true
},
"documentHighlight": {
"dynamicRegistration": true
},
"documentSymbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"hierarchicalDocumentSymbolSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"labelSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"disabledSupport": true,
"dataSupport": true,
"resolveSupport": {
"properties": [
"edit"
]
},
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
},
"honorsChangeAnnotations": false
},
"codeLens": {
"dynamicRegistration": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true,
"prepareSupportDefaultBehavior": 1,
"honorsChangeAnnotations": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"typeDefinition": {
"dynamicRegistration": true,
"linkSupport": true
},
"implementation": {
"dynamicRegistration": true,
"linkSupport": true
},
"colorProvider": {
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true,
"rangeLimit": 5000,
"lineFoldingOnly": true,
"foldingRangeKind": {
"valueSet": [
"comment",
"imports",
"region"
]
},
"foldingRange": {
"collapsedText": false
}
},
"declaration": {
"dynamicRegistration": true,
"linkSupport": true
},
"selectionRange": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": true
},
"semanticTokens": {
"dynamicRegistration": true,
"tokenTypes": [
"namespace",
"type",
"class",
"enum",
"interface",
"struct",
"typeParameter",
"parameter",
"variable",
"property",
"enumMember",
"event",
"function",
"method",
"macro",
"keyword",
"modifier",
"comment",
"string",
"number",
"regexp",
"operator",
"decorator"
],
"tokenModifiers": [
"declaration",
"definition",
"readonly",
"static",
"deprecated",
"abstract",
"async",
"modification",
"documentation",
"defaultLibrary"
],
"formats": [
"relative"
],
"requests": {
"range": true,
"full": {
"delta": true
}
},
"multilineTokenSupport": false,
"overlappingTokenSupport": false,
"serverCancelSupport": true,
"augmentsSyntaxTokens": true
},
"linkedEditingRange": {
"dynamicRegistration": true
},
"typeHierarchy": {
"dynamicRegistration": true
},
"inlineValue": {
"dynamicRegistration": true
},
"inlayHint": {
"dynamicRegistration": true,
"resolveSupport": {
"properties": [
"tooltip",
"textEdits",
"label.tooltip",
"label.location",
"label.command"
]
}
},
"diagnostic": {
"dynamicRegistration": true,
"relatedDocumentSupport": false
}
},
"window": {
"showMessage": {
"messageActionItem": {
"additionalPropertiesSupport": true
}
},
"showDocument": {
"support": true
},
"workDoneProgress": true
},
"general": {
"staleRequestSupport": {
"cancel": true,
"retryOnContentModified": [
"textDocument/semanticTokens/full",
"textDocument/semanticTokens/range",
"textDocument/semanticTokens/full/delta"
]
},
"regularExpressions": {
"engine": "ECMAScript",
"version": "ES2020"
},
"markdown": {
"parser": "marked",
"version": "1.1.0"
},
"positionEncodings": [
"utf-16"
]
},
"notebookDocument": {
"synchronization": {
"dynamicRegistration": true,
"executionSummarySupport": true
}
}
},
"initializationOptions": {
"settings": [
{
"cwd": "/workspaces/project",
"workspace": "file:///workspaces/project",
"path": [],
"ignoreStandardLibrary": true,
"interpreter": [
"/workspaces/project/.venv/bin/python"
],
"importStrategy": "fromEnvironment",
"codeAction": {
"fixViolation": {
"enable": true
},
"disableRuleComment": {
"enable": true
}
},
"lint": {
"enable": true,
"run": "onType",
"args": []
},
"format": {
"args": []
},
"enable": true,
"organizeImports": true,
"fixAll": true,
"showNotifications": "off"
}
],
"globalSettings": {
"cwd": "/vscode/vscode-server/bin/linux-x64/05047486b6df5eb8d44b2ecd70ea3bdf775fd937",
"workspace": "/vscode/vscode-server/bin/linux-x64/05047486b6df5eb8d44b2ecd70ea3bdf775fd937",
"path": [],
"ignoreStandardLibrary": true,
"interpreter": [],
"importStrategy": "fromEnvironment",
"codeAction": {
"fixViolation": {
"enable": true
},
"disableRuleComment": {
"enable": true
}
},
"lint": {
"enable": true,
"run": "onType",
"args": []
},
"format": {
"args": []
},
"enable": true,
"organizeImports": true,
"fixAll": true,
"showNotifications": "off"
}
},
"trace": "verbose",
"workspaceFolders": [
{
"uri": "file:///workspaces/project",
"name": "project"
}
]
}
2024-02-06 12:51:47.844 [info] 2024-02-06 12:51:47,780 INFO Starting IO server
2024-02-06 12:51:47.860 [info] [Trace - 12:51:47 PM] Received notification 'window/logMessage'.
2024-02-06 12:51:47.860 [info] Params: {
"type": 4,
"message": "Workspace settings: [\n {\n \"cwd\": \"/workspaces/project\",\n \"workspace\": \"file:///workspaces/project\",\n \"path\": [],\n \"ignoreStandardLibrary\": true,\n \"interpreter\": [\n \"/workspaces/project/.venv/bin/python\"\n ],\n \"importStrategy\": \"fromEnvironment\",\n \"codeAction\": {\n \"fixViolation\": {\n \"enable\": true\n },\n \"disableRuleComment\": {\n \"enable\": true\n }\n },\n \"lint\": {\n \"enable\": true,\n \"run\": \"onType\",\n \"args\": []\n },\n \"format\": {\n \"args\": []\n },\n \"enable\": true,\n \"organizeImports\": true,\n \"fixAll\": true,\n \"showNotifications\": \"off\"\n }\n]"
}
2024-02-06 12:51:47.860 [info] Workspace settings: [
{
"cwd": "/workspaces/project",
"workspace": "file:///workspaces/project",
"path": [],
"ignoreStandardLibrary": true,
"interpreter": [
"/workspaces/project/.venv/bin/python"
],
"importStrategy": "fromEnvironment",
"codeAction": {
"fixViolation": {
"enable": true
},
"disableRuleComment": {
"enable": true
}
},
"lint": {
"enable": true,
"run": "onType",
"args": []
},
"format": {
"args": []
},
"enable": true,
"organizeImports": true,
"fixAll": true,
"showNotifications": "off"
}
]
2024-02-06 12:51:47.861 [info] [Trace - 12:51:47 PM] Received notification 'window/logMessage'.
2024-02-06 12:51:47.861 [info] Params: {
"type": 4,
"message": "Global settings: {\n \"cwd\": \"/vscode/vscode-server/bin/linux-x64/05047486b6df5eb8d44b2ecd70ea3bdf775fd937\",\n \"workspace\": \"/vscode/vscode-server/bin/linux-x64/05047486b6df5eb8d44b2ecd70ea3bdf775fd937\",\n \"path\": [],\n \"ignoreStandardLibrary\": true,\n \"interpreter\": [],\n \"importStrategy\": \"fromEnvironment\",\n \"codeAction\": {\n \"fixViolation\": {\n \"enable\": true\n },\n \"disableRuleComment\": {\n \"enable\": true\n }\n },\n \"lint\": {\n \"enable\": true,\n \"run\": \"onType\",\n \"args\": []\n },\n \"format\": {\n \"args\": []\n },\n \"enable\": true,\n \"organizeImports\": true,\n \"fixAll\": true,\n \"showNotifications\": \"off\"\n}"
}
2024-02-06 12:51:47.861 [info] Global settings: {
"cwd": "/vscode/vscode-server/bin/linux-x64/05047486b6df5eb8d44b2ecd70ea3bdf775fd937",
"workspace": "/vscode/vscode-server/bin/linux-x64/05047486b6df5eb8d44b2ecd70ea3bdf775fd937",
"path": [],
"ignoreStandardLibrary": true,
"interpreter": [],
"importStrategy": "fromEnvironment",
"codeAction": {
"fixViolation": {
"enable": true
},
"disableRuleComment": {
"enable": true
}
},
"lint": {
"enable": true,
"run": "onType",
"args": []
},
"format": {
"args": []
},
"enable": true,
"organizeImports": true,
"fixAll": true,
"showNotifications": "off"
}
2024-02-06 12:51:47.869 [info] [Trace - 12:51:47 PM] Received response 'initialize - (0)' in 872ms.
2024-02-06 12:51:47.869 [info] Result: {
"capabilities": {
"positionEncoding": "utf-16",
"textDocumentSync": {
"openClose": true,
"change": 2,
"willSave": false,
"willSaveWaitUntil": false,
"save": true
},
"notebookDocumentSync": {
"notebookSelector": [
{
"cells": [
{
"language": "python"
}
]
}
],
"save": true
},
"hoverProvider": true,
"codeActionProvider": {
"codeActionKinds": [
"quickfix",
"source.fixAll",
"source.organizeImports",
"source.fixAll.ruff",
"source.organizeImports.ruff",
"notebook.source.fixAll",
"notebook.source.organizeImports",
"notebook.source.fixAll.ruff",
"notebook.source.organizeImports.ruff"
],
"resolveProvider": true
},
"documentFormattingProvider": true,
"documentRangeFormattingProvider": {
"documentSelector": [
{
"language": "python",
"scheme": "file"
},
{
"language": "python",
"scheme": "untitled"
}
],
"rangesSupport": false,
"workDoneProgress": false
},
"executeCommandProvider": {
"commands": [
"ruff.applyAutofix",
"ruff.applyOrganizeImports",
"ruff.applyFormat"
]
},
"workspace": {
"workspaceFolders": {
"supported": true,
"changeNotifications": true
},
"fileOperations": {}
}
},
"serverInfo": {
"name": "Ruff",
"version": "0.0.52"
}
}
2024-02-06 12:51:47.870 [info] [Trace - 12:51:47 PM] Sending notification 'initialized'.
2024-02-06 12:51:47.870 [info] Params: {}
2024-02-06 12:52:35.726 [info] [Trace - 12:52:35 PM] Sending notification 'textDocument/didOpen'.
2024-02-06 12:52:35.727 [info] [Trace - 12:52:35 PM] Sending request 'textDocument/codeAction - (1)'.
2024-02-06 12:52:35.795 [info] [Trace - 12:52:35 PM] Received notification 'window/logMessage'.
2024-02-06 12:52:35.795 [info] Using interpreter executable: /workspaces/project/.venv/bin/ruff
2024-02-06 12:52:35.797 [info] [Trace - 12:52:35 PM] Received notification 'window/logMessage'.
2024-02-06 12:52:35.797 [info] Inferred version 0.2.1 for: /workspaces/project/.venv/bin/ruff
2024-02-06 12:52:35.797 [info] [Trace - 12:52:35 PM] Received notification 'window/logMessage'.
2024-02-06 12:52:35.798 [info] Found ruff 0.2.1 at /workspaces/project/.venv/bin/ruff
2024-02-06 12:52:35.798 [info] [Trace - 12:52:35 PM] Received notification 'window/logMessage'.
2024-02-06 12:52:35.798 [info] Running Ruff with: /workspaces/project/.venv/bin/ruff ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--stdin-filename', '/workspaces/project/project/build/docker_run.py']
2024-02-06 12:52:35.798 [info] [Trace - 12:52:35 PM] Received response 'textDocument/codeAction - (1)' in 71ms.
2024-02-06 12:52:35.799 [info] [Trace - 12:52:35 PM] Received notification 'textDocument/publishDiagnostics'.
2024-02-06 12:52:35.927 [info] [Trace - 12:52:35 PM] Sending request 'textDocument/codeAction - (2)'.
2024-02-06 12:52:36.025 [info] [Trace - 12:52:36 PM] Received response 'textDocument/codeAction - (2)' in 98ms.
2024-02-06 12:52:38.379 [info] [Trace - 12:52:38 PM] Sending request 'textDocument/hover - (3)'.
2024-02-06 12:52:38.382 [info] [Trace - 12:52:38 PM] Received response 'textDocument/hover - (3)' in 2ms.
2024-02-06 12:53:05.271 [info] [Trace - 12:53:05 PM] Sending request 'textDocument/codeAction - (4)'.
2024-02-06 12:53:05.273 [info] [Trace - 12:53:05 PM] Received response 'textDocument/codeAction - (4)' in 2ms.
2024-02-06 12:53:07.944 [info] [Trace - 12:53:07 PM] Sending request 'textDocument/codeAction - (5)'.
2024-02-06 12:53:07.948 [info] [Trace - 12:53:07 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:07.948 [info] Using interpreter executable: /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:07.949 [info] [Trace - 12:53:07 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:07.949 [info] Found ruff 0.2.1 at /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:07.949 [info] [Trace - 12:53:07 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:07.949 [info] Running Ruff with: /workspaces/project/.venv/bin/ruff ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--fix', '--stdin-filename', '/workspaces/project/project/build/docker_run.py']
2024-02-06 12:53:07.954 [info] [Trace - 12:53:07 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:07.954 [info] []
2024-02-06 12:53:07.956 [info] [Trace - 12:53:07 PM] Received response 'textDocument/codeAction - (5)' in 11ms.
2024-02-06 12:53:08.003 [info] [Trace - 12:53:08 PM] Sending request 'textDocument/codeAction - (6)'.
2024-02-06 12:53:08.006 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.006 [info] Using interpreter executable: /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:08.007 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.007 [info] Found ruff 0.2.1 at /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:08.007 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.007 [info] Running Ruff with: /workspaces/project/.venv/bin/ruff ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--fix', '--select', 'I001', '--select', 'I002', '--stdin-filename', '/workspaces/project/project/build/docker_run.py']
2024-02-06 12:53:08.012 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.012 [info] []
2024-02-06 12:53:08.013 [info] [Trace - 12:53:08 PM] Received response 'textDocument/codeAction - (6)' in 10ms.
2024-02-06 12:53:08.064 [info] [Trace - 12:53:08 PM] Sending request 'textDocument/formatting - (7)'.
2024-02-06 12:53:08.068 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.068 [info] Using interpreter executable: /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:08.068 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.068 [info] Found ruff 0.2.1 at /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:08.068 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.068 [info] Running Ruff with: /workspaces/project/.venv/bin/ruff ['format', '--force-exclude', '--quiet', '--stdin-filename', '/workspaces/project/project/build/docker_run.py']
2024-02-06 12:53:08.073 [info] [Trace - 12:53:08 PM] Received response 'textDocument/formatting - (7)' in 8ms.
2024-02-06 12:53:08.177 [info] [Trace - 12:53:08 PM] Sending notification 'textDocument/didSave'.
2024-02-06 12:53:08.181 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.181 [info] Using interpreter executable: /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:08.181 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.181 [info] Found ruff 0.2.1 at /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:08.181 [info] [Trace - 12:53:08 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:08.181 [info] Running Ruff with: /workspaces/project/.venv/bin/ruff ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--stdin-filename', '/workspaces/project/project/build/docker_run.py']
2024-02-06 12:53:08.185 [info] [Trace - 12:53:08 PM] Received notification 'textDocument/publishDiagnostics'.
2024-02-06 12:53:11.116 [info] [Trace - 12:53:11 PM] Sending request 'textDocument/codeAction - (8)'.
2024-02-06 12:53:11.118 [info] [Trace - 12:53:11 PM] Received response 'textDocument/codeAction - (8)' in 2ms.
2024-02-06 12:53:15.028 [info] [Trace - 12:53:15 PM] Sending request 'workspace/executeCommand - (9)'.
2024-02-06 12:53:15.032 [info] [Trace - 12:53:15 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:15.033 [info] Using interpreter executable: /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:15.033 [info] [Trace - 12:53:15 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:15.033 [info] Found ruff 0.2.1 at /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:15.033 [info] [Trace - 12:53:15 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:15.033 [info] Running Ruff with: /workspaces/project/.venv/bin/ruff ['--force-exclude', '--no-cache', '--no-fix', '--quiet', '--output-format', 'json', '-', '--fix', '--select', 'I001', '--select', 'I002', '--stdin-filename', '/workspaces/project/project/build/docker_run.py']
2024-02-06 12:53:15.038 [info] [Trace - 12:53:15 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:15.038 [info] []
2024-02-06 12:53:15.039 [info] [Trace - 12:53:15 PM] Received request 'workspace/applyEdit - (88d40ec2-f0fe-40b8-9c5c-ae508a7a6e5f)'.
2024-02-06 12:53:15.040 [info] [Trace - 12:53:15 PM] Received response 'workspace/executeCommand - (9)' in 12ms.
2024-02-06 12:53:15.093 [info] [Trace - 12:53:15 PM] Sending response 'workspace/applyEdit - (88d40ec2-f0fe-40b8-9c5c-ae508a7a6e5f)'. Processing request took 54ms
2024-02-06 12:53:26.554 [info] [Trace - 12:53:26 PM] Sending request 'workspace/executeCommand - (10)'.
2024-02-06 12:53:26.556 [info] [Trace - 12:53:26 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:26.556 [info] Using interpreter executable: /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:26.556 [info] [Trace - 12:53:26 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:26.557 [info] Found ruff 0.2.1 at /workspaces/project/.venv/bin/ruff
2024-02-06 12:53:26.557 [info] [Trace - 12:53:26 PM] Received notification 'window/logMessage'.
2024-02-06 12:53:26.557 [info] Running Ruff with: /workspaces/project/.venv/bin/ruff ['format', '--force-exclude', '--quiet', '--stdin-filename', '/workspaces/project/project/build/docker_run.py']
2024-02-06 12:53:26.563 [info] [Trace - 12:53:26 PM] Received request 'workspace/applyEdit - (e80531a4-ef3c-42c6-a4f4-57c27dfe77a2)'.
2024-02-06 12:53:26.563 [info] [Trace - 12:53:26 PM] Received response 'workspace/executeCommand - (10)' in 10ms.
2024-02-06 12:53:26.616 [info] [Trace - 12:53:26 PM] Sending response 'workspace/applyEdit - (e80531a4-ef3c-42c6-a4f4-57c27dfe77a2)'. Processing request took 53ms
devcontainer.json
{
"name": "project",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
},
"postCreateCommand": "sudo /usr/local/py-utils/bin/poetry self add poetry-dynamic-versioning[plugin] && pip install --upgrade pip && poetry install --all-extras && poetry run pre-commit install",
"containerEnv": {
"POETRY_VIRTUALENVS_IN_PROJECT": "true"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"aaron-bond.better-comments",
"SonarSource.sonarlint-vscode",
"yzhang.markdown-all-in-one",
"streetsidesoftware.code-spell-checker",
"charliermarsh.ruff"
],
"settings": {
"python.analysis.typeCheckingMode": "off",
"python.languageServer": "Pylance",
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"python.testing.pytestArgs": [
"tests"
],
// Ruff
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always"
},
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
}
},
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/project,type=bind",
"workspaceFolder": "/workspaces/project"
}
Hmm, so one thing to consider: can you try renaming your directory from build
to anything else? build
is one of our default-excluded directories (though I want to remove it from that list).
Hmm, so one thing to consider: can you try renaming your directory from
build
to anything else?build
is one of our default-excluded directories (though I want to remove it from that list).
I'd be damned, that was the problem 😅 thank you so much for the quick answer!!
I agree that it's not the best name on a folder... 😅 working with an old codebase, so cannot change it easily atm.
But a way around this should be to define the "exclude" myself in my pyproject.toml with all the defaults, but remove "build" from the list? 😊
Would be awsome to have a warning in the vscode output that ruff will not do anything because of exclude 😊 if that is even possible.
@Wesztman - Yeah that's correct. I wish build
wasn't in the list (not the first time this has come up) but we'll have to go through a deprecation cycle for it. So you'd want something like:
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
# "build",
"dist",
"node_modules",
"site-packages",
"venv",
]
@charliermarsh , works like a charm! Thanks for the quick help 😊 you can close this 👍
Hi! First of all, thanks for all your work with Ruff, awsome tool 😊
I have some serious issues with the extension that I cannot get to work, it feels like I tried everything 😅
I get NO
I however get all this working if I run ruff from the command line and point to the file, using the same executable that VSCode seems to use..
I have the following config in my devcontainer.json
This is my "test" code, unsorted imports and an extra new line in dict, I would expect to get squiggles that something is wrong with the imports and then I would expect the sorting and formatting to be fixed when pressing ctrl+S.
Instead I get the following log, here you can see the startup of the extensions, one ctrl+S and then also tries to use the command palette.
However if I run the tools from the commandline
I get perfect results
I have no config in my
pyproject.toml
atm.If you need anything else just tell me 😊
EDIT: Tried to remove explicit Pylance as language server, still the same issue. I have auto save on delay enabled, don't know if that might cause issues.
Also tried "explicit" as option for codeActionOnSave, still same problem.
Cheers Carl