Files
TermiNexus e9e4693333
Some checks failed
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
初始化上传
2026-07-24 17:08:39 +08:00

43 KiB

Subsystem: common

Source files under common/. Grouped by the functional area each file was assigned to during semantic lifting.

  • Files: 51
  • Symbols (leaves): 625

Diagnostics and Configuration

  • common/commandLineOptions.ts — Defines command-line and language-server configuration option types for Pyright including config and server settings
  • common/commandUtils.ts — Helpers to create LSP Command objects with URI arguments converted to string form
  • common/configOptions.ts — Defines ExecutionEnvironment and ConfigOptions along with helpers for diagnostic rule sets and file-spec matching
  • common/diagnostic.ts — Defines Diagnostic types, serialization, comparison, and addendum helpers for building and formatting diagnostics
  • common/diagnosticRules.ts — Enumerates string identifiers for configurable diagnostic rules used by the type checker
  • common/diagnosticSink.ts — Collects and deduplicates file diagnostics and provides a TextRange-aware sink that converts offsets to position ranges

Shared Runtime Infrastructure

  • common/asyncInitialization.ts — Initializes runtime dependencies for Pyright, including TOML support and production source-map support
  • common/cancellationUtils.ts — Cancellation utilities: combining tokens, file-based tokens, throttling, timeouts, and cancellation-aware racing
  • common/caseSensitivityDetector.ts — Determines whether a given URI should be treated as case-sensitive
  • common/charCodes.ts — Defines Char enum mapping descriptive names to numeric character codes for ASCII and select Unicode spaces
  • common/chokidarFileWatcherProvider.ts — Chokidar-based FileWatcherProvider that watches filesystem paths and emits file events
  • common/collectionUtils.ts — Provides utility helpers for arrays and maps, including searching, sorting, transforming, and mutating collections
  • common/console.ts — Provides a logging abstraction with levels, multiple console implementations, chaining, cloning, and disposable support
  • common/core.ts — Utility helpers and type guards for core operations like comparisons, type checks, cloning, and promise detection
  • common/crypto.ts — Generates cryptographically secure random hex strings using Node or Web Crypto, failing if unavailable
  • common/debug.ts — Assertion and debugging utilities: assertions, error/enum formatting, function name and serializable-error helpers
  • common/deferred.ts — Provides Deferred promise utilities with resolve/reject/completion state and helpers to create from promises
  • common/docRange.ts — Represents a document's URI together with a text range inside that document
  • common/docStringService.ts — Provides an interface and Pyright implementation to convert docstrings and extract parameter and attribute docs
  • common/editAction.ts — Defines interfaces and helpers for text and file edit actions and file create/delete/rename operations
  • common/envVarUtils.ts — Expands VS Code-style path variables and resolves the result to a Uri using workspace roots and environment variables
  • common/extensibility.ts — Defines interfaces for program views, mutators, symbol providers, and other language service extensibility APIs
  • common/extensions.ts — Adds a Promise.ignoreErrors extension that logs and ignores promise rejections
  • common/fileBasedCancellationUtils.ts — File-based cancellation utilities and a provider for creating filesystem-backed cancellation tokens
  • common/fileSystem.ts — File system provider interfaces and a virtual Dirent class for pluggable real or virtual file systems
  • common/fileWatcher.ts — File watcher types, null implementations, and a helper to filter ignored filesystem watch events
  • common/fullAccessHost.ts — Host for executing Python interpreters and external processes to get search paths, versions, and run code
  • common/host.ts — Provides host environment abstractions: Host interface, HostKind, script/process types, and NoAccessHost implementation
  • common/languageInfoUtils.ts — Provides utilities to dump and format token syntax and type information for debugging and MCP tools
  • common/languageServerInterface.ts — Language server interfaces and types for settings, window/command services, workspace and background analysis
  • common/logTracker.ts — Tracks nested logging blocks, measures durations and parsing stats, and emits conditional formatted console logs
  • common/lspUtils.ts — Helper utilities for LSP: convert LSPAny, map declarations to SymbolKind, and detect null progress reporters
  • common/memUtils.ts — Exports helpers for V8 heap statistics and total/free system memory
  • common/pathConsts.ts — Exports string constants for common Python filesystem paths and filenames
  • common/pathUtils.ts — Utilities for manipulating, normalizing, and matching filesystem paths, filenames, and wildcard file specs
  • common/positionUtils.ts — Converts between file offsets and line/column positions, ranges, and line end locations
  • common/processUtils.ts — Terminates processes and their child process trees across platforms
  • common/progressReporter.ts — Provides an interface and a tracker that manages and delegates progress reporting for a language server client
  • common/pythonVersion.ts — Defines PythonVersion type with parsing, stringifying, comparison helpers and predefined Python 3.x version constants
  • common/realFileSystem.ts — Provides real filesystem access, temp file handling, ZIP/egg archive support, and file watching integration for Pyright
  • common/serviceKeys.ts — Provides ServiceKey and GroupServiceKey constants for registering core analyzer and language-server services
  • common/serviceProvider.ts — Registry for singleton and group services with add, remove, get, clone, and dispose operations
  • common/serviceProviderExtensions.ts — ServiceProvider extensions offering accessors and a default SourceFileFactory for common services
  • common/streamUtils.ts — Provides helpers to read all stdin as a Buffer or as a string
  • common/stringUtils.ts — Utility functions for string comparison, hashing, searching, counting, truncation, and escaping
  • common/textEditTracker.ts — Tracks and manages per-file text edits, merging overlapping edits and recording node removals
  • common/textRange.ts — Defines types and utilities for text ranges, positions, and document ranges
  • common/textRangeCollection.ts — Maintains an ordered collection of text ranges and provides fast index and lookup utilities
  • common/timing.ts — Duration and timing utilities that record, aggregate, and print operation runtimes
  • common/tomlUtils.ts — Provides TOML parsing utilities to convert TOML strings into JavaScript primitive objects
  • common/workspaceEditUtils.ts — Converts Pyright file edit actions to LSP WorkspaceEdit objects and applies edits to an EditableProgram

Cross-subsystem dependencies

Imported by (external):

Imports (external):