Repository Analysis

microsoft/pyright

Static Type Checker for Python

7.2 Low AI signal View on GitHub
7.2
Adjusted Score
7.2
Raw Score
100%
Time Factor
2026-05-29
Last Push
15,461
Stars
Python
Language
280,952
Lines of Code
1959
Files
1454
Pattern Hits
2026-05-31
Scan Date

Score History

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

CRITICAL 21HIGH 71MEDIUM 29LOW 1333

Pattern Findings

1454 matches across 14 categories. Click a row to expand file-level details.

Cross-Language Confusion (JS/TS)65 hits · 528 pts
SeverityFileLineSnippet
HIGH…pyright-internal/src/tests/docStringConversion.test.ts251print(foo_bar)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts254 print(bar_foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts263print(foo_bar)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts266 print(bar_foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts279print(foo_bar)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts282 print(bar_foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts291print(foo_bar)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts294 print(bar_foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts308 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts310 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts319 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts321 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts335 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts337 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts342 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts344 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts359 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts361 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts370 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts372 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts455 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts457 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts466 print(foo)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts468 print('not foo!')
HIGH…pyright-internal/src/tests/docStringConversion.test.ts385print(a + foo + 123)
HIGH…pyright-internal/src/tests/docStringConversion.test.ts393print(a + foo + 123)
HIGH…ourslash/hover.docFromSrc.relativeImport2.fourslash.ts8//// return True
HIGH…ests/fourslash/hover.inherited.docFromSrc.fourslash.ts8//// return True
HIGH…ests/fourslash/hover.inherited.docFromSrc.fourslash.ts14//// return True
HIGH…ests/fourslash/hover.inherited.docFromSrc.fourslash.ts27//// return True
HIGH…/fourslash/hover.docFromSrc.stubs-package.fourslash.ts19//// return True
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts13//// return True
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts19//// return True
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts24//// return True
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts57//// return True
HIGH…/fourslash/import.pytyped.typeCheckingOff.fourslash.ts17//// return None
HIGH…ests/fourslash/completions.libCodeAndStub.fourslash.ts20//// return True
HIGH…ests/fourslash/completions.libCodeAndStub.fourslash.ts24//// return True
HIGH…ests/fourslash/completions.libCodeAndStub.fourslash.ts28//// return True
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts6//// return True
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts9//// return True
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts27//// return True
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts30//// return True
HIGH…tests/fourslash/completions.libCodeNoStub.fourslash.ts20//// return True
HIGH…tests/fourslash/completions.libCodeNoStub.fourslash.ts24//// return True
HIGH…tests/fourslash/completions.libCodeNoStub.fourslash.ts28//// return True
HIGH…fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.ts11//// return True
HIGH…ourslash/import.pytyped.typeCheckingBasic.fourslash.ts17//// return None
HIGH…l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts14//// return True
HIGH…l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts18//// return True
HIGH…l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts22//// return True
HIGH…/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts14//// return True
HIGH…/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts18//// return True
HIGH…/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts22//// return True
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts8//// return True
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts13//// return True
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts30//// return True
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts33//// return True
HIGH…fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.ts13//// return True
HIGH…ourslash/hover.docFromSrc.relativeImport1.fourslash.ts8//// return True
5 more matches not shown…
Over-Commented Block426 hits · 424 pts
SeverityFileLineSnippet
LOW…yright-internal/src/tests/importStatementUtils.test.ts541// @filename: source.py
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts21// @filename: io2/tools/__init__.py
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts41//// from .[|io2|].tools import pathUtils as p
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts81//// def getFilename(path):
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts121
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts141////
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts181//// from io2.tools import pathUtils as pathUtils
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts201//// from .io2 import tools as t
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts241 const code = `
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts261//// pathUtils.getFilename("c")
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts301});
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts41
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts81
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts121// @library: true
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts181 const code = `
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts241// @filename: test.py
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts301test('function hover does not substitute unsafe multiline defaults for stub ellipsis defaults', async () => {
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts341
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts401// @filename: pyrightconfig.json
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts441// @library: true
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts501//// class Test:
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts561test('import symbol tooltip - useLibraryCodeForTypes true', async () => {
LOWpackages/pyright-internal/src/tests/testState.test.ts61//// ],
LOWpackages/pyright-internal/src/tests/testState.test.ts81//// "pythonVersion": "3.6",
LOWpackages/pyright-internal/src/tests/testState.test.ts101//// {
LOWpackages/pyright-internal/src/tests/testState.test.ts521////
LOWpackages/pyright-internal/src/tests/testState.test.ts561//// from dataclasses import dataclass, InitVar
LOWpackages/pyright-internal/src/tests/testState.test.ts581//// # parameter types don't match.
LOW…s/pyright-internal/src/tests/sourceMapperUtils.test.ts181// @filename: test.py
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts61});
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts141
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts181 assert.strictEqual(actual.signatures[0].label, '(a: int = 3, b: str = "hello") -> None');
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts241// @filename: pyrightconfig.json
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts301//// {
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts341//// "useLibraryCodeForTypes": true
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts381//// }
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts421
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts461//// import mylib
LOW…-internal/src/tests/wildcardImportPackageMerge.test.ts21//// def do_something(value: str) -> None:
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts21 const code = `
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts101
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts161 }
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts201 const code = `
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts341
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts381 const code = `
LOWpackages/pyright-internal/src/tests/ipythonMode.test.ts161// @ipythonMode: true
LOWpackages/pyright-internal/src/tests/ipythonMode.test.ts441 });
LOWpackages/pyright-internal/src/tests/completions.test.ts81});
LOWpackages/pyright-internal/src/tests/completions.test.ts121// @filename: pyrightconfig.json
LOWpackages/pyright-internal/src/tests/completions.test.ts221 },
LOWpackages/pyright-internal/src/tests/completions.test.ts861test('auto import sort text', async () => {
LOWpackages/pyright-internal/src/tests/completions.test.ts981 const code = `
LOWpackages/pyright-internal/src/tests/completions.test.ts1021//// T2 = TypeVar('T2')
LOWpackages/pyright-internal/src/tests/completions.test.ts1161//// from typing import Generic, TypeVar, Any, List, Dict, Tuple, Mapping, Union
LOWpackages/pyright-internal/src/tests/completions.test.ts1281 },
LOWpackages/pyright-internal/src/tests/completions.test.ts1541 },
LOWpackages/pyright-internal/src/tests/completions.test.ts1621
LOWpackages/pyright-internal/src/tests/completions.test.ts1661 const code = `
LOWpackages/pyright-internal/src/tests/completions.test.ts1721 ],
LOWpackages/pyright-internal/src/tests/completions.test.ts1761 });
366 more matches not shown…
Hyper-Verbose Identifiers356 hits · 368 pts
SeverityFileLineSnippet
LOWpackages/pyright-internal/src/languageServerBase.ts1597 function convertCategoryToSeverity(category: DiagnosticCategory) {
LOWpackages/pyright-internal/src/pyright.ts911function accumulateReportDiagnosticStats(diag: PyrightJsonDiagnostic, report: PyrightJsonResults) {
LOWpackages/pyright-internal/src/pyright.ts921function buildTypeCompletenessReport(
LOWpackages/pyright-internal/src/pyright.ts1045function printTypeCompletenessReportText(results: PyrightJsonResults, verboseOutput: boolean) {
LOWpackages/pyright-internal/src/pyright.ts1254function convertDiagnosticCategoryToSeverity(category: DiagnosticCategory): SeverityLevel {
LOW…/pyright-internal/src/tests/privateImportUsage.test.ts41function createServiceProviderFromFiles(files: { path: string; content: string }[]) {
LOW…/pyright-internal/src/tests/chainedSourceFiles.test.ts465function createServiceWithChainedSourceFiles(basePath: Uri, code: string) {
LOWpackages/pyright-internal/src/tests/service.test.ts685function testSourceFileWatchChange(code: string, expected = true, isFile = true) {
LOWpackages/pyright-internal/src/tests/service.test.ts696function getRegisteredLibraryFileWatchers(root: string, extraPaths: string[], excludes: string[] = []) {
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts511function getSignatureHelpForMarker(state: TestState, markerName: string): SignatureHelp | undefined {
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts148function checkSpecialBuiltInClassDetail(code: string) {
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts167function checkNoDeclarationInClassDetail(code: string) {
LOW…ages/pyright-internal/src/tests/importResolver.test.ts938function createServiceProviderFromFiles(files: { path: string; content: string }[]): ServiceProvider {
LOW…ages/pyright-internal/src/tests/importResolver.test.ts945function createServiceProviderWithCombinedFs(files: { path: string; content: string }[]): ServiceProvider {
LOWpackages/pyright-internal/src/tests/testStateUtils.ts28export function convertFileEditActionToString(edit: FileEditAction): string {
LOWpackages/pyright-internal/src/tests/testStateUtils.ts34export function convertRangeToFileEditAction(state: TestState, range: Range, replacementText?: string): FileEditAction {
LOWpackages/pyright-internal/src/tests/testStateUtils.ts153export function verifyReferencesAtPosition(
LOW…/pyright-internal/src/tests/workspaceEditUtils.test.ts428function applyWorkspaceEditToService(service: AnalyzerService, edits: WorkspaceEdit, filesChanged: Map<string, Uri>) {
LOWpackages/pyright-internal/src/tests/ipythonMode.test.ts564function verifyAnalysisDiagnosticCount(code: string, expectedCount: number, expectedRule?: string) {
LOW…right-internal/src/tests/importResolverSupport.test.ts214 function createFsWithTypeshedLayout() {
LOW…yright-internal/src/tests/benchmarkData/large_class.py364 def transform_metadata_values(self, func: Any) -> Dict[str, Any]:
LOW…ight-internal/src/tests/lsp/languageServerTestUtils.ts370function convertDiagnosticReportItem(
LOW…ight-internal/src/tests/lsp/languageServerTestUtils.ts715function startWorkspaceDiagnostics(info: PyrightServerInfo, extraMessage: string) {
LOWpackages/pyright-internal/src/tests/samples/fstring2.py6def return_right_aligned_string():
LOW…kages/pyright-internal/src/tests/samples/codeFlow11.py37def if_else_untyped_in_one_branch(flag: bool, s: str):
LOWpackages/pyright-internal/src/tests/samples/self2.py125def object_with_concrete_type(
LOWpackages/pyright-internal/src/tests/samples/lambda1.py67def may_need_function_generic(callback: Callable[[_T1], _T1] | None):
LOW…s/pyright-internal/src/tests/samples/matchSequence1.py539def test_tuple_with_subpattern(
LOW…s/pyright-internal/src/tests/samples/matchSequence1.py674def test_tuple_subexpressions(d: D):
LOW…s/pyright-internal/src/tests/samples/matchSequence1.py681def test_unpacked_variadic_regression(
LOWpackages/pyright-internal/src/tests/samples/super7.py36 def classmethod_super_extra_arg(cls, value: int) -> int:
LOWpackages/pyright-internal/src/tests/samples/super7.py51 def staticmethod_super_extra_arg(value: int) -> int:
LOW…ages/pyright-internal/src/tests/samples/matchValue1.py118def test_enum_narrowing_with_annotated(subj: DC1) -> None:
LOW…ages/pyright-internal/src/tests/samples/matchValue1.py146def test_enum_narrowing_with_inf(subj: float):
LOW…yright-internal/src/tests/samples/typeNarrowingAny1.py16def test_any_equality_narrowing(x: Any):
LOW…yright-internal/src/tests/samples/typeNarrowingAny1.py24def test_any_list_comprehension(xs: list[Any]):
LOW…ages/pyright-internal/src/tests/samples/paramSpec21.py39def call_int_context_callback(
LOW…ages/pyright-internal/src/tests/samples/paramSpec21.py53def call_int_context_callable(
LOW…ight-internal/src/tests/samples/dataclassConverter1.py18def converter_with_param_before_args(s: str, *args: int, **kwargs: int) -> int:
LOW…ight-internal/src/tests/samples/dataclassConverter1.py26def converter_with_extra_defaulted_params(
LOW…ight-internal/src/tests/samples/dataclassConverter1.py32def converter_with_default_for_first_param(s: str = "1") -> int:
LOW…ight-internal/src/tests/samples/dataclassConverter1.py36def converter_with_more_specialized_return_type(s: str) -> int:
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py8def test_non_empty_list_literal():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py16def test_non_empty_tuple_literal():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py24def test_non_empty_list_multiple_elements():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py32def test_non_empty_tuple_multiple_elements():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py56def test_non_literal_iterable():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py100def test_break_in_guaranteed_loop():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py109def test_conditional_break_in_guaranteed_loop():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py120def test_for_else_guaranteed_no_break():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py130def test_for_else_guaranteed_with_break():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py141def test_return_in_guaranteed_loop() -> int:
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py150def test_raise_in_guaranteed_loop():
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py158def test_nested_guaranteed_loops():
LOW…es/pyright-internal/src/tests/samples/matchMapping1.py141def test_not_required_narrowing(subj: TD1) -> None:
LOWpackages/pyright-internal/src/tests/harness/testHost.ts71 function isFileSystemCaseSensitive(): boolean {
LOWpackages/pyright-internal/src/tests/harness/testHost.ts109 function getAccessibleFileSystemEntries(dirname: string): FileSystemEntries {
LOW…s/pyright-internal/src/tests/harness/vfs/filesystem.ts1869function isEmptyNonShadowedDirectory(node: DirectoryInode) {
LOW…right-internal/src/tests/harness/vfs/pathValidation.ts150function getInvalidRootComponentRegExp(): RegExp {
LOW…internal/src/tests/harness/fourslash/testStateUtils.ts19export function createVfsInfoFromFourSlashData(projectRoot: string, testData: FourSlashData) {
296 more matches not shown…
Unused Imports498 hits · 321 pts
SeverityFileLineSnippet
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py4
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py4
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py43
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py44
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py45
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py46
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py47
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py48
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py4
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py6
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py4
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py7
LOW…right-internal/src/tests/benchmarkData/import_heavy.py3
LOW…right-internal/src/tests/benchmarkData/import_heavy.py6
LOW…right-internal/src/tests/benchmarkData/import_heavy.py7
LOW…right-internal/src/tests/benchmarkData/import_heavy.py8
LOW…right-internal/src/tests/benchmarkData/import_heavy.py9
LOW…right-internal/src/tests/benchmarkData/import_heavy.py10
LOW…right-internal/src/tests/benchmarkData/import_heavy.py11
LOW…right-internal/src/tests/benchmarkData/import_heavy.py12
LOW…right-internal/src/tests/benchmarkData/import_heavy.py13
LOW…right-internal/src/tests/benchmarkData/import_heavy.py14
LOW…right-internal/src/tests/benchmarkData/import_heavy.py15
LOW…right-internal/src/tests/benchmarkData/import_heavy.py16
LOW…right-internal/src/tests/benchmarkData/import_heavy.py17
LOW…right-internal/src/tests/benchmarkData/import_heavy.py18
LOW…right-internal/src/tests/benchmarkData/import_heavy.py19
LOW…right-internal/src/tests/benchmarkData/import_heavy.py20
LOW…right-internal/src/tests/benchmarkData/import_heavy.py21
LOW…right-internal/src/tests/benchmarkData/import_heavy.py22
LOW…right-internal/src/tests/benchmarkData/import_heavy.py23
LOW…right-internal/src/tests/benchmarkData/import_heavy.py24
LOW…right-internal/src/tests/benchmarkData/import_heavy.py25
LOW…right-internal/src/tests/benchmarkData/import_heavy.py26
LOW…right-internal/src/tests/benchmarkData/import_heavy.py27
LOW…right-internal/src/tests/benchmarkData/import_heavy.py28
LOW…right-internal/src/tests/benchmarkData/import_heavy.py29
LOW…right-internal/src/tests/benchmarkData/import_heavy.py30
LOW…right-internal/src/tests/benchmarkData/import_heavy.py31
LOW…right-internal/src/tests/benchmarkData/import_heavy.py32
LOW…right-internal/src/tests/benchmarkData/import_heavy.py33
LOW…right-internal/src/tests/benchmarkData/import_heavy.py34
LOW…right-internal/src/tests/benchmarkData/import_heavy.py35
LOW…right-internal/src/tests/benchmarkData/import_heavy.py36
LOW…right-internal/src/tests/benchmarkData/import_heavy.py37
LOW…right-internal/src/tests/benchmarkData/import_heavy.py38
LOW…right-internal/src/tests/benchmarkData/import_heavy.py39
LOW…right-internal/src/tests/benchmarkData/import_heavy.py40
LOW…right-internal/src/tests/benchmarkData/import_heavy.py41
LOW…right-internal/src/tests/benchmarkData/import_heavy.py42
LOW…right-internal/src/tests/benchmarkData/import_heavy.py43
LOW…right-internal/src/tests/benchmarkData/import_heavy.py44
LOW…right-internal/src/tests/benchmarkData/import_heavy.py45
LOW…right-internal/src/tests/benchmarkData/import_heavy.py46
LOW…right-internal/src/tests/benchmarkData/import_heavy.py47
LOW…right-internal/src/tests/benchmarkData/import_heavy.py48
LOW…right-internal/src/tests/benchmarkData/import_heavy.py49
LOW…right-internal/src/tests/benchmarkData/import_heavy.py50
LOW…right-internal/src/tests/benchmarkData/import_heavy.py51
LOW…right-internal/src/tests/benchmarkData/import_heavy.py52
438 more matches not shown…
Hallucination Indicators21 hits · 210 pts
SeverityFileLineSnippet
CRITICAL…s/pyright-internal/src/languageService/tooltipUtils.ts498 const name = resolvedDecl.node.d.module.d.nameParts.find((n) => n.d.value === optional.name);
CRITICAL…ght-internal/src/languageService/completionProvider.ts2200 return [entry.d.keyExpr.d.strings.map((s) => s.d.value).join('')];
CRITICALpackages/pyright-internal/src/parser/parser.ts2724 nameParts: importFromNode.d.module.d.nameParts.map((p) => p.d.value),
CRITICALpackages/pyright-internal/src/parser/parser.ts2786 const nameParts = importAsNode.d.module.d.nameParts.map((p) => p.d.value);
CRITICALpackages/pyright-internal/src/parser/parser.ts2802 importAsNode.d.module.d.nameParts.forEach((_, index) => {
CRITICALpackages/pyright-internal/src/common/textEditTracker.ts418 nodeToDelete.d.module.d.nameParts.forEach((n) => this._nodesRemoved.set(n, parseFileResults));
CRITICALpackages/pyright-internal/src/analyzer/checker.ts2465 node.d.funcAnnotationComment.d.paramAnnotations.forEach((expr) => {
CRITICALpackages/pyright-internal/src/analyzer/checker.ts5931 overriddenClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ??
CRITICALpackages/pyright-internal/src/analyzer/checker.ts5943 overrideClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ??
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts289 const initArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'init');
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts308 const kwOnlyArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'kw_only');
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts327 const defaultValueArg = statement.d.rightExpr.d.args.find(
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts335 const defaultFactoryArg = statement.d.rightExpr.d.args.find(
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts346 const aliasArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'alias');
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts358 const converterArg = statement.d.rightExpr.d.args.find(
CRITICALpackages/pyright-internal/src/analyzer/binder.ts2395 node.d.expr.d.items.forEach((itemExpr) => {
CRITICAL…ckages/pyright-internal/src/analyzer/parseTreeUtils.ts2099 node.d.suite.d.statements.forEach((statement) => {
CRITICALpackages/pyright-internal/src/analyzer/typedDicts.ts998 const entryName = entry.d.keyExpr.d.strings.map((s) => s.d.value).join('');
CRITICAL…ges/pyright-internal/src/analyzer/staticExpressions.ts113 const comparisonPlatform = node.d.rightExpr.d.strings.map((s) => s.d.value).join('');
CRITICAL…ges/pyright-internal/src/analyzer/staticExpressions.ts120 const comparisonOsName = node.d.rightExpr.d.strings.map((s) => s.d.value).join('');
CRITICAL…ges/pyright-internal/src/analyzer/staticExpressions.ts137 const comparisonStringName = node.d.rightExpr.d.strings.map((s) => s.d.value).join('');
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippet
HIGH…pyright-internal/src/tests/docStringConversion.test.ts0backticks on a different indentation level don't close the code block. ${tripletick}
HIGH…pyright-internal/src/tests/docStringConversion.test.ts0backticks on a different indentation level don't close the code block. ${tripletick}
HIGH…pyright-internal/src/tests/docStringConversion.test.ts0backticks on a different indentation level don't close the code block. ${tripletick}
HIGH…pyright-internal/src/tests/docStringConversion.test.ts0backticks on a different indentation level don't close the code block. ${tripletick}
HIGH…pyright-internal/src/tests/docStringConversion.test.ts0backticks on a different indentation level don't close the code block. ${tripletick}
HIGH…pyright-internal/src/tests/docStringConversion.test.ts0backticks on a different indentation level don't close the code block. ${tripletick}
Overly Generic Function Names27 hits · 28 pts
SeverityFileLineSnippet
LOW…-internal/src/tests/wildcardImportPackageMerge.test.ts21//// def do_something(value: str) -> None:
LOWpackages/pyright-internal/src/tests/samples/loop12.py8 def do_stuff(self, x: int | None):
LOWpackages/pyright-internal/src/tests/samples/unions1.py33 def helper(value: T) -> T | None: ...
LOW…es/pyright-internal/src/tests/samples/memberAccess4.py13 def do_stuff(self: HasItemProtocol1):
LOW…es/pyright-internal/src/tests/samples/memberAccess4.py47 def do_stuff(cls: type[HasItemProtocol2]):
LOW…ages/pyright-internal/src/tests/samples/assignment1.py11 def do_something(self, num: int) -> str:
LOW…kages/pyright-internal/src/tests/samples/metaclass4.py7 def do_something(self, p1: str, p2: int):
LOW…kages/pyright-internal/src/tests/samples/protocol21.py17def do_something(a: A, class_a: type[A]) -> None:
LOW…ages/pyright-internal/src/tests/samples/paramSpec27.py56def do_something(int_handler: Handler[int], var_args_handler: Handler[P], /) -> None:
LOWpackages/pyright-internal/src/tests/samples/enum6.py38 def do_something(self):
LOW…ckages/pyright-internal/src/tests/samples/optional1.py10 def do_stuff(self):
LOWpackages/pyright-internal/src/tests/samples/super7.py11 def my_method(self, value: int) -> int: ...
LOW…/pyright-internal/src/tests/samples/methodOverride3.py74 def do_stuff(self) -> Iterable[_T_F]: ...
LOW…/pyright-internal/src/tests/samples/methodOverride3.py78 def do_stuff(self) -> Iterable[_T_F]: ...
LOW…es/pyright-internal/src/tests/samples/overloadCall8.py8def my_method(cmd, *args, **kwargs):
LOW…ages/pyright-internal/src/tests/samples/paramSpec11.py19 def do_stuff(self, name: str, *args: _P.args, **kwargs: _P.kwargs) -> int:
LOW…ight-internal/src/tests/samples/constrainedTypeVar2.py68def do_something(value: T3) -> T3: ...
LOWpackages/pyright-internal/src/tests/samples/classes1.py41 def my_method(self) -> "G":
LOW…es/pyright-internal/src/tests/samples/overloadCall2.py22async def test_function():
LOW…kages/pyright-internal/src/tests/samples/tryExcept5.py9 async def do_stuff(self):
LOWpackages/pyright-internal/src/tests/samples/typeVar7.py14 def do_stuff(self) -> int:
LOWpackages/pyright-internal/src/tests/samples/typeVar7.py28 def do_stuff(self) -> float:
LOWpackages/pyright-internal/src/tests/samples/typeVar6.py14 def do_stuff(self) -> int:
LOWpackages/pyright-internal/src/tests/samples/typeVar6.py25 def do_stuff(self) -> float:
LOWpackages/pyright-internal/src/tests/samples/self4.py15 def do_something(self) -> str: ...
LOW…ts/fourslash/completions.import.submodule.fourslash.ts15//// def test_function():
LOW…nal/src/tests/fourslash/import.multipart3.fourslash.ts7//// def do_something(value: str) -> None:
AI Slop Vocabulary9 hits · 27 pts
SeverityFileLineSnippet
MEDIUM…ges/pyright-internal/src/tests/samples/typePrinter2.py1# This sample is used in conjunction with the typePrinter1.py sample.
MEDIUMpackages/pyright-internal/src/tests/samples/final7.py1# This sample is used in conjunction with final8.py to test that imported
MEDIUMpackages/pyright-internal/src/tests/samples/import13.py1# This sample is used in conjunction with import14.py to test
MEDIUM…/pyright-internal/src/tests/samples/protocolModule1.py1# This sample is used in conjunction with protocolModule2.py.
MEDIUMpackages/pyright-internal/src/tests/samples/import14.py1# This sample is used in conjunction with import13.py to test
MEDIUMpackages/pyright-internal/src/tests/samples/call6.py2# used in argument expressions when used in conjunction with
MEDIUM…/pyright-internal/src/tests/samples/protocolModule3.py1# This sample is used in conjunction with protocolModule4.py.
MEDIUM…s/pyright-internal/src/tests/samples/typeVarTuple10.py2# in conjunction with unpacked tuples.
MEDIUMpackages/pyright-internal/src/common/pythonVersion.ts98 // We leverage the fact that the alphabetical ordering
Decorative Section Separators9 hits · 23 pts
SeverityFileLineSnippet
MEDIUM…pyright-internal/src/tests/docStringConversion.test.ts1094 -------------------- ## ------------------------------------------
MEDIUM…pyright-internal/src/tests/docStringConversion.test.ts1110 -------------------- ## ------------------------------------------
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py4#------------------------------------------------------
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py17#------------------------------------------------------
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py26#------------------------------------------------------
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py40#------------------------------------------------------
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py62#------------------------------------------------------
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py80#------------------------------------------------------
MEDIUMpackages/pyright-internal/src/tests/samples/call1.py6# ------------------------------------------------------
Deep Nesting16 hits · 16 pts
SeverityFileLineSnippet
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py98
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py115
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py155
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py170
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py188
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py265
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py397
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py481
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py943
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py1071
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py1601
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py1678
LOWpackages/pyright-internal/src/tests/samples/classes8.py33
LOWpackages/pyright-internal/src/tests/samples/loop16.py7
LOW…ckages/pyright-internal/src/tests/samples/codeFlow4.py87
LOWpackages/pyright-internal/src/tests/samples/loop20.py18
Excessive Try-Catch Wrapping11 hits · 14 pts
SeverityFileLineSnippet
LOW…kages/pyright-internal/src/tests/samples/tryExcept9.py10 except Exception:
LOW…kages/pyright-internal/src/tests/samples/tryExcept9.py26 except Exception:
LOW…ages/pyright-internal/src/tests/samples/tryExcept10.py9 except Exception:
LOW…kages/pyright-internal/src/tests/samples/tryExcept8.py16 except Exception:
MEDIUM…kages/pyright-internal/src/tests/samples/tryExcept8.py11def func2():
LOWpackages/pyright-internal/src/tests/samples/with5.py19 except Exception:
LOWpackages/pyright-internal/src/tests/samples/with5.py30 except Exception:
LOW…ages/pyright-internal/src/tests/samples/paramSpec30.py45 except Exception as ex:
LOW…kages/pyright-internal/src/tests/samples/tryExcept1.py23 except Exception as e:
MEDIUM…kages/pyright-internal/src/tests/samples/tryExcept1.py8def func1():
MEDIUM…kages/pyright-internal/src/tests/samples/tryExcept1.py48def func4():
Self-Referential Comments3 hits · 10 pts
SeverityFileLineSnippet
MEDIUM…ckages/pyright-internal/src/tests/samples/builtins1.py1# This file is intentionally blank. It's used to test
MEDIUM…yright-internal/src/tests/samples/typeNarrowingAny1.py30 # Create an Unknown type
MEDIUM…es/pyright-internal/src/tests/samples/memberAccess2.py30# This class is a data class (because it derives from
Dead Code5 hits · 10 pts
SeverityFileLineSnippet
MEDIUM…ckages/pyright-internal/src/tests/samples/codeFlow1.py48
MEDIUM…ges/pyright-internal/src/tests/samples/unreachable1.py114
MEDIUM…kages/pyright-internal/src/tests/samples/generator6.py9
MEDIUM…kages/pyright-internal/src/tests/samples/generator6.py14
MEDIUM…kages/pyright-internal/src/tests/samples/generator3.py61
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts512//// Lorem Ipsum
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts523 marker: '```python\n(property) test: (self: Self@Test) -> bool\n```\n---\nTest DocString.\n\nReturns\n-------\nb