Repository Analysis

microsoft/pyright

Static Type Checker for Python

7.2 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of microsoft/pyright, a Python project with 15,518 GitHub stars. SynthScan v2.0 examined 301,992 lines of code across 2024 source files, recording 1589 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 7.2 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

7.2
Adjusted Score
7.2
Raw Score
100%
Time Factor
2026-07-10
Last Push
15.5K
Stars
Python
Language
302.0K
Lines of Code
2.0K
Files
1.6K
Pattern Hits
2026-07-14
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 21HIGH 72MEDIUM 32LOW 1464

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1589 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Cross-Language Confusion (JS/TS)66 hits · 535 pts
SeverityFileLineSnippetContext
HIGH…internal/src/typeServer/protocol/typeServerProtocol.ts930 * return NoneCOMMENT
HIGH…pyright-internal/src/tests/docStringConversion.test.ts251print(foo_bar)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts254 print(bar_foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts263print(foo_bar)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts266 print(bar_foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts279print(foo_bar)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts282 print(bar_foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts291print(foo_bar)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts294 print(bar_foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts308 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts310 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts319 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts321 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts335 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts337 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts342 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts344 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts359 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts361 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts370 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts372 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts455 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts457 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts466 print(foo)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts468 print('not foo!')CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts385print(a + foo + 123)CODE
HIGH…pyright-internal/src/tests/docStringConversion.test.ts393print(a + foo + 123)CODE
HIGH…ourslash/hover.docFromSrc.relativeImport2.fourslash.ts8//// return TrueCOMMENT
HIGH…ests/fourslash/hover.inherited.docFromSrc.fourslash.ts8//// return TrueCOMMENT
HIGH…ests/fourslash/hover.inherited.docFromSrc.fourslash.ts14//// return TrueCOMMENT
HIGH…ests/fourslash/hover.inherited.docFromSrc.fourslash.ts27//// return TrueCOMMENT
HIGH…/fourslash/hover.docFromSrc.stubs-package.fourslash.ts19//// return TrueCOMMENT
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts13//// return TrueCOMMENT
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts19//// return TrueCOMMENT
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts24//// return TrueCOMMENT
HIGH…rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts57//// return TrueCOMMENT
HIGH…/fourslash/import.pytyped.typeCheckingOff.fourslash.ts17//// return NoneCOMMENT
HIGH…ests/fourslash/completions.libCodeAndStub.fourslash.ts20//// return TrueCOMMENT
HIGH…ests/fourslash/completions.libCodeAndStub.fourslash.ts24//// return TrueCOMMENT
HIGH…ests/fourslash/completions.libCodeAndStub.fourslash.ts28//// return TrueCOMMENT
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts6//// return TrueCOMMENT
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts9//// return TrueCOMMENT
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts27//// return TrueCOMMENT
HIGH…sts/fourslash/hover.inherited.docFromStub.fourslash.ts30//// return TrueCOMMENT
HIGH…tests/fourslash/completions.libCodeNoStub.fourslash.ts20//// return TrueCOMMENT
HIGH…tests/fourslash/completions.libCodeNoStub.fourslash.ts24//// return TrueCOMMENT
HIGH…tests/fourslash/completions.libCodeNoStub.fourslash.ts28//// return TrueCOMMENT
HIGH…fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.ts11//// return TrueCOMMENT
HIGH…ourslash/import.pytyped.typeCheckingBasic.fourslash.ts17//// return NoneCOMMENT
HIGH…l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts14//// return TrueCOMMENT
HIGH…l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts18//// return TrueCOMMENT
HIGH…l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts22//// return TrueCOMMENT
HIGH…/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts14//// return TrueCOMMENT
HIGH…/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts18//// return TrueCOMMENT
HIGH…/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts22//// return TrueCOMMENT
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts8//// return TrueCOMMENT
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts13//// return TrueCOMMENT
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts30//// return TrueCOMMENT
HIGH…rslash/hover.inherited.docFromSrcWithStub.fourslash.ts33//// return TrueCOMMENT
HIGH…fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.ts13//// return TrueCOMMENT
6 more matches not shown…
Over-Commented Block461 hits · 458 pts
SeverityFileLineSnippetContext
LOWpackages/pyright-internal/jest.config.js1/*COMMENT
LOW…yright-internal/src/tests/importStatementUtils.test.ts281// @filename: pkg/nnn.pyCOMMENT
LOW…yright-internal/src/tests/importStatementUtils.test.ts301 // inserts stay as separate same-range edits instead of merging. When applyTextEditsToStringCOMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts21// @filename: io2/tools/__init__.pyCOMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts41//// from .[|io2|].tools import pathUtils as pCOMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts81//// def getFilename(path):COMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts121COMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts141////COMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts181//// from io2.tools import pathUtils as pathUtilsCOMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts201//// from .io2 import tools as tCOMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts241 const code = `COMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts261//// pathUtils.getFilename("c")COMMENT
LOW…ght-internal/src/tests/documentSymbolCollector.test.ts301});COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts41COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts81COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts121// @library: trueCOMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts181 const code = `COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts241// @filename: test.pyCOMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts301test('function hover does not substitute unsafe multiline defaults for stub ellipsis defaults', async () => {COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts341COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts401// @filename: pyrightconfig.jsonCOMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts441// @library: trueCOMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts501//// class Test:COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts561test('import symbol tooltip - useLibraryCodeForTypes true', async () => {COMMENT
LOWpackages/pyright-internal/src/tests/parser.test.ts421 // the isLazy flag too (otherwise downstream consumers readingCOMMENT
LOWpackages/pyright-internal/src/tests/testState.test.ts61//// ],COMMENT
LOWpackages/pyright-internal/src/tests/testState.test.ts81//// "pythonVersion": "3.6",COMMENT
LOWpackages/pyright-internal/src/tests/testState.test.ts101//// {COMMENT
LOWpackages/pyright-internal/src/tests/testState.test.ts521////COMMENT
LOWpackages/pyright-internal/src/tests/testState.test.ts561//// from dataclasses import dataclass, InitVarCOMMENT
LOWpackages/pyright-internal/src/tests/testState.test.ts581//// # parameter types don't match.COMMENT
LOW…s/pyright-internal/src/tests/sourceMapperUtils.test.ts201//// from typing import MappingCOMMENT
LOW…s/pyright-internal/src/tests/sourceMapperUtils.test.ts261COMMENT
LOW…s/pyright-internal/src/tests/sourceMapperUtils.test.ts281//// class MutableMapping:COMMENT
LOW…s/pyright-internal/src/tests/sourceMapperUtils.test.ts421//// class MutableMapping:COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts61});COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts141COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts181 assert.strictEqual(actual.signatures[0].label, '(a: int = 3, b: str = "hello") -> None');COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts241// @filename: pyrightconfig.jsonCOMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts301//// {COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts341//// "useLibraryCodeForTypes": trueCOMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts381//// }COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts421COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts461//// import mylibCOMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts501 checkSignatureHelp(code, true);COMMENT
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts541////COMMENT
LOW…-internal/src/tests/wildcardImportPackageMerge.test.ts21//// def do_something(value: str) -> None:COMMENT
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts21 const code = `COMMENT
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts101COMMENT
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts161 }COMMENT
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts201 const code = `COMMENT
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts341COMMENT
LOW…ages/pyright-internal/src/tests/parseTreeUtils.test.ts381 const code = `COMMENT
LOWpackages/pyright-internal/src/tests/ipythonMode.test.ts161// @ipythonMode: trueCOMMENT
LOWpackages/pyright-internal/src/tests/ipythonMode.test.ts441 });COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts81});COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts121// @filename: pyrightconfig.jsonCOMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts221 },COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts861test('auto import sort text', async () => {COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts1041COMMENT
401 more matches not shown…
Hyper-Verbose Identifiers402 hits · 414 pts
SeverityFileLineSnippetContext
LOWpackages/pyright-internal/src/languageServerBase.ts1613 function convertCategoryToSeverity(category: DiagnosticCategory) {CODE
LOWpackages/pyright-internal/src/pyright.ts911function accumulateReportDiagnosticStats(diag: PyrightJsonDiagnostic, report: PyrightJsonResults) {CODE
LOWpackages/pyright-internal/src/pyright.ts921function buildTypeCompletenessReport(CODE
LOWpackages/pyright-internal/src/pyright.ts1045function printTypeCompletenessReportText(results: PyrightJsonResults, verboseOutput: boolean) {CODE
LOWpackages/pyright-internal/src/pyright.ts1254function convertDiagnosticCategoryToSeverity(category: DiagnosticCategory): SeverityLevel {CODE
LOW…ges/pyright-internal/src/typeServer/diagnosticUtils.ts24function convertCategoryToSeverity(category: DiagnosticCategory): DiagnosticSeverity {CODE
LOW…ges/pyright-internal/src/typeServer/diagnosticUtils.ts43export function convertFromPyrightDiagnostic(CODE
LOW…t-internal/src/typeServer/typeServerConversionUtils.ts126function toProtocolTypesOrUndefined(CODE
LOW…t-internal/src/typeServer/typeServerConversionUtils.ts141function toProtocolTypeOrUndefined(CODE
LOW…t-internal/src/typeServer/typeServerConversionUtils.ts377function toProtocolSpecializedFunctionTypesOrUndefined(CODE
LOW…kages/pyright-internal/src/typeServer/stubGenerator.ts124export function generateStubFromFunctionType(CODE
LOW…kages/pyright-internal/src/typeServer/stubGenerator.ts327function getReturnTypeStringFromFunction(type: PyrightTypes.FunctionType, context: StubGenerationContext): string {CODE
LOW…kages/pyright-internal/src/typeServer/stubGenerator.ts367function extractModuleImportsFromTypeString(CODE
LOW…kages/pyright-internal/src/typeServer/stubGenerator.ts510export function generateStubFromClassType(CODE
LOW…kages/pyright-internal/src/typeServer/stubGenerator.ts962function collectTypeVarsFromFunctionSignature(type: PyrightTypes.FunctionType): PyrightTypes.TypeVarType[] {CODE
LOW…kages/pyright-internal/src/typeServer/stubGenerator.ts1012function generateTypeVarDeclarations(typeParams: PyrightTypes.TypeVarType[], context: StubGenerationContext): string[] {CODE
LOW…kages/pyright-internal/src/typeServer/typeEvalUtils.ts83export function getEffectiveTypeOfDeclaration(CODE
LOW…s/pyright-internal/src/typeServer/notebookCellChain.ts49export function getDefaultPrefixCellContents(): string {CODE
LOW…s/pyright-internal/src/typeServer/notebookCellChain.ts269function updateCellChainedFilePath(notebookData: NotebookData, workspace: Workspace, cellIndex: number) {CODE
LOW…pyright-internal/src/typeServer/typeServerEvaluator.ts34export function createTypeServerEvaluator(program: Program, symbolLookup: ISymbolLookup): ITypeServerEvaluator {CODE
LOWpackages/pyright-internal/src/typeServer/enums.ts325export function transformTypeForEnumMember(CODE
LOW…t-internal/src/typeServer/typeServerConversionTypes.ts337export function getSymbolNameFromDeclaration(declaration: PyrightDecl.Declaration): string | undefined {CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py403 def _handle_undefined_in_type(self, ts_type: str) -> Tuple[str, bool]:CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py327 def _parse_interface_properties(self, body: str) -> List[Dict[str, Any]]:CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py664 def _parse_notification_namespace(self, name: str, body: str) -> None:CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py698 def _extract_documentation_from_namespace(self, name: str, body: str) -> str:CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py821 def _parse_inline_object_type(self, obj_str: str) -> Dict:CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py900 def _create_inline_object_definition(self, content: str) -> Dict:CODE
LOW…/pyright-internal/src/tests/privateImportUsage.test.ts41function createServiceProviderFromFiles(files: { path: string; content: string }[]) {CODE
LOW…/pyright-internal/src/tests/chainedSourceFiles.test.ts465function createServiceWithChainedSourceFiles(basePath: Uri, code: string) {CODE
LOWpackages/pyright-internal/src/tests/service.test.ts685function testSourceFileWatchChange(code: string, expected = true, isFile = true) {CODE
LOWpackages/pyright-internal/src/tests/service.test.ts696function getRegisteredLibraryFileWatchers(root: string, extraPaths: string[], excludes: string[] = []) {CODE
LOW…s/pyright-internal/src/tests/sourceMapperUtils.test.ts418function getTypeshedStdlibAliasChainCode() {CODE
LOW…s/pyright-internal/src/tests/sourceMapperUtils.test.ts454function createAnalyzerServiceFromCode(code: string, pythonSearchPaths: string[], options?: CustomAnalyzerOptions) {CODE
LOW…kages/pyright-internal/src/tests/signatureHelp.test.ts592function getSignatureHelpForMarker(state: TestState, markerName: string): SignatureHelp | undefined {CODE
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts148function checkSpecialBuiltInClassDetail(code: string) {CODE
LOW…es/pyright-internal/src/tests/classDeclaration.test.ts167function checkNoDeclarationInClassDetail(code: string) {CODE
LOW…ages/pyright-internal/src/tests/importResolver.test.ts1132function createServiceProviderFromFiles(files: { path: string; content: string }[]): ServiceProvider {CODE
LOW…ages/pyright-internal/src/tests/importResolver.test.ts1139function createServiceProviderWithCombinedFs(files: { path: string; content: string }[]): ServiceProvider {CODE
LOWpackages/pyright-internal/src/tests/testStateUtils.ts28export function convertFileEditActionToString(edit: FileEditAction): string {CODE
LOWpackages/pyright-internal/src/tests/testStateUtils.ts34export function convertRangeToFileEditAction(state: TestState, range: Range, replacementText?: string): FileEditAction {CODE
LOWpackages/pyright-internal/src/tests/testStateUtils.ts153export function verifyReferencesAtPosition(CODE
LOW…/pyright-internal/src/tests/workspaceEditUtils.test.ts479function applyWorkspaceEditToService(service: AnalyzerService, edits: WorkspaceEdit, filesChanged: Map<string, Uri>) {CODE
LOWpackages/pyright-internal/src/tests/ipythonMode.test.ts564function verifyAnalysisDiagnosticCount(code: string, expectedCount: number, expectedRule?: string) {CODE
LOW…right-internal/src/tests/importResolverSupport.test.ts214 function createFsWithTypeshedLayout() {CODE
LOW…yright-internal/src/tests/benchmarkData/large_class.py364 def transform_metadata_values(self, func: Any) -> Dict[str, Any]:CODE
LOW…rnal/src/tests/typeServer/inProcTypeServerTestUtils.ts62export async function initializeDependenciesForInProcTests() {CODE
LOW…rnal/src/tests/typeServer/inProcTypeServerTestUtils.ts126async function runWithConnectionErrorGuard(CODE
LOW…ight-internal/src/tests/lsp/languageServerTestUtils.ts267function updateConfigurationSection(CODE
LOW…ight-internal/src/tests/lsp/languageServerTestUtils.ts419function convertDiagnosticReportItem(CODE
LOW…ight-internal/src/tests/lsp/languageServerTestUtils.ts771function startWorkspaceDiagnostics(info: PyrightServerInfo, extraMessage: string) {CODE
LOWpackages/pyright-internal/src/tests/samples/fstring2.py6def return_right_aligned_string():CODE
LOW…kages/pyright-internal/src/tests/samples/codeFlow11.py37def if_else_untyped_in_one_branch(flag: bool, s: str):CODE
LOWpackages/pyright-internal/src/tests/samples/self2.py125def object_with_concrete_type(CODE
LOWpackages/pyright-internal/src/tests/samples/lambda1.py67def may_need_function_generic(callback: Callable[[_T1], _T1] | None):CODE
LOWpackages/pyright-internal/src/tests/samples/with7.py15def test_generic_bool_context_manager() -> None:CODE
LOWpackages/pyright-internal/src/tests/samples/with7.py33def test_multi_typevar_context_manager() -> None:CODE
LOW…s/pyright-internal/src/tests/samples/matchSequence1.py539def test_tuple_with_subpattern(CODE
LOW…s/pyright-internal/src/tests/samples/matchSequence1.py674def test_tuple_subexpressions(d: D):CODE
LOW…s/pyright-internal/src/tests/samples/matchSequence1.py681def test_unpacked_variadic_regression(CODE
342 more matches not shown…
Unused Imports500 hits · 322 pts
SeverityFileLineSnippetContext
LOW…ight-internal/src/typeServer/protocol/generate_json.py18CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py1055CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py4CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py4CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py43CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py44CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py45CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py46CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py47CODE
LOW…ight-internal/src/tests/benchmarkData/comment_heavy.py48CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py4CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py6CODE
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py4CODE
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py7CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py3CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py6CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py7CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py8CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py9CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py10CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py11CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py12CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py13CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py14CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py15CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py16CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py17CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py18CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py19CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py20CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py21CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py22CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py23CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py24CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py25CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py26CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py27CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py28CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py29CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py30CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py31CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py32CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py33CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py34CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py35CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py36CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py37CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py38CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py39CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py40CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py41CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py42CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py43CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py44CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py45CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py46CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py47CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py48CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py49CODE
LOW…right-internal/src/tests/benchmarkData/import_heavy.py50CODE
440 more matches not shown…
Hallucination Indicators21 hits · 210 pts
SeverityFileLineSnippetContext
CRITICAL…s/pyright-internal/src/languageService/tooltipUtils.ts523 const name = resolvedDecl.node.d.module.d.nameParts.find((n) => n.d.value === optional.name);CODE
CRITICAL…ght-internal/src/languageService/completionProvider.ts2441 return [entry.d.keyExpr.d.strings.map((s) => s.d.value).join('')];CODE
CRITICALpackages/pyright-internal/src/parser/parser.ts2754 nameParts: importFromNode.d.module.d.nameParts.map((p) => p.d.value),CODE
CRITICALpackages/pyright-internal/src/parser/parser.ts2816 const nameParts = importAsNode.d.module.d.nameParts.map((p) => p.d.value);CODE
CRITICALpackages/pyright-internal/src/parser/parser.ts2832 importAsNode.d.module.d.nameParts.forEach((_, index) => {CODE
CRITICALpackages/pyright-internal/src/common/textEditTracker.ts424 nodeToDelete.d.module.d.nameParts.forEach((n) => this._nodesRemoved.set(n, parseFileResults));CODE
CRITICALpackages/pyright-internal/src/analyzer/checker.ts2486 node.d.funcAnnotationComment.d.paramAnnotations.forEach((expr) => {CODE
CRITICALpackages/pyright-internal/src/analyzer/checker.ts5952 overriddenClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ??CODE
CRITICALpackages/pyright-internal/src/analyzer/checker.ts5964 overrideClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ??CODE
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts289 const initArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'init');CODE
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts308 const kwOnlyArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'kw_only');CODE
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts327 const defaultValueArg = statement.d.rightExpr.d.args.find(CODE
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts335 const defaultFactoryArg = statement.d.rightExpr.d.args.find(CODE
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts346 const aliasArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'alias');CODE
CRITICALpackages/pyright-internal/src/analyzer/dataClasses.ts358 const converterArg = statement.d.rightExpr.d.args.find(CODE
CRITICALpackages/pyright-internal/src/analyzer/binder.ts2421 node.d.expr.d.items.forEach((itemExpr) => {CODE
CRITICAL…ckages/pyright-internal/src/analyzer/parseTreeUtils.ts2099 node.d.suite.d.statements.forEach((statement) => {CODE
CRITICALpackages/pyright-internal/src/analyzer/typedDicts.ts998 const entryName = entry.d.keyExpr.d.strings.map((s) => s.d.value).join('');CODE
CRITICAL…ges/pyright-internal/src/analyzer/staticExpressions.ts168 const comparisonPlatform = node.d.rightExpr.d.strings.map((s) => s.d.value).join('');CODE
CRITICAL…ges/pyright-internal/src/analyzer/staticExpressions.ts175 const comparisonOsName = node.d.rightExpr.d.strings.map((s) => s.d.value).join('');CODE
CRITICAL…ges/pyright-internal/src/analyzer/staticExpressions.ts192 const comparisonStringName = node.d.rightExpr.d.strings.map((s) => s.d.value).join('');CODE
Overly Generic Function Names35 hits · 40 pts
SeverityFileLineSnippetContext
LOW…internal/src/typeServer/protocol/typeServerProtocol.ts467 * - Regular: `def my_function():` - has source code nodeCOMMENT
LOW…internal/src/typeServer/protocol/typeServerProtocol.ts513 * def my_function(x: int) -> str: # Function declarationCOMMENT
LOW…internal/src/typeServer/protocol/typeServerProtocol.ts583 * def my_function(x: int) -> str: # RegularDeclarationCOMMENT
LOW…internal/src/typeServer/protocol/typeServerProtocol.ts814 * def my_function(x: int) -> str: # FunctionType with TypeKind.FunctionCOMMENT
LOW…-internal/src/tests/wildcardImportPackageMerge.test.ts21//// def do_something(value: str) -> None:COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts2097//// def my_function(): ...COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts2143//// def my_function(): ...COMMENT
LOWpackages/pyright-internal/src/tests/samples/loop12.py8 def do_stuff(self, x: int | None):CODE
LOWpackages/pyright-internal/src/tests/samples/unions1.py33 def helper(value: T) -> T | None: ...CODE
LOW…es/pyright-internal/src/tests/samples/memberAccess4.py13 def do_stuff(self: HasItemProtocol1):CODE
LOW…es/pyright-internal/src/tests/samples/memberAccess4.py47 def do_stuff(cls: type[HasItemProtocol2]):CODE
LOW…ages/pyright-internal/src/tests/samples/assignment1.py11 def do_something(self, num: int) -> str:CODE
LOW…kages/pyright-internal/src/tests/samples/metaclass4.py7 def do_something(self, p1: str, p2: int):CODE
LOW…kages/pyright-internal/src/tests/samples/protocol21.py17def do_something(a: A, class_a: type[A]) -> None:CODE
LOW…ages/pyright-internal/src/tests/samples/paramSpec27.py56def do_something(int_handler: Handler[int], var_args_handler: Handler[P], /) -> None:CODE
LOWpackages/pyright-internal/src/tests/samples/enum6.py38 def do_something(self):CODE
LOW…ckages/pyright-internal/src/tests/samples/optional1.py14 def do_stuff(self):CODE
LOWpackages/pyright-internal/src/tests/samples/super7.py11 def my_method(self, value: int) -> int: ...CODE
LOW…/pyright-internal/src/tests/samples/methodOverride3.py74 def do_stuff(self) -> Iterable[_T_F]: ...CODE
LOW…/pyright-internal/src/tests/samples/methodOverride3.py78 def do_stuff(self) -> Iterable[_T_F]: ...CODE
LOW…es/pyright-internal/src/tests/samples/overloadCall8.py8def my_method(cmd, *args, **kwargs):CODE
LOW…ages/pyright-internal/src/tests/samples/paramSpec11.py19 def do_stuff(self, name: str, *args: _P.args, **kwargs: _P.kwargs) -> int:CODE
LOW…ight-internal/src/tests/samples/constrainedTypeVar2.py68def do_something(value: T3) -> T3: ...CODE
LOWpackages/pyright-internal/src/tests/samples/classes1.py41 def my_method(self) -> "G":CODE
LOW…es/pyright-internal/src/tests/samples/overloadCall2.py22async def test_function():CODE
LOW…kages/pyright-internal/src/tests/samples/tryExcept5.py9 async def do_stuff(self):CODE
LOWpackages/pyright-internal/src/tests/samples/typeVar7.py14 def do_stuff(self) -> int:CODE
LOWpackages/pyright-internal/src/tests/samples/typeVar7.py28 def do_stuff(self) -> float:CODE
LOWpackages/pyright-internal/src/tests/samples/typeVar6.py14 def do_stuff(self) -> int:CODE
LOWpackages/pyright-internal/src/tests/samples/typeVar6.py25 def do_stuff(self) -> float:CODE
LOWpackages/pyright-internal/src/tests/samples/self4.py15 def do_something(self) -> str: ...CODE
LOW…ts/fourslash/completions.import.submodule.fourslash.ts15//// def test_function():COMMENT
LOW…nal/src/tests/fourslash/import.multipart3.fourslash.ts7//// def do_something(value: str) -> None:COMMENT
LOW…ostics.missingModuleSource.compiledModule.fourslash.ts76//// def helper() -> int: ...COMMENT
LOW…stics.missingModuleSource.nativeSubmodule.fourslash.ts37//// def helper() -> int: ...COMMENT
AI Response Leakage4 hits · 30 pts
SeverityFileLineSnippetContext
HIGHdocs/type-inference.md74# In this example, symbol var1 has an inferred type of `str | int`.COMMENT
HIGHdocs/type-inference.md82# In this example, symbol var2 has an inferred type of `Foo | None`.COMMENT
HIGHdocs/type-inference.md368# In this example, the types of the lambda’s input parametersCOMMENT
HIGH…right-internal/src/tests/samples/solverHigherOrder1.py2# variables during TypeVar solving. In this example, weCOMMENT
AI Slop Vocabulary9 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUM…ges/pyright-internal/src/tests/samples/typePrinter2.py1# This sample is used in conjunction with the typePrinter1.py sample.COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/final7.py1# This sample is used in conjunction with final8.py to test that importedCOMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/import13.py1# This sample is used in conjunction with import14.py to testCOMMENT
MEDIUM…/pyright-internal/src/tests/samples/protocolModule1.py1# This sample is used in conjunction with protocolModule2.py.COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/import14.py1# This sample is used in conjunction with import13.py to testCOMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/call6.py2# used in argument expressions when used in conjunction withCOMMENT
MEDIUM…/pyright-internal/src/tests/samples/protocolModule3.py1# This sample is used in conjunction with protocolModule4.py.COMMENT
MEDIUM…s/pyright-internal/src/tests/samples/typeVarTuple10.py2# in conjunction with unpacked tuples.COMMENT
MEDIUMpackages/pyright-internal/src/common/pythonVersion.ts98 // We leverage the fact that the alphabetical orderingCOMMENT
Decorative Section Separators9 hits · 23 pts
SeverityFileLineSnippetContext
MEDIUM…pyright-internal/src/tests/docStringConversion.test.ts1094 -------------------- ## ------------------------------------------CODE
MEDIUM…pyright-internal/src/tests/docStringConversion.test.ts1110 -------------------- ## ------------------------------------------CODE
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py4#------------------------------------------------------COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py17#------------------------------------------------------COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py26#------------------------------------------------------COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py40#------------------------------------------------------COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py62#------------------------------------------------------COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/lambda1.py80#------------------------------------------------------COMMENT
MEDIUMpackages/pyright-internal/src/tests/samples/call1.py6# ------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping15 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUM…ight-internal/src/typeServer/protocol/generate_json.py1107 print(f"Error running prettier command {' '.join(cmd)}: {e}")CODE
MEDIUM…ight-internal/src/typeServer/protocol/generate_json.py1035 print(f"Error: TypeScript file not found: {ts_file}")CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py1106 except Exception as e:CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py1113 except Exception as e:CODE
LOW…kages/pyright-internal/src/tests/samples/tryExcept9.py10 except Exception:CODE
LOW…kages/pyright-internal/src/tests/samples/tryExcept9.py26 except Exception:CODE
LOW…ages/pyright-internal/src/tests/samples/tryExcept10.py9 except Exception:CODE
LOW…kages/pyright-internal/src/tests/samples/tryExcept8.py16 except Exception:CODE
MEDIUM…kages/pyright-internal/src/tests/samples/tryExcept8.py11def func2():CODE
LOWpackages/pyright-internal/src/tests/samples/with5.py19 except Exception:CODE
LOWpackages/pyright-internal/src/tests/samples/with5.py30 except Exception:CODE
LOW…ages/pyright-internal/src/tests/samples/paramSpec30.py45 except Exception as ex:CODE
LOW…kages/pyright-internal/src/tests/samples/tryExcept1.py23 except Exception as e:CODE
MEDIUM…kages/pyright-internal/src/tests/samples/tryExcept1.py8def func1():CODE
MEDIUM…kages/pyright-internal/src/tests/samples/tryExcept1.py48def func4():CODE
Deep Nesting26 hits · 21 pts
SeverityFileLineSnippetContext
LOW…ight-internal/src/typeServer/protocol/generate_json.py1028CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py95CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py219CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py327CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py451CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py525CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py555CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py698CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py770CODE
LOW…ight-internal/src/typeServer/protocol/generate_json.py931CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py98CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py115CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py155CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py170CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py188CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py265CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py397CODE
LOW…yright-internal/src/tests/benchmarkData/union_heavy.py481CODE
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py943CODE
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py1071CODE
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py1601CODE
LOW…right-internal/src/tests/benchmarkData/large_stdlib.py1678CODE
LOWpackages/pyright-internal/src/tests/samples/classes8.py33CODE
LOWpackages/pyright-internal/src/tests/samples/loop16.py7CODE
LOW…ckages/pyright-internal/src/tests/samples/codeFlow4.py87CODE
LOWpackages/pyright-internal/src/tests/samples/loop20.py18CODE
Modern Structural Boilerplate18 hits · 21 pts
SeverityFileLineSnippetContext
LOW…rnal/src/tests/benchmarkData/repetitive_identifiers.py29 def set_x(self, x: T) -> None:CODE
LOW…rnal/src/tests/benchmarkData/repetitive_identifiers.py32 def set_y(self, y: K) -> None:CODE
LOW…rnal/src/tests/benchmarkData/repetitive_identifiers.py35 def set_z(self, z: V) -> None:CODE
LOW…rnal/src/tests/benchmarkData/repetitive_identifiers.py67 def set_x(self, x: T) -> None:CODE
LOW…rnal/src/tests/benchmarkData/repetitive_identifiers.py70 def set_y(self, y: K) -> None:CODE
LOW…rnal/src/tests/benchmarkData/repetitive_identifiers.py73 def set_z(self, z: V) -> None:CODE
LOW…yright-internal/src/tests/benchmarkData/large_class.py195 def set_item(self, index: int, value: Any) -> None:CODE
LOW…yright-internal/src/tests/benchmarkData/large_class.py331 def set_metadata(self, key: str, value: Any) -> None:CODE
LOW…yright-internal/src/tests/benchmarkData/large_class.py428 def set_flags(self, flags: Set[str]) -> None:CODE
LOW…yright-internal/src/tests/benchmarkData/large_class.py649 def set_counter(self, value: int) -> None:CODE
LOW…yright-internal/src/tests/benchmarkData/large_class.py840 def set_version(self, version: int) -> None:CODE
LOWpackages/pyright-internal/src/tests/samples/import3.py3__all__ = ["foo", "_foo", "_bar"]CODE
LOW…kages/pyright-internal/src/tests/samples/dunderAll2.py9__all__ = ["a", "b", "c", "d"]CODE
LOW…es/pyright-internal/src/tests/samples/autoVariance1.py157 def set_value(self, value: T) -> None:CODE
LOW…right-internal/src/tests/samples/typedDictReadOnly2.py211def update_a(a: TD18, b: TD19) -> None:CODE
LOWpackages/pyright-internal/src/tests/samples/private3.py4__all__ = ["_exported_via_all", "Public"]CODE
LOW…kages/pyright-internal/src/tests/samples/dunderAll1.py14__all__ = ["test", "hello"]CODE
LOW…kages/pyright-internal/src/tests/samples/dunderAll1.py26__all__ = ["test", my_string]CODE
Self-Referential Comments4 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUM…ight-internal/src/typeServer/protocol/generate_json.py56 # Create a version without comments for parsing structureCOMMENT
MEDIUM…ckages/pyright-internal/src/tests/samples/builtins1.py1# This file is intentionally blank. It's used to testCOMMENT
MEDIUM…yright-internal/src/tests/samples/typeNarrowingAny1.py30 # Create an Unknown typeCOMMENT
MEDIUM…es/pyright-internal/src/tests/samples/memberAccess2.py30# This class is a data class (because it derives fromCOMMENT
Redundant / Tautological Comments7 hits · 12 pts
SeverityFileLineSnippetContext
LOW…ight-internal/src/typeServer/protocol/generate_json.py415 # Check if the top-level type ends with "| undefined"COMMENT
LOW…ight-internal/src/typeServer/protocol/generate_json.py419 # Check if undefined is one of the top-level union partsCOMMENT
LOW…ight-internal/src/typeServer/protocol/generate_json.py178 # Check if this has a string valueCOMMENT
LOW…ight-internal/src/typeServer/protocol/generate_json.py372 # Check if the type ends with "| undefined" - make it optional and strip undefinedCOMMENT
LOW…ight-internal/src/typeServer/protocol/generate_json.py475 # Check if this is a string literal union like 'unknown' | 'any' | ...COMMENT
LOW…ight-internal/src/typeServer/protocol/generate_json.py982 # Check if Range is imported and used but not definedCOMMENT
LOW…ight-internal/src/typeServer/protocol/generate_json.py1007 # Check if Position is needed (referenced by Range)COMMENT
Cross-Language Confusion2 hits · 11 pts
SeverityFileLineSnippetContext
HIGH…ight-internal/src/typeServer/protocol/generate_json.py455 # Handle parenthesized types like (Type | undefined)[]COMMENT
HIGH…ight-internal/src/typeServer/protocol/generate_json.py410 - "(Type | undefined)[] | undefined" -> ("(Type | undefined)[]", True)STRING
Dead Code5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUM…ckages/pyright-internal/src/tests/samples/codeFlow1.py48CODE
MEDIUM…ges/pyright-internal/src/tests/samples/unreachable1.py114CODE
MEDIUM…kages/pyright-internal/src/tests/samples/generator6.py9CODE
MEDIUM…kages/pyright-internal/src/tests/samples/generator6.py14CODE
MEDIUM…kages/pyright-internal/src/tests/samples/generator3.py61CODE
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOW…es/pyright-internal/src/tests/samples/genericType47.py34CODE
LOW…es/pyright-internal/src/tests/samples/genericType23.py13CODE
LOW…kages/pyright-internal/src/tests/samples/decorator5.py9CODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts512//// Lorem IpsumCOMMENT
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-------\nbCODE