MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions31,562 in github.com/astral-sh/ruff

↓ 2 callersMethodsnapshot_enclosing_state
( &mut self, enclosing_place: ScopedPlaceId, enclosing_place_expr: PlaceExprRef,
crates/ty_python_core/src/use_def.rs:3066
↓ 2 callersFunctionsnapshot_input_file_for_test
(root: &str, test_name: &str)
crates/ruff_python_formatter/tests/fixtures.rs:31
↓ 2 callersFunctionsnapshot_input_file_for_test
(root: &str, test_name: &str)
crates/ruff_python_parser/tests/fixtures.rs:50
↓ 2 callersMethodsnippets
(self, snippets: bool)
crates/ty_ide/src/completion.rs:145
↓ 2 callersMethodsolve_pending_projection
Shares recovery and normalization between streaming merged projection and correlated solution collection. The projection decides which solved evidence
crates/ty_python_semantic/src/types/generics.rs:3094
↓ 2 callersFunctionsome_func
( unformatted, args )
crates/ruff_python_formatter/resources/test/fixtures/black/cases/fmtskip8.py:2
↓ 2 callersFunctionsort_single_line_elements_sequence
Create a string representing a fixed-up single-line definition of `__all__` or `__slots__` (etc.), that can be inserted into the source code as a `ran
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:220
↓ 2 callersFunctionsort_workspace_report_items
(items: &mut [WorkspaceDocumentDiagnosticReport])
crates/ty_server/tests/e2e/pull_diagnostics.rs:1167
↓ 2 callersMethodsource
Return the [`SourceValue`] of the cell.
crates/ruff_notebook/src/cell.rs:25
↓ 2 callersMethodsource_edit
Constructs a source edit, such as replacing the imported name `old` with `new`.
crates/ty_ide/src/will_rename.rs:419
↓ 2 callersFunctionsource_location_to_position
(location: &SourceLocation)
crates/ruff_server/src/edit/range.rs:119
↓ 2 callersMethodsource_map
Returns the map from extracted TOML offsets to their original script offsets.
crates/ruff_python_ast/src/script.rs:31
↓ 2 callersMethodsource_name
(&self)
crates/ruff_python_semantic/src/binding.rs:767
↓ 2 callersMethodsource_node
Returns the source expression for this base entry.
crates/ty_python_semantic/src/types/class/static_literal.rs:3485
↓ 2 callersMethodsource_order_data
(&self, source_order: SourceOrderId)
crates/ty_python_semantic/src/types/constraints.rs:1564
↓ 2 callersMethodsource_parameter_index
Returns the original source parameter's position before variadic expansion.
crates/ty_python_semantic/src/types/signatures.rs:6216
↓ 2 callersMethodsource_place
Separately parsed annotations and synthetic references resolve from their syntax.
crates/ty_python_semantic/src/types/infer/builder.rs:10889
↓ 2 callersMethodsource_text
(&self)
crates/ty_python_core/src/builder.rs:3482
↓ 2 callersMethodsource_tokens
Returns the [`Tokens`] for the parsed source file. Unlike [`Self::tokens`], this method always returns the tokens for the current file, even when wi
crates/ruff_linter/src/checkers/ast/mod.rs:512
↓ 2 callersMethodsource_type_for_format
Get the source type for formatter-oriented operations.
crates/ruff_server/src/session/index.rs:602
↓ 2 callersMethodsource_types_mut
(&mut self)
crates/ty_python_semantic/src/types/call/arguments.rs:115
↓ 2 callersFunctionspan_to_location
(span: &Span, context: &LspDiagnosticContext)
crates/ruff_server/src/lint.rs:546
↓ 2 callersMethodspec
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/named_tuple.rs:448
↓ 2 callersFunctionspecial_member_for_enum_complement
Return a precise enum-owned `.name`/`.value` attribute for a complement when possible. If a complement carries dynamic rest components, expanding it
crates/ty_python_semantic/src/types/enums.rs:457
↓ 2 callersFunctionspecialization_argument_is_static
Check only closed, directly inspectable types. Recursive substitutions may additionally use the protocol's own parameters, whose bounds and defaults a
crates/ty_python_semantic/src/types/instance.rs:799
↓ 2 callersMethodspecialization_or_default
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:767
↓ 2 callersMethodspecialize_for_bound_receiver
Specializes this signature using the type variables determined by its bound receiver. Matching the receiver can constrain type variables that occur e
crates/ty_python_semantic/src/types/signatures.rs:1713
↓ 2 callersFunctionspecialize_generic_class_from_solutions
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, target_class: ClassLiteral<'db>, solutions:
crates/ty_python_semantic/src/types/narrow.rs:1049
↓ 2 callersMethodspecialized_value_type
Resolve this specialization while preserving the marker of an unguarded cycle.
crates/ty_python_semantic/src/types/type_alias.rs:593
↓ 2 callersMethodspecificity
(&self)
crates/ruff_linter/src/rule_selector.rs:413
↓ 2 callersFunctionsplit
(s: &'a str, splitters: &'b [u8])
crates/ruff_unicode_names2_generator/src/util.rs:16
↓ 2 callersMethodsplit_by_extra_paths
Splits the indexed stub package paths into extra paths and remaining paths. The first-phase stub override search uses the extra paths. The second pha
crates/ty_module_resolver/src/resolve.rs:521
↓ 2 callersFunctionsplit_names
(names: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:154
↓ 2 callersMethodstack
(&self)
crates/ruff_formatter/src/printer/call_stack.rs:207
↓ 2 callersMethodstack_mut
(&mut self)
crates/ruff_formatter/src/printer/call_stack.rs:211
↓ 2 callersMethodstack_size
(self, size: usize)
crates/ruff_server/src/server/schedule/thread.rs:55
↓ 2 callersMethodstandalone_expression_type
Infer the type of a standalone expression. # Panics This function panics if `expr` was not marked as a standalone expression during semantic indexin
crates/ty_python_semantic/src/dunder_all.rs:185
↓ 2 callersFunctionstarred_assignment_element
( context: &InferContext<'db, '_>, definition_kind: &DefinitionKind<'db>, target_type: Type<'db>,
crates/ty_python_semantic/src/types/diagnostic.rs:2168
↓ 2 callersFunctionstarred_sequence_pattern_type
Build the structural type used for a sequence pattern containing `*rest`. Fixed prefix elements use non-negative indices and fixed suffix elements us
crates/ty_python_semantic/src/types/match_pattern.rs:283
↓ 2 callersMethodstart
(&self, action: &str, target: impl Display)
crates/ty/src/lib.rs:863
↓ 2 callersFunctionstart_of_block
()
crates/ruff_python_importer/src/insertion.rs:569
↓ 2 callersFunctionstarts_container_block
Returns whether `line` starts a block that owns its indented contents.
crates/ty_ide/src/docstring/document/syntax.rs:480
↓ 2 callersFunctionstarts_suppression
Returns `true` if the statements coming after `leading_or_trailing_comments` are suppressed. The result is only correct if called for statement comme
crates/ruff_python_formatter/src/verbatim.rs:27
↓ 2 callersMethodstate
(&self)
crates/ruff_formatter/src/formatter.rs:237
↓ 2 callersMethodstate
(self)
crates/ty_python_core/src/use_def.rs:747
↓ 2 callersMethodstate_mut
(&mut self)
crates/ruff_formatter/src/formatter.rs:241
↓ 2 callersFunctionstatement_deletion_range
Finds the range necessary to delete a statement (including any semicolons around it). Returns the range and whether there were multiple statements on
crates/ruff_linter/src/rules/perflint/helpers.rs:61
↓ 2 callersFunctionstatic_dunder_all
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_core/src/static_dunder_all.rs:46
↓ 2 callersFunctionstatic_member_type_for_attribute
Returns the descriptor object type for an attribute expression `x.y`, without invoking the descriptor protocol. This corresponds to `inspect.getattr_s
crates/ty_python_semantic/src/types/ide_support.rs:491
↓ 2 callersFunctionstatically_known_parametrize_names
Returns statically known pytest parametrization names from a string or fixed-length iterable.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1469
↓ 2 callersMethodstdlib
(&self, mode: ModuleResolveMode)
crates/ty_module_resolver/src/resolve.rs:946
↓ 2 callersFunctionstdlib_path_to_module_name
(relative_path: &Utf8Path)
crates/ty_module_resolver/src/path.rs:513
↓ 2 callersMethodstdout_general
Return the [`Stdout`] stream for general messages. The returned stream will be disabled when [`VerbosityLevel::Quiet`] is used.
crates/ty/src/printer.rs:58
↓ 2 callersMethodstdout_important
Return the [`Stdout`] stream for important messages. Unlike [`Self::stdout_general`], the returned stream will be enabled when [`VerbosityLevel::Quie
crates/ty/src/printer.rs:44
↓ 2 callersMethodstmts
Returns the statements comprising the basic block at the given index
crates/ruff_python_semantic/src/cfg/graph.rs:41
↓ 2 callersMethodstop
(self)
crates/ty/src/lib.rs:930
↓ 2 callersMethodstop
(self)
crates/ruff_formatter/src/buffer.rs:682
↓ 2 callersMethodstr
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:10781
↓ 2 callersMethodstream_for_requested_summary
Return the [`Stdout`] stream for a summary message that was explicitly requested by the user. For example, in `ty version` the user has requested the
crates/ty/src/printer.rs:76
↓ 2 callersFunctionstring_literal_values
Given a string literal or a union of string literals, return an iterator over the contained strings, or `None` if the type is neither.
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:47
↓ 2 callersFunctionstringify
(settings: Settings)
playground/ruff/src/Editor/settings.ts:9
↓ 2 callersFunctionstub_file_to_real_module
Resolves the runtime module corresponding to a stub file. Modules that are only available as stubs, including built-in modules, return `None`.
crates/ty_module_resolver/src/resolve.rs:378
↓ 2 callersMethodstub_placeholder_binding_type
(&self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:3565
↓ 2 callersFunctionsub_ast_level
sub-AST level is stored in the top two bits
crates/ruff_python_ast/src/node_index.rs:100
↓ 2 callersMethodsub_diagnostics_mut
Returns a mutable borrow of the sub-diagnostics of this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:372
↓ 2 callersMethodsubmodule_completions
Returns completions for submodules of the given module.
crates/ty_python_semantic/src/semantic_model.rs:282
↓ 2 callersMethodsubstitute_one_typevar
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, bound_typevar: BoundTy
crates/ty_python_semantic/src/types/generics.rs:2442
↓ 2 callersMethodsuccessful_sequence_pattern_type
( &self, kind: &SequencePatternPredicateKind<'db>, matched_element_types: &[Type<'db>]
crates/ty_python_semantic/src/types/narrow.rs:3229
↓ 2 callersMethodsuccessful_sequence_subject_type
Return the type established while a sequence pattern is being evaluated. Exact tuples can refine their tuple element types with the facts established
crates/ty_python_semantic/src/types/narrow.rs:3167
↓ 2 callersMethodsuggestion
(&self)
crates/ruff_linter/src/rules/refurb/rules/check_and_remove_from_set.rs:51
↓ 2 callersMethodsuggestion
(&self)
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:56
↓ 2 callersMethodsummary
(&self)
crates/ty_python_semantic/src/lint.rs:98
↓ 2 callersMethodsupports_diagnostic_dynamic_registration
Returns `true` if the client supports dynamic registration for diagnostic capabilities.
crates/ty_server/src/capabilities.rs:182
↓ 2 callersMethodsupports_full_diagnostic_output
Returns `true` if the client supports opening fully rendered diagnostics.
crates/ty_server/src/capabilities.rs:192
↓ 2 callersMethodsupports_multiline_semantic_tokens
Returns `true` if the client supports multiline semantic tokens.
crates/ty_server/src/capabilities.rs:144
↓ 2 callersMethodsupports_overload_aggregation
Aggregation compares parameter and return types. A receiver constraint imposes an additional obligation, and a `ParamSpec` value has no meaningful ret
crates/ty_python_semantic/src/types/signatures.rs:1373
↓ 2 callersMethodsupports_pull_diagnostics
Returns `true` if the client supports pull diagnostics.
crates/ty_server/src/capabilities.rs:114
↓ 2 callersMethodsupports_self_binding
Returns `true` if this type supports eager `Self` binding via `bind_self_typevars`. `FunctionLiteral`, `BoundMethod`, and function-like `Callable` ty
crates/ty_python_semantic/src/types.rs:2598
↓ 2 callersMethodsupports_work_done_progress
Returns `true` if the client supports work done progress.
crates/ty_server/src/capabilities.rs:164
↓ 2 callersFunctionsuppress_all_diagnostics
Adds suppressions to all lint diagnostics and writes the changed files back to disk. Returns how many diagnostics were suppressed along the remaining
crates/ty_python_semantic/src/fixes.rs:40
↓ 2 callersMethodsuppress_diagnostics
Prevents diagnostic construction for this inference context.
crates/ty_python_semantic/src/types/context.rs:282
↓ 2 callersMethodsuppress_errors_for_no_type_check
( &mut self, definition: Definition<'db>, function: &ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:818
↓ 2 callersFunctionsuppression_range
Returns the suppression range for the given `range`. The suppression range is defined as: `start`: The `end` of the preceding `Newline` or `NonLogic
crates/ty_python_semantic/src/suppression/add_ignore.rs:196
↓ 2 callersFunctionsymbol
( db: &'db dyn Db, scope: ScopeId<'db>, name: &str, considered_definitions: ConsideredDefiniti
crates/ty_python_semantic/src/place.rs:473
↓ 2 callersMethodsymbol_binding_definition_ids
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:2987
↓ 2 callersMethodsymbol_has_scope_declaration
( self, file_scope: FileScopeId, place_expr: PlaceExprRef, )
crates/ty_python_semantic/src/place_load.rs:1164
↓ 2 callersMethodsymbol_id
(&self)
crates/ty_python_core/src/definition.rs:1253
↓ 2 callersMethodsymbol_is_global_in_scope
(&self, symbol: ScopedSymbolId, scope: FileScopeId)
crates/ty_python_core/src/lib.rs:501
↓ 2 callersMethodsymbol_live_binding_status
Returns the current boundness of `symbol` after applying pending reachability constraints. Bindings on statically unreachable paths do not contribute
crates/ty_python_core/src/use_def.rs:3003
↓ 2 callersMethodsymbol_name
Returns the left most part of the member expression, e.g. `x` in `x.y.z`. This is the symbol on which the member access is performed.
crates/ty_python_core/src/member.rs:193
↓ 2 callersFunctionsymbol_params
(uri: Uri)
crates/ty_server/tests/e2e/closed_documents.rs:356
↓ 2 callersMethodsymbol_resolves_to_global_scope
Returns `true` if the given symbol in the given scope resolves to the global scope, either because: 1. The given scope *is* the global scope. 2. The
crates/ty_python_core/src/lib.rs:516
↓ 2 callersFunctionsymbols_for_file
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_ide/src/symbols.rs:395
↓ 2 callersMethodsync
Syncs the [`File`]'s state with the state of the file on the system.
crates/ruff_db/src/files.rs:480
↓ 2 callersMethodsyncOptions
()
playground/ty/src/Playground.tsx:734
↓ 2 callersMethodsync_workspace
(&self)
crates/ty_project/src/uv/environments.rs:1253
↓ 2 callersFunctionsynchronize_scripts
(case: &mut TestCase, scripts: &[File])
crates/ty/tests/file_watching.rs:4535
↓ 2 callersMethodsynchronize_scripts
(&mut self, db: &mut ProjectDatabase, scripts: &[File])
crates/ty/src/lib.rs:631
↓ 2 callersMethodsyntax_error
(&self, kind: ParseErrorKind)
crates/ty_python_semantic/src/suppression/parser.rs:148
↓ 2 callersFunctionsynthesize_namedtuple_class_member
Synthesize a namedtuple class member given the field information. This is used by both `DynamicNamedTupleLiteral` and `StaticClassLiteral` (for decla
crates/ty_python_semantic/src/types/class/named_tuple.rs:30
← previousnext →7,001–7,100 of 31,562, ranked by callers