Static Type Checker for Python
This report summarizes scanner evidence for microsoft/pyright, a Python project with 15,679 GitHub stars. SynthScan examined 333,865 lines of code across 2193 source files, recording 1890 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 7.7 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1193 finding(s).
Are imports declared and package/API names verified? 595 finding(s).
Are wrappers, guards, and repeated structures necessary? 672 finding(s).
Which changes need focused human review? 1890 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1890 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/pyright-internal/src/fileSystemMapping.ts | 40 | export function createFileSystemMappingState(): FileSystemMappingState { | CODE |
| LOW | packages/pyright-internal/src/languageServerBase.ts | 1609 | function convertCategoryToSeverity(category: DiagnosticCategory) { | CODE |
| LOW | packages/pyright-internal/src/pyright.ts | 932 | function accumulateReportDiagnosticStats(diag: PyrightJsonDiagnostic, report: PyrightJsonResults) { | CODE |
| LOW | packages/pyright-internal/src/pyright.ts | 942 | function buildTypeCompletenessReport( | CODE |
| LOW | packages/pyright-internal/src/pyright.ts | 1066 | function printTypeCompletenessReportText(results: PyrightJsonResults, verboseOutput: boolean) { | CODE |
| LOW | packages/pyright-internal/src/pyright.ts | 1275 | function convertDiagnosticCategoryToSeverity(category: DiagnosticCategory): SeverityLevel { | CODE |
| LOW | …ges/pyright-internal/src/typeServer/diagnosticUtils.ts | 24 | function convertCategoryToSeverity(category: DiagnosticCategory): DiagnosticSeverity { | CODE |
| LOW | …ges/pyright-internal/src/typeServer/diagnosticUtils.ts | 43 | export function convertFromPyrightDiagnostic( | CODE |
| LOW | …t-internal/src/typeServer/typeServerConversionUtils.ts | 126 | function toProtocolTypesOrUndefined( | CODE |
| LOW | …t-internal/src/typeServer/typeServerConversionUtils.ts | 141 | function toProtocolTypeOrUndefined( | CODE |
| LOW | …t-internal/src/typeServer/typeServerConversionUtils.ts | 387 | function toProtocolSpecializedFunctionTypesOrUndefined( | CODE |
| LOW | …kages/pyright-internal/src/typeServer/stubGenerator.ts | 148 | export function generateStubFromFunctionType( | CODE |
| LOW | …kages/pyright-internal/src/typeServer/stubGenerator.ts | 353 | function getReturnTypeStringFromFunction(type: PyrightTypes.FunctionType, context: StubGenerationContext): string { | CODE |
| LOW | …kages/pyright-internal/src/typeServer/stubGenerator.ts | 393 | function extractModuleImportsFromTypeString( | CODE |
| LOW | …kages/pyright-internal/src/typeServer/stubGenerator.ts | 536 | export function generateStubFromClassType( | CODE |
| LOW | …kages/pyright-internal/src/typeServer/stubGenerator.ts | 991 | function collectTypeVarsFromFunctionSignature(type: PyrightTypes.FunctionType): PyrightTypes.TypeVarType[] { | CODE |
| LOW | …kages/pyright-internal/src/typeServer/stubGenerator.ts | 1041 | function generateTypeVarDeclarations(typeParams: PyrightTypes.TypeVarType[], context: StubGenerationContext): string[] { | CODE |
| LOW | …kages/pyright-internal/src/typeServer/typeEvalUtils.ts | 84 | export function getEffectiveTypeOfDeclaration( | CODE |
| LOW | …s/pyright-internal/src/typeServer/notebookCellChain.ts | 49 | export function getDefaultPrefixCellContents(): string { | CODE |
| LOW | …s/pyright-internal/src/typeServer/notebookCellChain.ts | 269 | function updateCellChainedFilePath(notebookData: NotebookData, workspace: Workspace, cellIndex: number) { | CODE |
| LOW | …pyright-internal/src/typeServer/typeServerEvaluator.ts | 34 | export function createTypeServerEvaluator(program: Program, symbolLookup: ISymbolLookup): ITypeServerEvaluator { | CODE |
| LOW | packages/pyright-internal/src/typeServer/enums.ts | 325 | export function transformTypeForEnumMember( | CODE |
| LOW | …t-internal/src/typeServer/typeServerConversionTypes.ts | 337 | export function getSymbolNameFromDeclaration(declaration: PyrightDecl.Declaration): string | undefined { | CODE |
| LOW⚡ | …ight-internal/src/typeServer/protocol/generate_json.py | 403 | def _handle_undefined_in_type(self, ts_type: str) -> Tuple[str, bool]: | CODE |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 327 | def _parse_interface_properties(self, body: str) -> List[Dict[str, Any]]: | CODE |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 664 | def _parse_notification_namespace(self, name: str, body: str) -> None: | CODE |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 698 | def _extract_documentation_from_namespace(self, name: str, body: str) -> str: | CODE |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 821 | def _parse_inline_object_type(self, obj_str: str) -> Dict: | CODE |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 900 | def _create_inline_object_definition(self, content: str) -> Dict: | CODE |
| LOW | …/pyright-internal/src/tests/privateImportUsage.test.ts | 41 | function createServiceProviderFromFiles(files: { path: string; content: string }[]) { | CODE |
| LOW | …/pyright-internal/src/tests/chainedSourceFiles.test.ts | 465 | function createServiceWithChainedSourceFiles(basePath: Uri, code: string) { | CODE |
| LOW | packages/pyright-internal/src/tests/service.test.ts | 1057 | function testSourceFileWatchChange(code: string, expected = true, isFile = true) { | CODE |
| LOW | packages/pyright-internal/src/tests/service.test.ts | 1068 | function getRegisteredLibraryFileWatchers(root: string, extraPaths: string[], excludes: string[] = []) { | CODE |
| LOW | …s/pyright-internal/src/tests/sourceMapperUtils.test.ts | 418 | function getTypeshedStdlibAliasChainCode() { | CODE |
| LOW | …s/pyright-internal/src/tests/sourceMapperUtils.test.ts | 454 | function createAnalyzerServiceFromCode(code: string, pythonSearchPaths: string[], options?: CustomAnalyzerOptions) { | CODE |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 592 | function getSignatureHelpForMarker(state: TestState, markerName: string): SignatureHelp | undefined { | CODE |
| LOW | …es/pyright-internal/src/tests/classDeclaration.test.ts | 148 | function checkSpecialBuiltInClassDetail(code: string) { | CODE |
| LOW | …es/pyright-internal/src/tests/classDeclaration.test.ts | 167 | function checkNoDeclarationInClassDetail(code: string) { | CODE |
| LOW | …ages/pyright-internal/src/tests/importResolver.test.ts | 1132 | function createServiceProviderFromFiles(files: { path: string; content: string }[]): ServiceProvider { | CODE |
| LOW | …ages/pyright-internal/src/tests/importResolver.test.ts | 1139 | function createServiceProviderWithCombinedFs(files: { path: string; content: string }[]): ServiceProvider { | CODE |
| LOW | packages/pyright-internal/src/tests/testStateUtils.ts | 28 | export function convertFileEditActionToString(edit: FileEditAction): string { | CODE |
| LOW | packages/pyright-internal/src/tests/testStateUtils.ts | 34 | export function convertRangeToFileEditAction(state: TestState, range: Range, replacementText?: string): FileEditAction { | CODE |
| LOW | packages/pyright-internal/src/tests/testStateUtils.ts | 153 | export function verifyReferencesAtPosition( | CODE |
| LOW | …/pyright-internal/src/tests/workspaceEditUtils.test.ts | 479 | function applyWorkspaceEditToService(service: AnalyzerService, edits: WorkspaceEdit, filesChanged: Map<string, Uri>) { | CODE |
| LOW | packages/pyright-internal/src/tests/ipythonMode.test.ts | 610 | function verifyAnalysisDiagnosticCount(code: string, expectedCount: number, expectedRule?: string) { | CODE |
| LOW | …right-internal/src/tests/importResolverSupport.test.ts | 214 | function createFsWithTypeshedLayout() { | CODE |
| LOW | …yright-internal/src/tests/benchmarkData/large_class.py | 364 | def transform_metadata_values(self, func: Any) -> Dict[str, Any]: | CODE |
| LOW | …rnal/src/tests/typeServer/inProcTypeServerTestUtils.ts | 63 | export async function initializeDependenciesForInProcTests() { | CODE |
| LOW | …rnal/src/tests/typeServer/inProcTypeServerTestUtils.ts | 127 | async function runWithConnectionErrorGuard( | CODE |
| LOW | …ight-internal/src/tests/lsp/languageServerTestUtils.ts | 267 | function updateConfigurationSection( | CODE |
| LOW | …ight-internal/src/tests/lsp/languageServerTestUtils.ts | 419 | function convertDiagnosticReportItem( | CODE |
| LOW | …ight-internal/src/tests/lsp/languageServerTestUtils.ts | 771 | function startWorkspaceDiagnostics(info: PyrightServerInfo, extraMessage: string) { | CODE |
| LOW | …-internal/src/tests/samples/typeNarrowingTypedDict5.py | 76 | def nested_eager_comprehension(data: Data, key: Key): | CODE |
| LOW | …-internal/src/tests/samples/typeNarrowingTypedDict5.py | 83 | def guarded_nested_comprehension(data: Data, key: Key): | CODE |
| LOW⚡ | …pyright-internal/src/tests/samples/typeGuardMethod1.py | 80 | def test_module_qualified_free_function(a: tuple[int, ...]): | CODE |
| LOW⚡ | …pyright-internal/src/tests/samples/typeGuardMethod1.py | 87 | def test_class_method_via_instance(c: Checker, x: object): | CODE |
| LOW⚡ | …pyright-internal/src/tests/samples/typeGuardMethod1.py | 94 | def test_class_method_via_class(x: object): | CODE |
| LOW⚡ | …pyright-internal/src/tests/samples/typeGuardMethod1.py | 101 | def test_class_method_keyword(x: object): | CODE |
| LOW⚡ | …pyright-internal/src/tests/samples/typeGuardMethod1.py | 186 | def test_overload_used_for_mapping(x: object, y: object): | CODE |
| LOW⚡ | …pyright-internal/src/tests/samples/typeGuardMethod1.py | 194 | def test_multiple_overloads_used_for_mapping(x: object, y: object, mode: Literal[0, 1]): | CODE |
| 506 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …internal/src/typeServer/protocol/typeServerProtocol.ts | 931 | * return None | COMMENT |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 251 | print(foo_bar) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 254 | print(bar_foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 263 | print(foo_bar) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 266 | print(bar_foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 279 | print(foo_bar) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 282 | print(bar_foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 291 | print(foo_bar) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 294 | print(bar_foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 308 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 310 | print('not foo!') | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 319 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 321 | print('not foo!') | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 335 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 337 | print('not foo!') | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 342 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 344 | print('not foo!') | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 359 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 361 | print('not foo!') | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 370 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 372 | print('not foo!') | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 455 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 457 | print('not foo!') | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 466 | print(foo) | CODE |
| HIGH⚡ | …pyright-internal/src/tests/docStringConversion.test.ts | 468 | print('not foo!') | CODE |
| HIGH | …pyright-internal/src/tests/docStringConversion.test.ts | 385 | print(a + foo + 123) | CODE |
| HIGH | …pyright-internal/src/tests/docStringConversion.test.ts | 393 | print(a + foo + 123) | CODE |
| HIGH | …ourslash/hover.docFromSrc.relativeImport2.fourslash.ts | 8 | //// return True | COMMENT |
| HIGH | …ests/fourslash/hover.inherited.docFromSrc.fourslash.ts | 8 | //// return True | COMMENT |
| HIGH | …ests/fourslash/hover.inherited.docFromSrc.fourslash.ts | 14 | //// return True | COMMENT |
| HIGH | …ests/fourslash/hover.inherited.docFromSrc.fourslash.ts | 27 | //// return True | COMMENT |
| HIGH | …/fourslash/hover.docFromSrc.stubs-package.fourslash.ts | 19 | //// return True | COMMENT |
| HIGH⚡ | …rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts | 13 | //// return True | COMMENT |
| HIGH⚡ | …rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts | 19 | //// return True | COMMENT |
| HIGH⚡ | …rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts | 24 | //// return True | COMMENT |
| HIGH | …rnal/src/tests/fourslash/hover.docFromSrc.fourslash.ts | 57 | //// return True | COMMENT |
| HIGH | …/fourslash/import.pytyped.typeCheckingOff.fourslash.ts | 17 | //// return None | COMMENT |
| HIGH⚡ | …ests/fourslash/completions.libCodeAndStub.fourslash.ts | 20 | //// return True | COMMENT |
| HIGH⚡ | …ests/fourslash/completions.libCodeAndStub.fourslash.ts | 24 | //// return True | COMMENT |
| HIGH⚡ | …ests/fourslash/completions.libCodeAndStub.fourslash.ts | 28 | //// return True | COMMENT |
| HIGH | …sts/fourslash/hover.inherited.docFromStub.fourslash.ts | 6 | //// return True | COMMENT |
| HIGH | …sts/fourslash/hover.inherited.docFromStub.fourslash.ts | 9 | //// return True | COMMENT |
| HIGH | …sts/fourslash/hover.inherited.docFromStub.fourslash.ts | 27 | //// return True | COMMENT |
| HIGH | …sts/fourslash/hover.inherited.docFromStub.fourslash.ts | 30 | //// return True | COMMENT |
| HIGH⚡ | …tests/fourslash/completions.libCodeNoStub.fourslash.ts | 20 | //// return True | COMMENT |
| HIGH⚡ | …tests/fourslash/completions.libCodeNoStub.fourslash.ts | 24 | //// return True | COMMENT |
| HIGH⚡ | …tests/fourslash/completions.libCodeNoStub.fourslash.ts | 28 | //// return True | COMMENT |
| HIGH | …fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.ts | 11 | //// return True | COMMENT |
| HIGH | …ourslash/import.pytyped.typeCheckingBasic.fourslash.ts | 17 | //// return None | COMMENT |
| HIGH⚡ | …l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts | 14 | //// return True | COMMENT |
| HIGH⚡ | …l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts | 18 | //// return True | COMMENT |
| HIGH⚡ | …l/src/tests/fourslash/hover.libCodeNoStub.fourslash.ts | 22 | //// return True | COMMENT |
| HIGH⚡ | …/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts | 14 | //// return True | COMMENT |
| HIGH⚡ | …/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts | 18 | //// return True | COMMENT |
| HIGH⚡ | …/src/tests/fourslash/hover.libCodeAndStub.fourslash.ts | 22 | //// return True | COMMENT |
| HIGH | …rslash/hover.inherited.docFromSrcWithStub.fourslash.ts | 8 | //// return True | COMMENT |
| HIGH | …rslash/hover.inherited.docFromSrcWithStub.fourslash.ts | 13 | //// return True | COMMENT |
| HIGH | …rslash/hover.inherited.docFromSrcWithStub.fourslash.ts | 30 | //// return True | COMMENT |
| HIGH | …rslash/hover.inherited.docFromSrcWithStub.fourslash.ts | 33 | //// return True | COMMENT |
| HIGH | …fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.ts | 13 | //// return True | COMMENT |
| 6 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/pyright-internal/jest.config.js | 1 | /* | COMMENT |
| LOW | …internal/src/typeServer/protocol/typeServerProtocol.ts | 681 | // Module where the type alias is defined. | COMMENT |
| LOW | …yright-internal/src/tests/importStatementUtils.test.ts | 281 | // @filename: pkg/nnn.py | COMMENT |
| LOW | …yright-internal/src/tests/importStatementUtils.test.ts | 301 | // inserts stay as separate same-range edits instead of merging. When applyTextEditsToString | COMMENT |
| LOW | …t-internal/src/tests/protocolRequirementCycles.test.ts | 21 | //// def __len__(self, /) -> int: ... | COMMENT |
| LOW | …t-internal/src/tests/protocolRequirementCycles.test.ts | 81 | ); | COMMENT |
| LOW | …ages/pyright-internal/src/tests/languageServer.test.ts | 281 | // increase the timeout. | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 21 | // @filename: io2/tools/__init__.py | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 41 | //// from .[|io2|].tools import pathUtils as p | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 81 | //// def getFilename(path): | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 121 | COMMENT | |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 141 | //// | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 181 | //// from io2.tools import pathUtils as pathUtils | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 201 | //// from .io2 import tools as t | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 241 | const code = ` | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 261 | //// pathUtils.getFilename("c") | COMMENT |
| LOW | …ght-internal/src/tests/documentSymbolCollector.test.ts | 301 | }); | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 41 | COMMENT | |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 81 | COMMENT | |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 121 | // @library: true | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 181 | const code = ` | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 241 | // @filename: test.py | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 301 | test('function hover does not substitute unsafe multiline defaults for stub ellipsis defaults', async () => { | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 341 | COMMENT | |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 401 | // @filename: pyrightconfig.json | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 441 | // @library: true | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 501 | //// class Test: | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 561 | test('import symbol tooltip - useLibraryCodeForTypes true', async () => { | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 761 | }); | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 781 | //// self.__dict__.update(values) | COMMENT |
| LOW | packages/pyright-internal/src/tests/parser.test.ts | 441 | // @filename: pyrightconfig.json | COMMENT |
| LOW | packages/pyright-internal/src/tests/parser.test.ts | 501 | //// { "root": ".", "pythonVersion": "3.15" } | COMMENT |
| LOW | packages/pyright-internal/src/tests/service.test.ts | 721 | //// { | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 61 | //// "src" | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 81 | //// | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 101 | //// }, | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 521 | //// pass | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 601 | }); | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 621 | //// name: Optional[str] = None | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 641 | }); | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 661 | //// print(bar3.ccc) | COMMENT |
| LOW | packages/pyright-internal/src/tests/testState.test.ts | 681 | //// @dataclass | COMMENT |
| LOW | …s/pyright-internal/src/tests/sourceMapperUtils.test.ts | 201 | //// from typing import Mapping | COMMENT |
| LOW | …s/pyright-internal/src/tests/sourceMapperUtils.test.ts | 261 | COMMENT | |
| LOW | …s/pyright-internal/src/tests/sourceMapperUtils.test.ts | 281 | //// class MutableMapping: | COMMENT |
| LOW | …s/pyright-internal/src/tests/sourceMapperUtils.test.ts | 421 | //// class MutableMapping: | COMMENT |
| LOW | …/pyright-internal/src/tests/typeStubGeneration.test.ts | 181 | // @filename: testLib/aa/bb/__init__.py | COMMENT |
| LOW | …/pyright-internal/src/tests/typeStubGeneration.test.ts | 241 | const state = parseAndGetTestState( | COMMENT |
| LOW | …ht-internal/src/tests/protocolRequirementState.test.ts | 21 | 'ProtocolRequirementState $element $member concrete=$concrete seed=$seed', | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 61 | }); | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 141 | COMMENT | |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 181 | assert.strictEqual(actual.signatures[0].label, '(a: int = 3, b: str = "hello") -> None'); | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 241 | // @filename: pyrightconfig.json | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 301 | //// { | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 341 | //// "useLibraryCodeForTypes": true | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 381 | //// } | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 421 | COMMENT | |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 461 | //// import mylib | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 501 | checkSignatureHelp(code, true); | COMMENT |
| LOW | …kages/pyright-internal/src/tests/signatureHelp.test.ts | 541 | //// | COMMENT |
| 468 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 18 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 1055 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 4 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 4 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 43 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 44 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 45 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 46 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 47 | CODE | |
| LOW | …ight-internal/src/tests/benchmarkData/comment_heavy.py | 48 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 4 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 6 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/large_stdlib.py | 4 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/large_stdlib.py | 7 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 3 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 6 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 7 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 8 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 9 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 10 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 11 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 12 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 13 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 14 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 15 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 16 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 17 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 18 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 19 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 20 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 21 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 22 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 23 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 24 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 25 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 26 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 27 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 28 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 29 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 30 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 31 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 32 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 33 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 34 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 35 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 36 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 37 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 38 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 39 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 40 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 41 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 42 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 43 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 44 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 45 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 46 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 47 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 48 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 49 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/import_heavy.py | 50 | CODE | |
| 444 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …s/pyright-internal/src/languageService/tooltipUtils.ts | 601 | const name = resolvedDecl.node.d.module.d.nameParts.find((n) => n.d.value === optional.name); | CODE |
| CRITICAL | …ght-internal/src/languageService/completionProvider.ts | 2602 | return [entry.d.keyExpr.d.strings.map((s) => s.d.value).join('')]; | CODE |
| CRITICAL | packages/pyright-internal/src/parser/parser.ts | 2892 | nameParts: importFromNode.d.module.d.nameParts.map((p) => p.d.value), | CODE |
| CRITICAL | packages/pyright-internal/src/parser/parser.ts | 2954 | const nameParts = importAsNode.d.module.d.nameParts.map((p) => p.d.value); | CODE |
| CRITICAL | packages/pyright-internal/src/parser/parser.ts | 2970 | importAsNode.d.module.d.nameParts.forEach((_, index) => { | CODE |
| CRITICAL | packages/pyright-internal/src/common/textEditTracker.ts | 427 | nodeToDelete.d.module.d.nameParts.forEach((n) => this._nodesRemoved.set(n, parseFileResults)); | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/checker.ts | 2518 | node.d.funcAnnotationComment.d.paramAnnotations.forEach((expr) => { | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/checker.ts | 6193 | overriddenClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ?? | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/checker.ts | 6205 | overrideClassAndSymbol.classType.shared.typedDictEntries.knownItems.get(memberName) ?? | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/dataClasses.ts | 384 | const initArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'init'); | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/dataClasses.ts | 403 | const kwOnlyArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'kw_only'); | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/dataClasses.ts | 422 | const defaultValueArg = statement.d.rightExpr.d.args.find( | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/dataClasses.ts | 430 | const defaultFactoryArg = statement.d.rightExpr.d.args.find( | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/dataClasses.ts | 443 | const aliasArg = statement.d.rightExpr.d.args.find((arg) => arg.d.name?.d.value === 'alias'); | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/dataClasses.ts | 455 | const converterArg = statement.d.rightExpr.d.args.find( | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/binder.ts | 2533 | node.d.expr.d.items.forEach((itemExpr) => { | CODE |
| CRITICAL | …ckages/pyright-internal/src/analyzer/parseTreeUtils.ts | 2138 | node.d.suite.d.statements.forEach((statement) => { | CODE |
| CRITICAL | packages/pyright-internal/src/analyzer/typedDicts.ts | 1009 | const entryName = entry.d.keyExpr.d.strings.map((s) => s.d.value).join(''); | CODE |
| CRITICAL | …ges/pyright-internal/src/analyzer/staticExpressions.ts | 168 | const comparisonPlatform = node.d.rightExpr.d.strings.map((s) => s.d.value).join(''); | CODE |
| CRITICAL | …ges/pyright-internal/src/analyzer/staticExpressions.ts | 175 | const comparisonOsName = node.d.rightExpr.d.strings.map((s) => s.d.value).join(''); | CODE |
| CRITICAL | …ges/pyright-internal/src/analyzer/staticExpressions.ts | 192 | const comparisonStringName = node.d.rightExpr.d.strings.map((s) => s.d.value).join(''); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …ight-internal/src/typeServer/protocol/generate_json.py | 1070 | except: | CODE |
| HIGH | packages/pyright-internal/src/tests/samples/loop16.py | 321 | except: | CODE |
| HIGH | packages/pyright-internal/src/tests/samples/final3.py | 181 | except ModuleNotFoundError as x: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept9.py | 26 | except Exception: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 14 | except OSError: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 16 | except Exception: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 18 | except (): | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 21 | except PermissionError: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 28 | except OSError: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 31 | except (PermissionError, ProcessLookupError): | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 34 | except (PermissionError, ConnectionAbortedError): | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 41 | except OSError: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 43 | except (UnboundLocalError, ConnectionAbortedError): | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 50 | except OSError: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 52 | except: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 59 | except ValueError as e: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 61 | except u as e: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 68 | except ValueError as e: | CODE |
| HIGH | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 70 | except u as e: | CODE |
| HIGH | …ckages/pyright-internal/src/tests/samples/codeFlow8.py | 26 | except StopIteration: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | …ight-internal/src/typeServer/protocol/generate_json.py | 1107 | print(f"Error running prettier command {' '.join(cmd)}: {e}") | CODE |
| MEDIUM | …ight-internal/src/typeServer/protocol/generate_json.py | 1035 | print(f"Error: TypeScript file not found: {ts_file}") | CODE |
| LOW⚡ | …ight-internal/src/typeServer/protocol/generate_json.py | 1106 | except Exception as e: | CODE |
| LOW⚡ | …ight-internal/src/typeServer/protocol/generate_json.py | 1113 | except Exception as e: | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/tryExcept9.py | 10 | except Exception: | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/tryExcept9.py | 26 | except Exception: | CODE |
| LOW | …ages/pyright-internal/src/tests/samples/tryExcept10.py | 9 | except Exception: | CODE |
| LOW | …ages/pyright-internal/src/tests/samples/typedDict28.py | 152 | except Exception: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 42 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 49 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 56 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 63 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 70 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 77 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 84 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 91 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 98 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 105 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 112 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 119 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 126 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 133 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 140 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 147 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 154 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 161 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 168 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 175 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 182 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 189 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 196 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 203 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 210 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 217 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 224 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 231 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 238 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 245 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 252 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 259 | except Exception as _e: | CODE |
| LOW⚡ | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 266 | except Exception as _e: | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 16 | except Exception: | CODE |
| MEDIUM | …kages/pyright-internal/src/tests/samples/tryExcept8.py | 11 | def func2(): | CODE |
| LOW | packages/pyright-internal/src/tests/samples/with5.py | 19 | except Exception: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/with5.py | 30 | except Exception: | CODE |
| LOW | …ages/pyright-internal/src/tests/samples/paramSpec30.py | 45 | except Exception as ex: | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/tryExcept1.py | 23 | except Exception as e: | CODE |
| MEDIUM | …kages/pyright-internal/src/tests/samples/tryExcept1.py | 8 | def func1(): | CODE |
| MEDIUM | …kages/pyright-internal/src/tests/samples/tryExcept1.py | 48 | def func4(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …internal/src/typeServer/protocol/typeServerProtocol.ts | 468 | * - Regular: `def my_function():` - has source code node | COMMENT |
| LOW | …internal/src/typeServer/protocol/typeServerProtocol.ts | 514 | * def my_function(x: int) -> str: # Function declaration | COMMENT |
| LOW | …internal/src/typeServer/protocol/typeServerProtocol.ts | 584 | * def my_function(x: int) -> str: # RegularDeclaration | COMMENT |
| LOW | …internal/src/typeServer/protocol/typeServerProtocol.ts | 815 | * def my_function(x: int) -> str: # FunctionType with TypeKind.Function | COMMENT |
| LOW | …-internal/src/tests/wildcardImportPackageMerge.test.ts | 21 | //// def do_something(value: str) -> None: | COMMENT |
| LOW | packages/pyright-internal/src/tests/completions.test.ts | 2134 | //// def my_function(): ... | COMMENT |
| LOW | packages/pyright-internal/src/tests/completions.test.ts | 2180 | //// def my_function(): ... | COMMENT |
| LOW | packages/pyright-internal/src/tests/samples/loop12.py | 8 | def do_stuff(self, x: int | None): | CODE |
| LOW | packages/pyright-internal/src/tests/samples/unions1.py | 33 | def helper(value: T) -> T | None: ... | CODE |
| LOW | …es/pyright-internal/src/tests/samples/memberAccess4.py | 13 | def do_stuff(self: HasItemProtocol1): | CODE |
| LOW | …es/pyright-internal/src/tests/samples/memberAccess4.py | 47 | def do_stuff(cls: type[HasItemProtocol2]): | CODE |
| LOW | …ages/pyright-internal/src/tests/samples/assignment1.py | 11 | def do_something(self, num: int) -> str: | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/metaclass4.py | 7 | def do_something(self, p1: str, p2: int): | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/protocol21.py | 17 | def do_something(a: A, class_a: type[A]) -> None: | CODE |
| LOW | …ages/pyright-internal/src/tests/samples/paramSpec27.py | 56 | def do_something(int_handler: Handler[int], var_args_handler: Handler[P], /) -> None: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/enum6.py | 38 | def do_something(self): | CODE |
| LOW | …ckages/pyright-internal/src/tests/samples/optional1.py | 14 | def do_stuff(self): | CODE |
| LOW | packages/pyright-internal/src/tests/samples/super7.py | 11 | def my_method(self, value: int) -> int: ... | CODE |
| LOW | …/pyright-internal/src/tests/samples/methodOverride3.py | 74 | def do_stuff(self) -> Iterable[_T_F]: ... | CODE |
| LOW | …/pyright-internal/src/tests/samples/methodOverride3.py | 78 | def do_stuff(self) -> Iterable[_T_F]: ... | CODE |
| LOW | …es/pyright-internal/src/tests/samples/overloadCall8.py | 8 | def my_method(cmd, *args, **kwargs): | CODE |
| LOW | …ages/pyright-internal/src/tests/samples/paramSpec11.py | 19 | def do_stuff(self, name: str, *args: _P.args, **kwargs: _P.kwargs) -> int: | CODE |
| LOW | …ight-internal/src/tests/samples/constrainedTypeVar2.py | 68 | def do_something(value: T3) -> T3: ... | CODE |
| LOW | packages/pyright-internal/src/tests/samples/classes1.py | 41 | def my_method(self) -> "G": | CODE |
| LOW | …es/pyright-internal/src/tests/samples/overloadCall2.py | 22 | async def test_function(): | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/tryExcept5.py | 9 | async def do_stuff(self): | CODE |
| LOW | packages/pyright-internal/src/tests/samples/typeVar7.py | 14 | def do_stuff(self) -> int: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/typeVar7.py | 28 | def do_stuff(self) -> float: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/typeVar6.py | 14 | def do_stuff(self) -> int: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/typeVar6.py | 25 | def do_stuff(self) -> float: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/self4.py | 15 | def do_something(self) -> str: ... | CODE |
| LOW | …ts/fourslash/completions.import.submodule.fourslash.ts | 15 | //// def test_function(): | COMMENT |
| LOW | …nal/src/tests/fourslash/import.multipart3.fourslash.ts | 7 | //// def do_something(value: str) -> None: | COMMENT |
| LOW | …ostics.missingModuleSource.compiledModule.fourslash.ts | 76 | //// def helper() -> int: ... | COMMENT |
| LOW | …stics.missingModuleSource.nativeSubmodule.fourslash.ts | 37 | //// def helper() -> int: ... | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …ges/pyright-internal/src/tests/samples/typePrinter2.py | 1 | # This sample is used in conjunction with the typePrinter1.py sample. | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/final7.py | 1 | # This sample is used in conjunction with final8.py to test that imported | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/import13.py | 1 | # This sample is used in conjunction with import14.py to test | COMMENT |
| MEDIUM | …/pyright-internal/src/tests/samples/protocolModule1.py | 1 | # This sample is used in conjunction with protocolModule2.py. | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/import14.py | 1 | # This sample is used in conjunction with import13.py to test | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/call6.py | 2 | # used in argument expressions when used in conjunction with | COMMENT |
| MEDIUM | …/pyright-internal/src/tests/samples/protocolModule3.py | 1 | # This sample is used in conjunction with protocolModule4.py. | COMMENT |
| MEDIUM | …s/pyright-internal/src/tests/samples/typeVarTuple10.py | 2 | # in conjunction with unpacked tuples. | COMMENT |
| MEDIUM | packages/pyright-internal/src/common/pythonVersion.ts | 98 | // We leverage the fact that the alphabetical ordering | COMMENT |
| MEDIUM | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 98 | // directly; this is robust to declaration-cleared specializations (e.g. a ParamSpec/Callable | COMMENT |
| MEDIUM | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 149 | // matched-overload tier robust to binding/specialization (e.g. a generic `Box[int]()` | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/type-inference.md | 74 | # In this example, symbol var1 has an inferred type of `str | int`. | COMMENT |
| HIGH | docs/type-inference.md | 82 | # In this example, symbol var2 has an inferred type of `Foo | None`. | COMMENT |
| HIGH | docs/type-inference.md | 368 | # In this example, the types of the lambda’s input parameters | COMMENT |
| HIGH | …right-internal/src/tests/samples/solverHigherOrder1.py | 2 | # variables during TypeVar solving. In this example, we | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …pyright-internal/src/tests/docStringConversion.test.ts | 1094 | -------------------- ## ------------------------------------------ | CODE |
| MEDIUM | …pyright-internal/src/tests/docStringConversion.test.ts | 1110 | -------------------- ## ------------------------------------------ | CODE |
| MEDIUM | packages/pyright-internal/src/tests/samples/lambda1.py | 4 | #------------------------------------------------------ | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/lambda1.py | 17 | #------------------------------------------------------ | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/lambda1.py | 26 | #------------------------------------------------------ | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/lambda1.py | 40 | #------------------------------------------------------ | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/lambda1.py | 62 | #------------------------------------------------------ | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/lambda1.py | 80 | #------------------------------------------------------ | COMMENT |
| MEDIUM | packages/pyright-internal/src/tests/samples/call1.py | 6 | # ------------------------------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …rnal/src/tests/benchmarkData/repetitive_identifiers.py | 29 | def set_x(self, x: T) -> None: | CODE |
| LOW⚡ | …rnal/src/tests/benchmarkData/repetitive_identifiers.py | 32 | def set_y(self, y: K) -> None: | CODE |
| LOW⚡ | …rnal/src/tests/benchmarkData/repetitive_identifiers.py | 35 | def set_z(self, z: V) -> None: | CODE |
| LOW⚡ | …rnal/src/tests/benchmarkData/repetitive_identifiers.py | 67 | def set_x(self, x: T) -> None: | CODE |
| LOW⚡ | …rnal/src/tests/benchmarkData/repetitive_identifiers.py | 70 | def set_y(self, y: K) -> None: | CODE |
| LOW⚡ | …rnal/src/tests/benchmarkData/repetitive_identifiers.py | 73 | def set_z(self, z: V) -> None: | CODE |
| LOW | …yright-internal/src/tests/benchmarkData/large_class.py | 195 | def set_item(self, index: int, value: Any) -> None: | CODE |
| LOW | …yright-internal/src/tests/benchmarkData/large_class.py | 331 | def set_metadata(self, key: str, value: Any) -> None: | CODE |
| LOW | …yright-internal/src/tests/benchmarkData/large_class.py | 428 | def set_flags(self, flags: Set[str]) -> None: | CODE |
| LOW | …yright-internal/src/tests/benchmarkData/large_class.py | 649 | def set_counter(self, value: int) -> None: | CODE |
| LOW | …yright-internal/src/tests/benchmarkData/large_class.py | 840 | def set_version(self, version: int) -> None: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/import3.py | 3 | __all__ = ["foo", "_foo", "_bar"] | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/dunderAll2.py | 9 | __all__ = ["a", "b", "c", "d"] | CODE |
| LOW | …es/pyright-internal/src/tests/samples/autoVariance1.py | 157 | def set_value(self, value: T) -> None: | CODE |
| LOW | …right-internal/src/tests/samples/typedDictReadOnly2.py | 211 | def update_a(a: TD18, b: TD19) -> None: | CODE |
| LOW | packages/pyright-internal/src/tests/samples/private3.py | 4 | __all__ = ["_exported_via_all", "Public"] | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/dunderAll1.py | 14 | __all__ = ["test", "hello"] | CODE |
| LOW | …kages/pyright-internal/src/tests/samples/dunderAll1.py | 26 | __all__ = ["test", my_string] | CODE |
| LOW | …/pyright-internal/src/tests/samples/functionMember1.py | 20 | def set_signature(func: FunctionType) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 1028 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 95 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 219 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 327 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 451 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 525 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 555 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 698 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 770 | CODE | |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 931 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 98 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 115 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 155 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 170 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 188 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 265 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 397 | CODE | |
| LOW | …yright-internal/src/tests/benchmarkData/union_heavy.py | 481 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/large_stdlib.py | 943 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/large_stdlib.py | 1071 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/large_stdlib.py | 1601 | CODE | |
| LOW | …right-internal/src/tests/benchmarkData/large_stdlib.py | 1678 | CODE | |
| LOW | packages/pyright-internal/src/tests/samples/classes8.py | 33 | CODE | |
| LOW | packages/pyright-internal/src/tests/samples/loop16.py | 7 | CODE | |
| LOW | …ckages/pyright-internal/src/tests/samples/codeFlow4.py | 87 | CODE | |
| LOW | …al/src/tests/samples/unknownRecursiveAliasBranches1.py | 30 | CODE | |
| LOW | packages/pyright-internal/src/tests/samples/loop20.py | 18 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …ight-internal/src/typeServer/protocol/generate_json.py | 56 | # Create a version without comments for parsing structure | COMMENT |
| MEDIUM | …ckages/pyright-internal/src/tests/samples/builtins1.py | 1 | # This file is intentionally blank. It's used to test | COMMENT |
| MEDIUM | …/pyright-internal/src/tests/samples/methodOverride7.py | 76 | # The following classes verify that inheriting a callable variable and a | COMMENT |
| MEDIUM⚡ | …yright-internal/src/tests/samples/typeNarrowingAny1.py | 30 | # Create an Unknown type | COMMENT |
| MEDIUM | …es/pyright-internal/src/tests/samples/memberAccess2.py | 30 | # This class is a data class (because it derives from | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …ight-internal/src/typeServer/protocol/generate_json.py | 415 | # Check if the top-level type ends with "| undefined" | COMMENT |
| LOW⚡ | …ight-internal/src/typeServer/protocol/generate_json.py | 419 | # Check if undefined is one of the top-level union parts | COMMENT |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 178 | # Check if this has a string value | COMMENT |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 372 | # Check if the type ends with "| undefined" - make it optional and strip undefined | COMMENT |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 475 | # Check if this is a string literal union like 'unknown' | 'any' | ... | COMMENT |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 982 | # Check if Range is imported and used but not defined | COMMENT |
| LOW | …ight-internal/src/typeServer/protocol/generate_json.py | 1007 | # Check if Position is needed (referenced by Range) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …ight-internal/src/typeServer/protocol/generate_json.py | 455 | # Handle parenthesized types like (Type | undefined)[] | COMMENT |
| HIGH⚡ | …ight-internal/src/typeServer/protocol/generate_json.py | 410 | - "(Type | undefined)[] | undefined" -> ("(Type | undefined)[]", True) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …ckages/pyright-internal/src/tests/samples/codeFlow1.py | 48 | CODE | |
| MEDIUM | …ges/pyright-internal/src/tests/samples/unreachable1.py | 130 | CODE | |
| MEDIUM | …kages/pyright-internal/src/tests/samples/generator6.py | 9 | CODE | |
| MEDIUM | …kages/pyright-internal/src/tests/samples/generator6.py | 14 | CODE | |
| MEDIUM | …kages/pyright-internal/src/tests/samples/generator3.py | 61 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 198 | // Step 1: the member's own docstring (Rule A over the full overload set on its class), unless | COMMENT |
| LOW | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 236 | // Step 2: inheritance — walk base classes (exclude builtin bases; the original class was | COMMENT |
| LOW | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 262 | // Step 3: the passed type's own docstring (last resort, mirrors legacy behavior). | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 198 | // Step 1: the member's own docstring (Rule A over the full overload set on its class), unless | COMMENT |
| LOW | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 236 | // Step 2: inheritance — walk base classes (exclude builtin bases; the original class was | COMMENT |
| LOW | …es/pyright-internal/src/analyzer/typeDocStringUtils.ts | 262 | // Step 3: the passed type's own docstring (last resort, mirrors legacy behavior). | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …es/pyright-internal/src/tests/samples/genericType47.py | 34 | CODE | |
| LOW | …es/pyright-internal/src/tests/samples/genericType23.py | 13 | CODE | |
| LOW | …kages/pyright-internal/src/tests/samples/decorator5.py | 9 | CODE | |
| LOW | packages/pyright-internal/src/tests/samples/unions7.py | 41 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 512 | //// Lorem Ipsum | COMMENT |
| LOW | …kages/pyright-internal/src/tests/hoverProvider.test.ts | 523 | marker: '```python\n(property) test: (self: Self@Test) -> bool\n```\n---\nTest DocString.\n\nReturns\n-------\nb | CODE |