MCPcopy Create free account

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

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

↓ 4 callersFunctionsections
Returns recognized Google-style sections in source order. `source` must have already undergone PEP-257 trimming and universal newline normalization (
crates/ty_ide/src/docstring/document/google.rs:72
↓ 4 callersMethodselect
Waits for a main-loop action, project wakeup, or client message, in that order.
crates/ty_server/src/server/main_loop.rs:333
↓ 4 callersFunctionselect_preferred_suppression
Selects between applicable suppressions yielded in reverse source order. Candidates covering the same endpoint are nested, so the first (innermost) c
crates/ty_python_semantic/src/suppression.rs:455
↓ 4 callersFunctionsemantic_tokens
Generates semantic tokens for a Python file within the specified range. Pass None to get tokens for the entire file.
crates/ty_ide/src/semantic_tokens.rs:196
↓ 4 callersMethodsemantic_tokens_full_request
(&mut self, uri: &Uri)
crates/ty_server/tests/e2e/main.rs:1175
↓ 4 callersMethodsequence
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/arguments.rs:213
↓ 4 callersFunctionsequence_elts
Extract the element slice from a list or tuple expression.
crates/ty_python_semantic/src/types/unpacker.rs:720
↓ 4 callersMethodset_documentation_url
(&mut self, url: Option<String>)
crates/ruff_db/src/diagnostic/mod.rs:417
↓ 4 callersMethodset_node_level
(&mut self, level: NodeLevel)
crates/ruff_python_formatter/src/context.rs:61
↓ 4 callersMethodset_noqa_offset
Set the remapped offset for a suppression comment.
crates/ruff_db/src/diagnostic/mod.rs:442
↓ 4 callersMethodset_open_files
(self, db: &mut dyn Db, open_files: FxHashSet<File>)
crates/ty_project/src/lib.rs:672
↓ 4 callersFunctionset_search_paths
(db: &mut TestDb, search_paths: &SearchPathSettings)
crates/ty_ide/src/will_rename.rs:2462
↓ 4 callersMethodsettings
(&self)
crates/ty_server/src/session.rs:1867
↓ 4 callersFunctionsetup_uv_with
Like [`setup_uv`], but calls `prepare` after writing the files and before running uv.
crates/ty/tests/file_watching.rs:4438
↓ 4 callersMethodshadowed_binding
Returns the ID of the binding that the given binding shadows, if any.
crates/ruff_python_semantic/src/scope.rs:125
↓ 4 callersMethodshadowed_id
(&self)
crates/ruff_python_semantic/src/model.rs:2595
↓ 4 callersFunctionshutdown_and_await_workspace_diagnostic
( mut server: TestServer, request_id: &RequestId, )
crates/ty_server/tests/e2e/pull_diagnostics.rs:1595
↓ 4 callersMethodsignature
(&self)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:80
↓ 4 callersFunctionsignature_help
Signature help information for function calls at the given position
crates/ty_ide/src/signature_help.rs:79
↓ 4 callersMethodsignature_with_inferred_return_type
The signature of this function, with the return type possibly inferred from the body. TODO: We should rename this function to `signature` and use it
crates/ty_python_semantic/src/types/function.rs:1771
↓ 4 callersMethodsingleline
(&self)
crates/ty_python_semantic/src/types/display.rs:175
↓ 4 callersMethodskip_bytes
(&mut self, bytes: usize)
crates/ruff_python_parser/src/string.rs:113
↓ 4 callersMethodsolve
( &self, constraints: &ConstraintSetBuilder<'db>, builder: &mut SpecializationBuilder<
crates/ty_python_semantic/src/types/call/bind.rs:7200
↓ 4 callersMethodsolve_pending_with
Solves the call once, retaining correlated alternatives and deriving their compatibility projection from the same bindings.
crates/ty_python_semantic/src/types/generics.rs:3018
↓ 4 callersMethodsolve_with
Solves each path by applying a per-typevar solver function, collecting retained solutions. A genuinely unsolved variable does not invalidate a path.
crates/ty_python_semantic/src/types/constraints.rs:4165
↓ 4 callersMethodsome_method
()
crates/ruff_linter/resources/test/fixtures/flake8_self/SLF001.py:10
↓ 4 callersFunctionsomething
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/if.py:53
↓ 4 callersFunctionsort_dunder_all
RUF022 Sort a tuple or list that defines or mutates the global variable `__all__`. This routine checks whether the tuple or list is sorted, and emits
crates/ruff_linter/src/rules/ruff/rules/sort_dunder_all.rs:176
↓ 4 callersMethodsource_code
(&self)
crates/ruff_formatter/src/lib.rs:247
↓ 4 callersMethodsource_overload_index
Returns this signature's position in its defining function's overload list.
crates/ty_python_semantic/src/types/signatures.rs:2557
↓ 4 callersMethodsource_parameter_index
Locates the source parameter that accepted a forwarded argument. An unpacked variadic annotation can expand one source declaration into several calla
crates/ty_python_semantic/src/types/call/bind.rs:10299
↓ 4 callersMethodsource_range
The range the formatted code corresponds to in the source document.
crates/ruff_formatter/src/lib.rs:557
↓ 4 callersMethodsource_type_for_lint
Get the source type for linter-oriented operations.
crates/ruff_server/src/session/index.rs:589
↓ 4 callersMethodspan
Returns the complete single-backtick span following the role name. For `` :class:`Model <pkg.Model>` ``, this returns the span `` `Model <pkg.Model>`
crates/ty_ide/src/docstring/document/syntax.rs:196
↓ 4 callersMethodspan_to_locations
(&self, span: Range<usize>)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:64
↓ 4 callersMethodspecialization_error
Reports why a type variable's declared bound or constraints cannot be satisfied. Paths whose lower bounds violate the same declared upper bound in a
crates/ty_python_semantic/src/types/generics.rs:2740
↓ 4 callersMethodspecialize_self_domain
(self)
crates/ty_python_semantic/src/types/generics.rs:2356
↓ 4 callersMethodsrc_text
(&self, ranged: T)
crates/ruff_python_parser/src/parser/mod.rs:677
↓ 4 callersMethodstart_watching
Starts file-watching and waits until the watcher is ready to deliver events. Panics if the test is already watching.
crates/ty/tests/file_watching.rs:80
↓ 4 callersMethodstatements
Returns an [`Iterator`] over the statements, starting from the given [`NodeId`]. through to any parents.
crates/ruff_python_semantic/src/model.rs:1661
↓ 4 callersFunctionstr_width
(s: &str)
crates/ruff_annotate_snippets/src/renderer/render.rs:2397
↓ 4 callersMethodsub_diagnostics
(&self)
crates/ruff_db/src/diagnostic/mod.rs:367
↓ 4 callersMethodsupports_arbitrary_key_deletion
Returns whether operations that delete an arbitrary key are safe. Operations such as `clear()` and `popitem()` require a closed `TypedDict` or mutabl
crates/ty_python_semantic/src/types/typed_dict.rs:489
↓ 4 callersMethodsupports_workspace_diagnostic_refresh
Returns `true` if the client supports workspace diagnostic refresh.
crates/ty_server/src/capabilities.rs:94
↓ 4 callersMethodswap_remove_index
Remove the element at `index` from the collection. The element is removed by swapping it with the last element of the collection and popping it off,
crates/ty_python_semantic/src/types/set_theoretic.rs:923
↓ 4 callersFunctionsymbol_impl
Implementation of [`symbol`].
crates/ty_python_semantic/src/place.rs:1548
↓ 4 callersFunctionsymbols_for_file_global_only
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_ide/src/symbols.rs:415
↓ 4 callersMethodsync
Creates a new local task.
crates/ty_server/src/server/schedule/task.rs:86
↓ 4 callersMethodsystem
(&self)
crates/ty_python_semantic/src/db.rs:150
↓ 4 callersFunctionsystem_module_search_paths
Returns an iterator over all search paths pointing to a system path
crates/ty_module_resolver/src/lib.rs:44
↓ 4 callersFunctionsystem_path_to_directory
( db: &dyn Db, path: impl AsRef<SystemPath>, )
crates/ruff_db/src/files/directory.rs:80
↓ 4 callersMethodtake_thin_vec
(&mut self, mut snapshot: ScratchSnapshot)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:51
↓ 4 callersMethodtarget_kind
(&self)
crates/ty_python_core/src/definition.rs:1295
↓ 4 callersFunctionterminal_reachability
(id: ScopedReachabilityConstraintId)
crates/ty_python_semantic/src/reachability.rs:804
↓ 4 callersFunctiontest_file
(mock_typeshed: &VendoredFileSystem, path: &VendoredPath)
crates/ruff_db/src/vendored.rs:715
↓ 4 callersFunctiontest_nonexistent_path
(path: &str)
crates/ruff_db/src/vendored.rs:683
↓ 4 callersMethodtext
(&self, code: SourceCode<'a>)
crates/ruff_formatter/src/source_code.rs:69
↓ 4 callersMethodtext
(&self, text: &'a str)
crates/ruff_python_formatter/src/comments/mod.rs:177
↓ 4 callersMethodto_instance_unknown
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/class/known.rs:1282
↓ 4 callersMethodto_link
( &self, db: &dyn Db, src: Option<FileRange>, encoding: PositionEncoding,
crates/ty_server/src/document/location.rs:27
↓ 4 callersMethodto_non_generic_instance
Returns a non-generic instance of this class.
crates/ty_python_semantic/src/types/class.rs:1039
↓ 4 callersMethodto_range
(&self, text: &str, index: &LineIndex, encoding: PositionEncoding)
crates/ruff_server/src/edit/range.rs:67
↓ 4 callersMethodto_rule_selection
(&self, db: &dyn Db)
crates/ty_project/src/metadata/options.rs:1340
↓ 4 callersMethodto_search_paths
( &self, context: OptionsContext<'_>, project_name: &str, site_packages_paths:
crates/ty_project/src/metadata/options.rs:422
↓ 4 callersMethodto_settings
( &self, db: &dyn Db, strategy: &Strategy, )
crates/ty_project/src/metadata.rs:609
↓ 4 callersMethodto_settings
( &self, db: &dyn Db, context: OptionsContext<'_>, strategy: &Strategy, )
crates/ty_project/src/metadata/options.rs:550
↓ 4 callersMethodto_string_parts
(&self)
crates/ty_python_semantic/src/types/display.rs:804
↓ 4 callersMethodto_system_path
(&self)
crates/ty_module_resolver/src/path.rs:141
↓ 4 callersMethodtoken_range
Return the range of the token at the given offset. Returns an empty range at the given offset if there's no token at the offset, or if the offset is
crates/ruff_python_ast/src/token/tokens.rs:221
↓ 4 callersMethodtrailing_index
(&self)
crates/ruff_python_formatter/src/comments/map.rs:527
↓ 4 callersMethodtrailing_range
(&self)
crates/ruff_python_formatter/src/comments/map.rs:487
↓ 4 callersMethodtrailing_whitespace
Returns the whitespace *after* the `token` with the byte length
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:195
↓ 4 callersFunctiontraverse_literal
Traverse a "literal" type annotation, applying `func` to each literal member. The function is called with each expression in the literal (excluding d
crates/ruff_python_semantic/src/analyze/typing.rs:590
↓ 4 callersMethodtriple_quotes
Return `true` if the f-string is triple-quoted, i.e., it begins and ends with three consecutive quote characters. For example: `f"""{bar}"""`
crates/ruff_python_ast/src/nodes.rs:1310
↓ 4 callersMethodtruthiness
(&self)
crates/ty_python_semantic/src/types/tuple.rs:2568
↓ 4 callersMethodtry_enter_with_mode
Given the type of an object that is used as a context manager (i.e. in a `with` statement), return the return type of its `__enter__` or `__aenter__`
crates/ty_python_semantic/src/types/context_manager.rs:178
↓ 4 callersMethodtry_expression_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:1141
↓ 4 callersMethodtry_fold_solutions
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, inferable: TypeVarSet<
crates/ty_python_semantic/src/types/constraints/projection.rs:193
↓ 4 callersMethodtry_into_settings
(self)
crates/ruff_workspace/src/options.rs:1549
↓ 4 callersMethodtry_map
Maps captured parameter lists and `ParamSpec` references, retaining their intersection.
crates/ty_python_semantic/src/types.rs:2216
↓ 4 callersMethodtry_virtual_file
Tries to look up a virtual file by its path. Returns `None` if no such file exists yet.
crates/ruff_db/src/files.rs:240
↓ 4 callersMethodtuple_base_class
Compute the specialized tuple class that this namedtuple inherits from. For example, `namedtuple("Point", [("x", int), ("y", int)])` inherits from `t
crates/ty_python_semantic/src/types/class/named_tuple.rs:282
↓ 4 callersMethodtuple_runtime_element_specialization
Returns the specialization to use when the builtin tuple type parameter represents an individual runtime element. The builtin tuple class's type para
crates/ty_python_semantic/src/types/generics.rs:1371
↓ 4 callersFunctionty_path
(prefix: impl AsRef<Path>)
crates/ty/tests/cli/server.rs:248
↓ 4 callersMethodtyped_dict_key_expected_type
(&self, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:68
↓ 4 callersFunctiontyped_dict_matches_class_pattern
Return whether every runtime value represented by a `TypedDict` satisfies `class`. `TypedDict` is not a nominal subtype of `dict` in the static type
crates/ty_python_semantic/src/types/match_pattern.rs:113
↓ 4 callersMethodtypevar_id
(&mut self, db: &'db dyn Db, typevar: BoundTypeVarInstance<'db>)
crates/ty_python_semantic/src/types/constraints.rs:1391
↓ 4 callersFunctiontyping_self
Create a `typing.Self` type variable for a given class.
crates/ty_python_semantic/src/types/generics.rs:260
↓ 4 callersMethodunbound_signatures
The unbound signatures stored directly on an actual or synthesized function. Note that this function returns `None` for unions or intersections of cal
crates/ty_python_semantic/src/types/method.rs:201
↓ 4 callersMethodundecorated_type
(&self)
crates/ty_python_semantic/src/types/infer.rs:1901
↓ 4 callersMethodunderlying_function
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1263
↓ 4 callersMethodunion
Retain either alternative's deprecations: a union can invoke either accessor.
crates/ty_python_semantic/src/types.rs:1103
↓ 4 callersFunctionunion_deprecated_properties
Combine accessor deprecations from alternative lookup paths. A non-deprecated path (`None`) does not suppress deprecations from another possible path.
crates/ty_python_semantic/src/types.rs:1170
↓ 4 callersMethodunparse_stmt
(&mut self, ast: &Stmt)
crates/ruff_python_codegen/src/generator.rs:248
↓ 4 callersMethodunparse_suite
(&mut self, suite: &Suite)
crates/ruff_python_codegen/src/generator.rs:242
↓ 4 callersMethodunwrap_string_flags
Returns the [`AnyStringFlags`] style for the current string token of any kind. # Panics If it isn't a string or any f/t-string tokens.
crates/ruff_python_ast/src/token.rs:76
↓ 4 callersMethodupdate
(self, other: Self)
python/ruff-ecosystem/ruff_ecosystem/check.py:313
↓ 4 callersMethodupdate
( &mut self, array: lsp_types::NotebookCellArrayChange, updated_cells: Vec<lsp_types::
crates/ty_server/src/document/notebook.rs:135
↓ 4 callersMethodupdate_program
(&mut self, settings: ProgramSettings)
crates/ty_test/src/db.rs:61
↓ 4 callersMethodupstream_categories
(&self)
crates/ruff_linter/src/upstream_categories.rs:63
← previousnext →3,601–3,700 of 31,766, ranked by callers