Skip to content

Commit 6687482

Browse files
author
Dave Bartolomeo
authored
Merge branch 'main' into dbartol/provenance-builtin
2 parents 78383e3 + 1a59467 commit 6687482

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [UNRELEASED]
44

5+
- Add Python support to the CodeQL Model Editor. [#3676](https://github.com/github/vscode-codeql/pull/3676)
56
- Update variant analysis view to display the length of the shortest path for path queries. [#3671](https://github.com/github/vscode-codeql/pull/3671)
67

78
## 1.13.1 - 29 May 2024

extensions/ql-vscode/src/config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,6 @@ const LLM_GENERATION_DEV_ENDPOINT = new Setting(
840840
const MODEL_EVALUATION = new Setting("evaluation", MODEL_SETTING);
841841
const MODEL_PACK_LOCATION = new Setting("packLocation", MODEL_SETTING);
842842
const MODEL_PACK_NAME = new Setting("packName", MODEL_SETTING);
843-
const ENABLE_PYTHON = new Setting("enablePython", MODEL_SETTING);
844843

845844
export type ModelConfigPackVariables = {
846845
database: string;
@@ -857,7 +856,6 @@ export interface ModelConfig {
857856
variables: ModelConfigPackVariables,
858857
): string;
859858
getPackName(languageId: string, variables: ModelConfigPackVariables): string;
860-
enablePython: boolean;
861859
}
862860

863861
export class ModelConfigListener extends ConfigListener implements ModelConfig {
@@ -919,10 +917,6 @@ export class ModelConfigListener extends ConfigListener implements ModelConfig {
919917
variables,
920918
);
921919
}
922-
923-
public get enablePython(): boolean {
924-
return !!ENABLE_PYTHON.getValue<boolean>();
925-
}
926920
}
927921

928922
const GITHUB_DATABASE_SETTING = new Setting("githubDatabase", ROOT_SETTING);

extensions/ql-vscode/src/model-editor/supported-languages.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ export const SUPPORTED_LANGUAGES: QueryLanguage[] = [
99
QueryLanguage.Java,
1010
QueryLanguage.CSharp,
1111
QueryLanguage.Ruby,
12+
QueryLanguage.Python,
1213
];
1314

1415
export function isSupportedLanguage(
1516
language: QueryLanguage,
16-
modelConfig: ModelConfig,
17+
_modelConfig: ModelConfig,
1718
) {
1819
if (SUPPORTED_LANGUAGES.includes(language)) {
1920
return true;
2021
}
2122

22-
if (language === QueryLanguage.Python) {
23-
// Python is only enabled when the config setting is set
24-
return modelConfig.enablePython;
25-
}
26-
2723
return false;
2824
}

0 commit comments

Comments
 (0)