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

remove usage of esnext Set.union in case people are using older node versions #1109

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/browser-pyright/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "./out",
"lib": [
"esnext",
"es2023",
"WebWorker",
"ScriptHost"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,13 @@ export class CompletionProvider {
}

const symbolTable = new Map<string, Symbol>();
let metaclassMemberNames = new Set<string>();
const metaclassMemberNames = new Set<string>();
for (let i = 1; i < classResults.classType.shared.mro.length; i++) {
const mroClass = classResults.classType.shared.mro[i];
if (isInstantiableClass(mroClass)) {
metaclassMemberNames = metaclassMemberNames.union(
getMembersForClass(mroClass, symbolTable, /* includeInstanceVars */ false)
// would ideally use Set.union here https://github.com/DetachHead/basedpyright/issues/1106
getMembersForClass(mroClass, symbolTable, /* includeInstanceVars */ false).forEach((member) =>
metaclassMemberNames.add(member)
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ requires-python = ">=3.8"
dependencies = [
# required by the basedpyright cli & langserver wrapper scripts. only binaries are required (no cli)
# since the user shouldn't have a node/npm binary unknowingly added to their PATH
"nodejs-wheel-binaries>=22.0.0",
"nodejs-wheel-binaries>=20.13.1",
]
[dependency-groups]
dev = [
"pylint>=3.0.0a7",
"ruff>=0.2.2",
"nodejs-wheel>=22.0.0",
"nodejs-wheel>=20.13.1",
"pdm-backend>=2.3.0",
"typing_extensions>=4.12.2",
"pytest>=8.2.2",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"target": "es2021",
"module": "node16",
"lib": [
// when updating this, remember to also update the one in browser-pyright
"ESNext"
// TODO: change this back to match upstream (es2020) or figure out a good way to polyfill https://github.com/DetachHead/basedpyright/issues/1106
"es2023"
],
"skipLibCheck": true,
"esModuleInterop": true,
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading