<!--
Generated by the pyrx RPG docs pipeline from ../../.rpg/rpg_encoder.json.
Do not edit directly — changes will be overwritten by the next refresh.
Graph repo_sha: 784698179a5627072df39bbe0fcadb55bb7dd408
Graph generated_at: 2026-06-10T00:19:36.841Z
-->
# Documentation and Comments

**Feature path:** `Documentation and Comments`

## Implementation summary

- **Files:** 3
- **Symbols:** 58

### Primary files

These are the main implementation files attached to this semantic node.

| File | Summary |
| ---- | ------- |
| [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L1-L318) | Parses pyright-specific comments to adjust diagnostic rule settings and collect comment diagnostics |
| [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L1-L873) | Converts Python docstrings into Markdown or cleaned plaintext for documentation and display |
| [packages/pyright/packages/pyright-internal/src/analyzer/docStringUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringUtils.ts#L1-L153) | Parses Python docstrings and extracts parameter and attribute docs in Epytext, reST, and Google styles |

### Symbol preview (40 of 58)

| Symbol | Kind | Source |
| ------ | ---- | ------ |
| `getFileLevelDirectives` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L40-L77) |
| `_applyStrictRules` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L79-L81) |
| `_applyStandardRules` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L83-L85) |
| `_applyBasicRules` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L87-L89) |
| `_overrideRules` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L91-L127) |
| `_overwriteRules` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L129-L140) |
| `_parsePyrightComment` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L142-L195) |
| `_parsePyrightOperand` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L197-L264) |
| `_parseDiagLevel` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L266-L285) |
| `_parseBoolSetting` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L287-L295) |
| `_trimTextWithRange` | function | [packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/commentUtils.ts#L299-L317) |
| `convertDocStringToMarkdown` | function | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L22-L24) |
| `convertDocStringToPlainText` | function | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L29-L43) |
| `DocStringConverter` | class | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L111-L860) |
| `DocStringConverter.convert` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L135-L167) |
| `DocStringConverter._eatLine` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L169-L171) |
| `DocStringConverter._currentLineOrUndefined` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L173-L175) |
| `DocStringConverter._currentLine` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L177-L179) |
| `DocStringConverter._currentIndent` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L181-L183) |
| `DocStringConverter._prevIndent` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L185-L187) |
| `DocStringConverter._lineAt` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L189-L191) |
| `DocStringConverter._nextBlockIndent` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L193-L197) |
| `DocStringConverter._currentLineIsOutsideBlock` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L199-L201) |
| `DocStringConverter._currentLineWithinBlock` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L203-L205) |
| `DocStringConverter._pushAndSetState` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L207-L214) |
| `DocStringConverter._popState` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L216-L223) |
| `DocStringConverter._parseText` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L225-L263) |
| `DocStringConverter._formatPlainTextIndent` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L265-L295) |
| `DocStringConverter._convertIndent` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L297-L300) |
| `DocStringConverter._escapeHtml` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L302-L308) |
| `DocStringConverter._appendTextLine` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L310-L398) |
| `DocStringConverter._preprocessTextLine` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L400-L410) |
| `DocStringConverter._parseEmpty` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L412-L420) |
| `DocStringConverter._beginMinIndentCodeBlock` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L422-L426) |
| `DocStringConverter._beginBacktickBlock` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L428-L442) |
| `DocStringConverter._parseBacktickBlock` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L444-L457) |
| `DocStringConverter._beginDocTest` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L459-L468) |
| `DocStringConverter._parseDocTest` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L470-L480) |
| `DocStringConverter._beginLiteralBlock` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L482-L520) |
| `DocStringConverter._parseLiteralBlock` | method | [packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts](https://github.com/microsoft/pyrx/blob/784698179a5627072df39bbe0fcadb55bb7dd408/packages/pyright/packages/pyright-internal/src/analyzer/docStringConversion.ts#L522-L540) |
| _18 additional symbols omitted_ |  |  |

## Dependencies

**Imported by:**

- `packages/pyright/packages/pyright-internal/src/analyzer/decorators.ts`
- `packages/pyright/packages/pyright-internal/src/analyzer/sourceFile.ts`
- `packages/pyright/packages/pyright-internal/src/common/docStringService.ts`

**Imports:**

- `packages/pyright/packages/pyright-internal/src/common/configOptions.ts`
- `packages/pyright/packages/pyright-internal/src/common/debug.ts`
- `packages/pyright/packages/pyright-internal/src/common/diagnostic.ts`
- `packages/pyright/packages/pyright-internal/src/common/diagnosticRules.ts`
- `packages/pyright/packages/pyright-internal/src/common/positionUtils.ts`
- `packages/pyright/packages/pyright-internal/src/common/textRange.ts`
- `packages/pyright/packages/pyright-internal/src/common/textRangeCollection.ts`
- `packages/pyright/packages/pyright-internal/src/localization/localize.ts`
- `packages/pyright/packages/pyright-internal/src/parser/tokenizerTypes.ts`
