Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 2 callers
Function
serializeFiles
( files: FilesState, session: PlaygroundSession | null, )
playground/ty/src/Playground.tsx:579
↓ 2 callers
Function
server_capabilities
Creates the server capabilities based on the resolved client capabilities and resolved global settings from the initialization options.
crates/ty_server/src/capabilities.rs:441
↓ 2 callers
Function
server_diagnostic_options
Creates the default [`DiagnosticOptions`] for the server.
crates/ty_server/src/capabilities.rs:580
↓ 2 callers
Method
set
(&mut self, rule: Rule, enabled: bool)
crates/ruff_linter/src/registry/rule_set.rs:209
↓ 2 callers
Function
set_assignment_primary_annotation
Set an assignment's primary message and return whether a message was added.
crates/ty_python_semantic/src/types/diagnostic.rs:2283
↓ 2 callers
Method
set_config_file_override
(&mut self, path: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:424
↓ 2 callers
Method
set_constructed_instance_type
(&mut self, instance_type: Type<'db>)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:89
↓ 2 callers
Method
set_constructor_context
( &mut self, db: &'db dyn Db, constructor_context: ConstructorContext<'db>, )
crates/ty_python_semantic/src/types/call/bind/constructor.rs:851
↓ 2 callers
Method
set_context
Overwrite the error context tree with a new root context and child nodes.
crates/ty_python_semantic/src/types/relation.rs:1868
↓ 2 callers
Method
set_enabled
(&self, enabled: bool)
crates/ty_python_semantic/src/types/relation_error.rs:964
↓ 2 callers
Method
set_fallback_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:432
↓ 2 callers
Method
set_finish_message
(&self, message: String)
crates/ty_server/src/server/lazy_work_done_progress.rs:86
↓ 2 callers
Method
set_globals
Set the [`Globals`] for the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1752
↓ 2 callers
Method
set_headline_message
Sets the headline message for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:238
↓ 2 callers
Method
set_if_none
(&mut self, first: First<'a>)
crates/ruff_python_formatter/src/pattern/mod.rs:390
↓ 2 callers
Method
set_if_none
(&mut self, first: First<'a>)
crates/ruff_python_formatter/src/expression/mod.rs:820
↓ 2 callers
Method
set_implicitly_invoked
Record that these bindings were reached through an implicit method lookup.
crates/ty_python_semantic/src/types/call/bind.rs:946
↓ 2 callers
Method
set_indent_align
(mut self, count: NonZeroU8)
crates/ruff_formatter/src/printer/call_stack.rs:69
↓ 2 callers
Method
set_interpolated_string_state
( &mut self, interpolated_string_state: InterpolatedStringState, )
crates/ruff_python_formatter/src/context.rs:118
↓ 2 callers
Function
set_max_parallelism
Sets the maximum number of tasks to process in parallel. Returns the supplied limit if [`max_parallelism`] has already been read or set.
crates/ruff_db/src/lib.rs:88
↓ 2 callers
Method
set_preview
(&mut self, preview: bool)
crates/ruff_server/src/session/options.rs:61
↓ 2 callers
Method
set_primary_annotation_message
Set the message on the primary annotation for this diagnostic. If a message already exists on the primary annotation, then this overwrites the existi
crates/ruff_linter/src/checkers/ast/mod.rs:3850
↓ 2 callers
Method
set_secondary_code
Set the secondary code for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:465
↓ 2 callers
Method
set_shutdown_requested
(&mut self, requested: bool)
crates/ty_server/src/session.rs:227
↓ 2 callers
Method
set_singleton_constraints
Apply a merged result to a matching singleton, preserving this place's definition IDs.
crates/ty_python_core/src/use_def/place_state.rs:756
↓ 2 callers
Method
set_source_overload_index
(&mut self, index: Option<NonZeroU32>)
crates/ty_python_semantic/src/types/signatures.rs:2530
↓ 2 callers
Method
set_span
Sets the span on this annotation.
crates/ruff_db/src/diagnostic/mod.rs:858
↓ 2 callers
Method
set_status
(self, status: Status)
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_0.py:78
↓ 2 callers
Method
set_stop
(&mut self)
crates/ty_project/src/watch/watcher.rs:140
↓ 2 callers
Method
set_style_range
Set `style` for `line`, `col_start..col_end` range if: 1. That line and column range exist in `StyledBuffer` 2. `overwrite` is `true` or existing styl
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:142
↓ 2 callers
Function
set_up_logging
(level: LogLevel)
crates/ruff_linter/src/logging.rs:124
↓ 2 callers
Function
set_uv_envs
(command: &mut Command, case: &CliTest, virtual_env: Option<&Path>)
crates/ty/tests/cli/uv_workspace.rs:90
↓ 2 callers
Method
set_verbose
(self, db: &mut dyn Db, verbose: bool)
crates/ty_project/src/lib.rs:628
↓ 2 callers
Method
set_version
(&mut self, version: DocumentVersion)
crates/ty_server/src/session.rs:2174
↓ 2 callers
Function
setattr_behavior
Return the model's assignment behavior for `attribute`, or `None` if it cannot be determined.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:635
↓ 2 callers
Method
settings_for_uri
(&self, uri: &Uri)
crates/ruff_server/src/session/index.rs:364
↓ 2 callers
Method
settings_impl
(&self)
crates/ruff_server/src/session/settings.rs:37
↓ 2 callers
Method
setup
Setup a real-world project for benchmarking
crates/ruff_benchmark/src/real_world_projects.rs:63
↓ 2 callers
Function
setupMonaco
( monaco: Monaco, settingsSchema: { fileMatch: [string]; uri: string; schema: object; }, )
playground/shared/src/setupMonaco.tsx:39
↓ 2 callers
Function
setup_logging_with_filter
Sets up logging for the current thread and uses the passed filter to filter the shown events. Useful for capturing the tracing output in a failing tes
crates/ruff_db/src/testing.rs:174
↓ 2 callers
Function
setup_micro_case_inner
(code: &str, venv_path: Option<&Path>)
crates/ruff_benchmark/benches/ty_shared/mod.rs:39
↓ 2 callers
Function
setup_tracing
( level: VerbosityLevel, color: TerminalColor, writer: impl for<'a> MakeWriter<'a> + Send + Sync +
crates/ty/src/logging.rs:109
↓ 2 callers
Method
shared_place_table
Shares the existing place table with another per-scope query result.
crates/ty_python_core/src/lib.rs:392
↓ 2 callers
Method
short_message
Abbreviate the message
crates/ruff_annotate_snippets/src/renderer/mod.rs:162
↓ 2 callers
Method
should_check_downstream
For constructors which may have downstreams (that is, metaclass `__call__` or `__new__`), analyze their overloads to determine whether to check downst
crates/ty_python_semantic/src/types/call/bind/constructor.rs:267
↓ 2 callers
Method
should_check_file
(&self, file: File)
crates/ty_project/src/db.rs:663
↓ 2 callers
Method
should_drop
(&mut self, element: &FormatElement)
crates/ruff_formatter/src/buffer.rs:532
↓ 2 callers
Method
should_edit_imported_name_for_import_from
Chooses an imported name edit for an import-from statement, including re-exports. For example, renaming `pkg.old` can change the imported name `old`
crates/ty_ide/src/will_rename.rs:616
↓ 2 callers
Method
should_edit_imported_name_for_plain_import
Chooses an imported name edit for a plain import statement (e.g., `pkg.old` to `pkg.new` in the statement `import pkg.old`).
crates/ty_ide/src/will_rename.rs:593
↓ 2 callers
Method
should_edit_module_member
Decides whether to edit `bound_name` when it is imported from `resolved_module` (e.g., `old` in `from facade import old`) or accessed as an attribute
crates/ty_ide/src/will_rename.rs:714
↓ 2 callers
Method
should_expand_intersection
( &self, db: &'db dyn Db, intersection: IntersectionType<'db>, )
crates/ty_python_semantic/src/types/relation.rs:1433
↓ 2 callers
Method
should_freshen
( &self, db: &'db dyn Db, generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:949
↓ 2 callers
Method
should_index_file
Returns `true` if an included file should be indexed.
crates/ty_project/src/glob.rs:148
↓ 2 callers
Function
should_insert_blank_line_after_class_in_stub_file
Checks if an empty line should be inserted after a class definition. This is only valid if the [`blank_line_after_nested_stub_class`](https://github.
crates/ruff_python_formatter/src/statement/suite.rs:615
↓ 2 callers
Method
should_retain_constraint
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, bound: Option<Type<'db
crates/ty_python_semantic/src/types/constraints/variables.rs:26
↓ 2 callers
Method
should_retry_after_provisional_arity
( &self, expansions: &CallArgumentExpansions<'_, '_, 'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:4285
↓ 2 callers
Method
should_visit_lazy_type_attributes
(&self)
crates/ty_python_semantic/src/types/visitor.rs:535
↓ 2 callers
Function
show_fix_status
Return `true` if the [`Printer`] should indicate that a rule is fixable.
crates/ruff/src/printer.rs:457
↓ 2 callers
Function
side_effect
Return whether `expr` has no side effects, maybe has side effects, or definitely has side effects. Unlike [`contains_effect`], which returns a simple
crates/ruff_python_ast/src/helpers.rs:234
↓ 2 callers
Method
simplified
Returns the provenance of a bound produced by simplifying two existing bounds. Simplifying bounds can make one input redundant, and a redundant input
crates/ty_python_semantic/src/types/constraints/variables.rs:85
↓ 2 callers
Method
simulate_runtime_load
Simulates a runtime load of a given [`ast::ExprName`]. This should not be run until after all the bindings have been visited. The main purpose of th
crates/ruff_python_semantic/src/model.rs:938
↓ 2 callers
Method
single_definition
(self)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:480
↓ 2 callers
Method
single_item
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:1512
↓ 2 callers
Method
single_key
(&self)
crates/ty_python_semantic/src/types/equality/enums.rs:1036
↓ 2 callers
Method
single_required_positional_parameter_type
(&self)
crates/ty_python_semantic/src/types/signatures.rs:1335
↓ 2 callers
Function
site_packages_editables
( db: &'db dyn Db, environment: ResolverEnvironment<'db>, )
crates/ty_module_resolver/src/resolve.rs:1034
↓ 2 callers
Function
site_packages_filter
(python_version: &str)
crates/ty/tests/self_environment.rs:398
↓ 2 callers
Method
size_hint
(&self)
crates/ruff_python_ast/src/nodes.rs:329
↓ 2 callers
Function
skip_comment
(src: str, pos: Pos)
crates/ruff_benchmark/resources/tomllib/_parser.py:263
↓ 2 callers
Method
skip_content
Skips all content until it finds the corresponding end tag with the given kind.
crates/ruff_formatter/src/printer/queue.rs:40
↓ 2 callers
Function
skip_range
( first: &Stmt, statements: &[Stmt], context: &PyFormatContext, )
crates/ruff_python_formatter/src/statement/suite.rs:931
↓ 2 callers
Method
skip_source_order
(self)
crates/ruff_python_ast/generate.py:208
↓ 2 callers
Method
slice
Returns the slice into the source code.
crates/ruff_python_formatter/src/comments/visitor.rs:323
↓ 2 callers
Method
slot_definition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/slots.rs:290
↓ 2 callers
Function
slots_members
(body: &[Stmt])
crates/ruff_linter/src/rules/pylint/rules/redefined_slots_in_subclass.rs:124
↓ 2 callers
Method
snapshot
(&self)
crates/ty_python_semantic/src/types/constraints/paths.rs:446
↓ 2 callers
Function
snapshot_diagnostics
( test: &MarkdownTest<'_, '_, C>, db: &dyn Db, tool_name: &'static str, relative_fixture_path:
crates/mdtest/src/lib.rs:700
↓ 2 callers
Method
snapshot_document
Captures client settings and a target for a document request.
crates/ty_server/src/session.rs:1252
↓ 2 callers
Method
snapshot_enclosing_state
( &mut self, enclosing_place: ScopedPlaceId, enclosing_place_expr: PlaceExprRef,
crates/ty_python_core/src/use_def.rs:3066
↓ 2 callers
Function
snapshot_input_file_for_test
(root: &str, test_name: &str)
crates/ruff_python_formatter/tests/fixtures.rs:31
↓ 2 callers
Function
snapshot_input_file_for_test
(root: &str, test_name: &str)
crates/ruff_python_parser/tests/fixtures.rs:50
↓ 2 callers
Method
snippets
(self, snippets: bool)
crates/ty_ide/src/completion.rs:145
↓ 2 callers
Method
solve_hash_map_with
( &mut self, generic_context: GenericContext<'db>, choose: &mut impl FnMut(
crates/ty_python_semantic/src/types/generics.rs:3403
↓ 2 callers
Method
solve_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:3123
↓ 2 callers
Function
some_func
( unformatted, args )
crates/ruff_python_formatter/resources/test/fixtures/black/cases/fmtskip8.py:2
↓ 2 callers
Function
sort_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 callers
Function
sort_workspace_report_items
(items: &mut [WorkspaceDocumentDiagnosticReport])
crates/ty_server/tests/e2e/pull_diagnostics.rs:1201
↓ 2 callers
Method
source
Return the [`SourceValue`] of the cell.
crates/ruff_notebook/src/cell.rs:25
↓ 2 callers
Method
source_edit
Constructs a source edit, such as replacing the imported name `old` with `new`.
crates/ty_ide/src/will_rename.rs:517
↓ 2 callers
Function
source_location_to_position
(location: &SourceLocation)
crates/ruff_server/src/edit/range.rs:117
↓ 2 callers
Method
source_map
Returns the map from extracted TOML offsets to their original script offsets.
crates/ruff_python_ast/src/script.rs:31
↓ 2 callers
Method
source_name
(&self)
crates/ruff_python_semantic/src/binding.rs:767
↓ 2 callers
Method
source_node
Returns the source expression for this base entry.
crates/ty_python_semantic/src/types/class/static_literal.rs:3528
↓ 2 callers
Method
source_order_data
(&self, source_order: SourceOrderId)
crates/ty_python_semantic/src/types/constraints.rs:1493
↓ 2 callers
Method
source_place
Separately parsed annotations and synthetic references resolve from their syntax.
crates/ty_python_semantic/src/types/infer/builder.rs:11036
↓ 2 callers
Method
source_text
(&self)
crates/ty_python_core/src/builder.rs:3482
↓ 2 callers
Method
source_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:517
↓ 2 callers
Method
source_type_for_format
Get the source type for formatter-oriented operations.
crates/ruff_server/src/session/index.rs:602
↓ 2 callers
Method
source_types_mut
(&mut self)
crates/ty_python_semantic/src/types/call/arguments.rs:115
↓ 2 callers
Function
span_to_location
(span: &Span, context: &LspDiagnosticContext)
crates/ruff_server/src/lint.rs:546
← previous
next →
7,001–7,100 of 31,766, ranked by callers