MCPcopy Create free account

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

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

↓ 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:905
↓ 4 callersFunctionsymbol_impl
Implementation of [`symbol`].
crates/ty_python_semantic/src/place.rs:1604
↓ 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:72
↓ 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:712
↓ 4 callersFunctiontest_nonexistent_path
(path: &str)
crates/ruff_db/src/vendored.rs:680
↓ 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:1020
↓ 4 callersMethodto_range
(&self, text: &str, index: &LineIndex, encoding: PositionEncoding)
crates/ruff_server/src/edit/range.rs:67
↓ 4 callersMethodto_search_paths
( &self, context: OptionsContext<'_>, project_name: &str, site_packages_paths:
crates/ty_project/src/metadata/options.rs:385
↓ 4 callersMethodto_settings
( &self, db: &dyn Db, strategy: &Strategy, )
crates/ty_project/src/metadata.rs:601
↓ 4 callersMethodto_string_parts
(&self)
crates/ty_python_semantic/src/types/display.rs:804
↓ 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:1297
↓ 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:1142
↓ 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:2217
↓ 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:1359
↓ 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:69
↓ 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:1462
↓ 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:1907
↓ 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:1102
↓ 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:1169
↓ 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:314
↓ 4 callersMethodupdate
( &mut self, array: lsp_types::NotebookCellArrayChange, updated_cells: Vec<lsp_types::
crates/ty_server/src/document/notebook.rs:135
↓ 4 callersMethodupstream_categories
(&self)
crates/ruff_linter/src/upstream_categories.rs:63
↓ 4 callersMethoduris
Returns a list of cell URIs in the order they appear in the array.
crates/ruff_server/src/edit/notebook.rs:228
↓ 4 callersMethodurl
Return the URL for the rule documentation.
crates/ruff_linter/src/registry.rs:376
↓ 4 callersMethodused_interiors
(&self)
crates/ty_python_core/src/reachability_constraints.rs:171
↓ 4 callersFunctionuser_visible_definitions
Returns the user-visible definitions represented by a use-def binding. Comprehension walruses are represented in the containing scope by synthetic ea
crates/ty_python_semantic/src/types/definition_resolution.rs:532
↓ 4 callersMethoduv_workspace
(&self)
crates/ty_project/src/metadata.rs:438
↓ 4 callersMethoduv_workspace_metadata
(&self)
crates/ty_project/src/metadata.rs:458
↓ 4 callersMethodvalidate_assignment_target
Validate that the given expression is a valid assignment target. If the expression is a list or tuple, then validate each element in the list. If it'
crates/ruff_python_parser/src/parser/statement.rs:3856
↓ 4 callersMethodvalidate_dynamic_type_bases
Validate base classes from the second argument of a `type()` or `types.new_class()` call. This validates bases that are valid `ClassBase` variants bu
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:123
↓ 4 callersMethodvalue
(self)
crates/ruff_python_formatter/src/expression/binary_like.rs:1081
↓ 4 callersMethodvalue
Returns the value expression for assignment-based definitions. Returns `Some` for `Assignment` and `AnnotatedAssignment` (if it has a value), `None`
crates/ty_python_core/src/definition.rs:1182
↓ 4 callersMethodvalue_expression_types
Yields the operand types used for runtime checks such as `isinstance`. Recorded operands appear in first-occurrence order, counting equivalent special
crates/ty_python_semantic/src/types/union_type_instance.rs:381
↓ 4 callersMethodvariance_of
Refer to this signature's equation, including recursive `TypeOf` references to itself.
crates/ty_python_semantic/src/types/function.rs:1991
↓ 4 callersFunctionvendored_typeshed_versions
(vendored: &VendoredFileSystem)
crates/ty_module_resolver/src/typeshed.rs:13
↓ 4 callersMethodversion
(&self)
crates/ty_server/src/session.rs:1956
↓ 4 callersMethodvisit
Runs the directory traversal and calls the passed `builder` to create visitors that do the visiting. The walker may run multiple threads to visit the
crates/ruff_db/src/system/walk_directory.rs:95
↓ 4 callersMethodvisit_annotation
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:27
↓ 4 callersMethodvisit_arguments
(&mut self, arguments: &'a Arguments)
crates/ruff_db/src/parsed.rs:742
↓ 4 callersMethodvisit_body
(&mut self, body: &'a [Stmt])
crates/ruff_python_ast/src/statement_visitor.rs:7
↓ 4 callersMethodvisit_body
(&self, body: &mut [Stmt])
crates/ruff_python_ast/src/visitor/transformer.rs:80
↓ 4 callersMethodvisit_body
(&mut self, body: &'a [Stmt])
crates/ruff_linter/src/rules/flake8_return/visitor.rs:213
↓ 4 callersMethodvisit_constraints_and_then
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:727
↓ 4 callersMethodvisit_decorator
Visit decorators, handling simple name decorators vs complex expressions
crates/ty_ide/src/semantic_tokens.rs:1232
↓ 4 callersMethodvisit_expr
(&mut self, expr: &'db ast::Expr)
crates/ty_ide/src/symbols.rs:1538
↓ 4 callersMethodvisit_expr_with_context
(&mut self, expr: &'ast ast::Expr, context: ExpressionContext)
crates/ty_python_core/src/builder.rs:3487
↓ 4 callersMethodvisit_guarded
(&self, db: &'db dyn Db, ty: Type<'db>, visit: impl FnOnce())
crates/ty_python_semantic/src/types/tuple/promotion.rs:28
↓ 4 callersMethodvisit_interpolated_string_element
( &mut self, interpolated_string_element: &'a InterpolatedStringElement, )
crates/ruff_python_ast/src/visitor.rs:102
↓ 4 callersMethodvisit_node
(&mut self, storage: &ConstraintSetStorage<'_>, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:2947
↓ 4 callersMethodvisit_parameters
(&mut self, parameters: &'a Parameters)
crates/ruff_python_ast/src/visitor.rs:60
↓ 4 callersMethodvisit_parameters
Visit parameters for a function or lambda expression and classify them as parameters, selfParameter, or clsParameter as appropriate.
crates/ty_ide/src/semantic_tokens.rs:754
↓ 4 callersMethodvisit_pattern
(&self, pattern: &mut Pattern)
crates/ruff_python_ast/src/visitor/transformer.rs:71
↓ 4 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/generics.rs:874
↓ 4 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:1353
↓ 4 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/tuple/promotion.rs:46
↓ 4 callersMethodvisit_type_params
(&mut self, type_params: &'a TypeParams)
crates/ruff_db/src/parsed.rs:786
↓ 4 callersMethodvisit_type_params
(&mut self, type_params: &'a TypeParams)
crates/ruff_python_ast/src/visitor.rs:75
↓ 4 callersFunctionwalk_alias
(_visitor: &V, _alias: &'a Alias)
crates/ruff_python_ast/src/visitor.rs:855
↓ 4 callersFunctionwalk_arguments
(visitor: &mut V, arguments: &'a Arguments)
crates/ruff_python_ast/src/visitor.rs:658
↓ 4 callersMethodwalk_directory
Returns a builder for walking the directory tree of `path`. The only files that are ignored when setting `WalkDirectoryBuilder::standard_filters` are
crates/ruff_db/src/system/memory_fs.rs:272
↓ 4 callersFunctionwalk_parameter
(visitor: &mut V, parameter: &'a Parameter)
crates/ruff_python_ast/src/visitor.rs:684
↓ 4 callersFunctionwalk_signature
( db: &'db dyn Db, signature: &Signature<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/signatures.rs:883
↓ 4 callersFunctionwalk_t_string
(visitor: &mut V, t_string: &'a TString)
crates/ruff_python_ast/src/visitor.rs:835
↓ 4 callersFunctionwalk_type_params
(visitor: &mut V, type_params: &'a TypeParams)
crates/ruff_python_ast/src/visitor.rs:701
↓ 4 callersMethodwhen_assignable_to_owned
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:631
↓ 4 callersMethodwhen_subtype_of
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:410
↓ 4 callersMethodwhen_unconstrained
(self)
crates/ty_python_semantic/src/types/constraints.rs:1897
↓ 4 callersMethodwith_annotation
(self, annotation: Option<Annotation>)
crates/ty_project/src/metadata/options.rs:2546
↓ 4 callersMethodwith_complete_function_parentheses
(mut self, enabled: bool)
crates/ty_server/src/session/options.rs:174
↓ 4 callersMethodwith_kind
(self, kind: FoldingRangeKind)
crates/ty_ide/src/folding_range.rs:42
↓ 4 callersMethodwith_line_width
(mut self, line_width: LineWidth)
crates/ruff_python_formatter/src/options.rs:190
← previousnext →3,601–3,700 of 31,562, ranked by callers