Repository Analysis

DetachHead/basedpyright

pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server

7.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of DetachHead/basedpyright, a TypeScript project with 3,479 GitHub stars. SynthScan v2.0 examined 291,469 lines of code across 2134 source files, recording 1586 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 7.5 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.5
Adjusted Score
7.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
3.5K
Stars
TypeScript
Language
291.5K
Lines of Code
2.1K
Files
1.6K
Pattern Hits
2026-07-14
Scan Date
0.04
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 23HIGH 71MEDIUM 29LOW 1463

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 1586 distinct pattern matches across 17 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)65 hits · 528 pts
SeverityFileLineSnippetContext
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
HIGH…ourslash/hover.docFromSrc.relativeImport1.fourslash.ts8//// return TrueCOMMENT
5 more matches not shown…
Over-Commented Block480 hits · 477 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
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts681});COMMENT
LOW…kages/pyright-internal/src/tests/hoverProvider.test.ts701//// from typing import NotRequired, TypedDictCOMMENT
LOWpackages/pyright-internal/src/tests/parser.test.ts421 // the isLazy flag too (otherwise downstream consumers readingCOMMENT
LOWpackages/pyright-internal/src/tests/service.test.ts381//// {COMMENT
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.ts301test('completion from import statement tooltip - child module', async () => {COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts1061COMMENT
420 more matches not shown…
Hyper-Verbose Identifiers385 hits · 394 pts
SeverityFileLineSnippetContext
LOWtests/test_generate_docstubs.py50def test_windows_only_docstring():STRING
LOWtests/test_generate_docstubs.py60def test_linux_or_mac_only_docstring():STRING
LOWtests/test_generate_docstubs.py80def test_newer_python_version_docstring():STRING
LOWtests/test_generate_docstubs.py105def test_older_python_version_docstring():STRING
LOWpackages/pyright-internal/src/languageServerBase.ts2228 function convertCategoryToSeverity(category: DiagnosticCategory) {CODE
LOWpackages/pyright-internal/src/pyright.ts1012function accumulateReportDiagnosticStats(diag: PyrightJsonDiagnostic, report: PyrightJsonResults) {CODE
LOWpackages/pyright-internal/src/pyright.ts1022function buildTypeCompletenessReport(CODE
LOWpackages/pyright-internal/src/pyright.ts1146function printTypeCompletenessReportText(results: PyrightJsonResults, verboseOutput: boolean) {CODE
LOWpackages/pyright-internal/src/pyright.ts1289function reportDiagnosticsAsJsonWithoutLogging(CODE
LOWpackages/pyright-internal/src/pyright.ts1366function convertDiagnosticCategoryToSeverity(category: DiagnosticCategory): SeverityLevel {CODE
LOW…/pyright-internal/src/tests/privateImportUsage.test.ts41function createServiceProviderFromFiles(files: { path: string; content: string }[]) {CODE
LOW…/pyright-internal/src/tests/chainedSourceFiles.test.ts471function createServiceWithChainedSourceFiles(basePath: Uri, code: string) {CODE
LOWpackages/pyright-internal/src/tests/service.test.ts686function testSourceFileWatchChange(code: string, expected = true, isFile = true) {CODE
LOWpackages/pyright-internal/src/tests/service.test.ts697function 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.ts1136function createServiceProviderFromFiles(files: { path: string; content: string }[]): ServiceProvider {CODE
LOW…ages/pyright-internal/src/tests/importResolver.test.ts1143function 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.ts492function 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…ight-internal/src/tests/lsp/languageServerTestUtils.ts270function updateConfigurationSection(CODE
LOW…ight-internal/src/tests/lsp/languageServerTestUtils.ts422function convertDiagnosticReportItem(CODE
LOW…ight-internal/src/tests/lsp/languageServerTestUtils.ts778function 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
LOWpackages/pyright-internal/src/tests/samples/super7.py36 def classmethod_super_extra_arg(cls, value: int) -> int:CODE
LOWpackages/pyright-internal/src/tests/samples/super7.py51 def staticmethod_super_extra_arg(value: int) -> int:CODE
LOW…ages/pyright-internal/src/tests/samples/matchValue1.py118def test_enum_narrowing_with_annotated(subj: DC1) -> None:CODE
LOW…ages/pyright-internal/src/tests/samples/matchValue1.py146def test_enum_narrowing_with_inf(subj: float):CODE
LOW…yright-internal/src/tests/samples/typeNarrowingAny1.py16def test_any_equality_narrowing(x: Any):CODE
LOW…yright-internal/src/tests/samples/typeNarrowingAny1.py24def test_any_list_comprehension(xs: list[Any]):CODE
LOW…ages/pyright-internal/src/tests/samples/paramSpec21.py39def call_int_context_callback(CODE
LOW…ages/pyright-internal/src/tests/samples/paramSpec21.py53def call_int_context_callable(CODE
LOW…ight-internal/src/tests/samples/dataclassConverter1.py18def converter_with_param_before_args(s: str, *args: int, **kwargs: int) -> int:CODE
LOW…ight-internal/src/tests/samples/dataclassConverter1.py26def converter_with_extra_defaulted_params(CODE
LOW…ight-internal/src/tests/samples/dataclassConverter1.py32def converter_with_default_for_first_param(s: str = "1") -> int:CODE
LOW…ight-internal/src/tests/samples/dataclassConverter1.py36def converter_with_more_specialized_return_type(s: str) -> int:CODE
LOW…ernal/src/tests/samples/uninitializedVariableBased1.py17 def a_method_not_called_by_init(self) -> None:CODE
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py8def test_non_empty_list_literal():CODE
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py16def test_non_empty_tuple_literal():CODE
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py24def test_non_empty_list_multiple_elements():CODE
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py32def test_non_empty_tuple_multiple_elements():CODE
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py56def test_non_literal_iterable():CODE
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py100def test_break_in_guaranteed_loop():CODE
LOW…/pyright-internal/src/tests/samples/literalForLoop1.py109def test_conditional_break_in_guaranteed_loop():CODE
325 more matches not shown…
Unused Imports520 hits · 343 pts
SeverityFileLineSnippetContext
LOWpdm_build.py1CODE
LOWbasedpyright/run_node.py1CODE
LOWbasedpyright/pyright.py1CODE
LOWbasedpyright/langserver.py1CODE
LOWbasedpyright/__main__.py1CODE
LOWtests/test_python_command.py1CODE
LOWtests/test_generate_docstubs.py6CODE
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
460 more matches not shown…
Hallucination Indicators23 hits · 230 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.ts2722 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.ts2483 node.d.funcAnnotationComment.d.paramAnnotations.forEach((expr) => {CODE
CRITICALpackages/pyright-internal/src/analyzer/checker.ts5415 return initNode.d.suite.d.statements.some((maybeStatementList) => {CODE
CRITICALpackages/pyright-internal/src/analyzer/checker.ts6117 overriddenClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ??CODE
CRITICALpackages/pyright-internal/src/analyzer/checker.ts6129 overrideClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ??CODE
CRITICAL…kages/pyright-internal/src/analyzer/patternMatching.ts203 !parentNode.d.suite.d.statements.some(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.ts1001 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 Names31 hits · 34 pts
SeverityFileLineSnippetContext
LOW…-internal/src/tests/wildcardImportPackageMerge.test.ts21//// def do_something(value: str) -> None:COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts2496//// def my_function(): ...COMMENT
LOWpackages/pyright-internal/src/tests/completions.test.ts2545//// 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/usage/type-inference.md75# In this example, symbol var1 has an inferred type of `str | int`.COMMENT
HIGHdocs/usage/type-inference.md84# In this example, symbol var2 has an inferred type of `Foo | None`.COMMENT
HIGHdocs/usage/type-inference.md400# 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
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
Deep Nesting16 hits · 16 pts
SeverityFileLineSnippetContext
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
Excessive Try-Catch Wrapping11 hits · 14 pts
SeverityFileLineSnippetContext
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
Self-Referential Comments3 hits · 10 pts
SeverityFileLineSnippetContext
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
Dead Code5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUM…ckages/pyright-internal/src/tests/samples/codeFlow1.py48CODE
MEDIUM…ges/pyright-internal/src/tests/samples/unreachable1.py111CODE
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
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGH…ckages/pyright-internal/src/analyzer/docStringUtils.ts92 * Description of function (we don't parse this) * * Args: * param1: multi-line description first liSTRING
HIGH…ckages/pyright-internal/src/analyzer/docStringUtils.ts111 * Description of function (we don't parse this) * * Args: * param1 (type): multi-line description fSTRING
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