MCPcopy Create free account

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

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

↓ 2 callersMethoddocstring
(mut self, docs: impl Into<Option<Docstring>>)
crates/ty_ide/src/completion.rs:633
↓ 2 callersMethoddocstring
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/definition_resolution.rs:99
↓ 2 callersMethoddocstring_code
(&self)
crates/ruff_python_formatter/src/options.rs:143
↓ 2 callersMethoddocstring_code_line_width
(&self)
crates/ruff_python_formatter/src/options.rs:147
↓ 2 callersFunctiondocstring_for_parameter_field
A parameter written in a `def` gets its documentation from the function docstring. A generated dataclass constructor has no `def __init__` to read. In
crates/ty_ide/src/goto.rs:512
↓ 2 callersFunctiondocstring_from
Extract a docstring from a function or class body.
crates/ruff_linter/src/docstrings/extraction.rs:7
↓ 2 callersFunctiondocstring_from_body
Extract a docstring from a function, module, or class body.
crates/ty_python_core/src/definition.rs:229
↓ 2 callersMethoddocument_controller_for_key
( &mut self, key: &DocumentKey, )
crates/ruff_server/src/session/index.rs:344
↓ 2 callersMethoddocument_mut
( &mut self, key: &DocumentKey, )
crates/ty_server/src/session/index.rs:220
↓ 2 callersMethoddocumentation_lines
Returns the documentation line by line with Rust doc-comment prefixes and trailing whitespace removed.
crates/ty_python_semantic/src/lint.rs:104
↓ 2 callersMethoddomain
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1077
↓ 2 callersMethoddominates
Returns `true` if any execution path to `node` passes through `dominator`. More precisely, it returns true if the path of branches leading to `domina
crates/ruff_python_semantic/src/model.rs:1931
↓ 2 callersFunctiondownloadZip
( files: { [name: string]: string }, prefix = "playground", )
playground/shared/src/downloadZip.ts:7
↓ 2 callersFunctiondownload_artifact
(artifact: dict, *, max_bytes: int = MAX_ARCHIVE_BYTES)
scripts/publish_pr_report.py:152
↓ 2 callersMethoddrain_queue
(&mut self)
crates/ty_python_semantic/src/place.rs:2134
↓ 2 callersMethoddrain_snapshot
(&mut self, mut snapshot: ScratchSnapshot)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:64
↓ 2 callersFunctiondraw_line
( renderer: &Renderer, buffer: &mut StyledBuffer, source_string: &str, line_index: usize,
crates/ruff_annotate_snippets/src/renderer/render.rs:2043
↓ 2 callersMethoddynamic_descriptor_type
Returns the descriptor result type for directly dynamic values and gradual class-object values.
crates/ty_python_semantic/src/types.rs:5147
↓ 2 callersFunctiondynamic_resolution_paths
( db: &'db dyn Db, mode: ModuleResolveModeIngredient<'db>, )
crates/ty_module_resolver/src/resolve.rs:1089
↓ 2 callersFunctione
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B012.py:36
↓ 2 callersMethodeat_back_while
(&mut self, mut predicate: impl FnMut(char) -> bool)
crates/ruff_python_trivia/src/cursor.rs:173
↓ 2 callersMethodeat_char2
(&mut self, c1: char, c2: char)
crates/ruff_python_trivia/src/cursor.rs:116
↓ 2 callersMethodeat_char_back
(&mut self, c: char)
crates/ruff_python_trivia/src/cursor.rs:142
↓ 2 callersMethodeat_while
(&mut self, mut predicate: impl FnMut(char) -> bool)
crates/ruff_python_parser/src/lexer/cursor.rs:149
↓ 2 callersFunctioneat_whitespace
(cursor: &mut Cursor)
crates/ruff_linter/src/rules/airflow/rules/xcom_pull_in_template_string.rs:241
↓ 2 callersMethodedit_is_omitted
(&self)
crates/ty_ide/src/will_rename.rs:1011
↓ 2 callersFunctionedit_to_text_edit
(workspace: &Workspace, file: File, edit: &Edit)
crates/ty_wasm/src/lib.rs:1069
↓ 2 callersMethodeffective_members
Iterate over every member that can govern the write at runtime.
crates/ty_python_semantic/src/types/attribute_write.rs:318
↓ 2 callersFunctioneffective_superclass_variable_kind
( db: &'db dyn Db, superclass: ClassType<'db>, name: Name, )
crates/ty_python_semantic/src/types/overrides.rs:1702
↓ 2 callersMethodeffective_variance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/variance/equations.rs:180
↓ 2 callersFunctioneffective_write_type
Return the accepted type for writes to a declared attribute. A dataclass field with a converter accepts the converter's input type, not the field's p
crates/ty_python_semantic/src/types/attribute_write.rs:943
↓ 2 callersMethodelement_truthiness
( &mut self, left: Type<'db>, right: Type<'db>, )
crates/ty_python_semantic/src/types/equality.rs:322
↓ 2 callersFunctionelements_of
Return the type whose iterated elements may satisfy membership for `ty`.
crates/ty_python_semantic/src/types/narrow/containment.rs:142
↓ 2 callersFunctionelif_else_range
Return the `Range` of the first `Elif` or `Else` token in an `If` statement.
crates/ruff_python_ast/src/stmt_if.rs:9
↓ 2 callersFunctionelse_
Return the [`TextRange`] of the `else` token in a `For` or `While` statement.
crates/ruff_python_ast/src/identifier.rs:114
↓ 2 callersMethodembedded_start_offset
(&self)
crates/mdtest/src/parser.rs:451
↓ 2 callersFunctionempty
()
crates/ruff_python_formatter/src/comments/map.rs:669
↓ 2 callersFunctionempty_lines_after_leading_comments
Format the empty lines between a node and its leading comments. For example, given: ```python # comment class Class: ... ``` While `leading_comment
crates/ruff_python_formatter/src/comments/format.rs:596
↓ 2 callersFunctionempty_lines_before_trailing_comments
Format the empty lines between a node and its trailing comments. For example, given: ```python class Class: ... # comment ``` This builder will inse
crates/ruff_python_formatter/src/comments/format.rs:543
↓ 2 callersMethodenable_implementations_link_support
Enable or disable location link support for goto implementations
crates/ty_server/tests/e2e/main.rs:1597
↓ 2 callersMethodenable_work_done_progress
(mut self, enabled: bool)
crates/ty_server/tests/e2e/main.rs:1442
↓ 2 callersMethodenable_workspace_configuration
Enable or disable workspace configuration capability
crates/ty_server/tests/e2e/main.rs:1462
↓ 2 callersMethodenclosing_classes
Returns the eligible classes enclosing the test's binding, from innermost to outermost. `module` must be the current parsed module containing the tes
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:140
↓ 2 callersFunctionenclosing_generic_contexts
Returns an iterator of any generic context introduced by the given scope or any enclosing scope.
crates/ty_python_semantic/src/types/generics.rs:57
↓ 2 callersMethodenclosing_parent
Returns the parent of the enclosing node, if any
crates/ruff_python_formatter/src/comments/visitor.rs:211
↓ 2 callersFunctionenclosing_scope
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:319
↓ 2 callersMethodenclosing_scope_item
Build the item for the semantic scope in which a call site is evaluated. This differs from taking the nearest syntactic function/class ancestor for e
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:390
↓ 2 callersMethodenclosing_snapshot
Returns `NoLongerInEagerContext` if the nested scope is no longer in an eager context (that is, not every scope that will be traversed is eager) and n
crates/ty_python_core/src/lib.rs:810
↓ 2 callersMethodend_of_scope_declarations
( &'map self, place: ScopedPlaceId, )
crates/ty_python_core/src/use_def.rs:1348
↓ 2 callersFunctionends_suppression
Returns `true` if the statements coming after `leading_or_trailing_comments` are no longer suppressed. The result is only correct if called for state
crates/ruff_python_formatter/src/verbatim.rs:44
↓ 2 callersMethodenqueue_assignment
( &mut self, assignment: Assignment<AtomicConstraintId>, new_fuel: AssignmentFuel,
crates/ty_python_semantic/src/types/constraints/paths.rs:1006
↓ 2 callersMethodensure_lines
(&mut self, line: usize)
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:37
↓ 2 callersMethodensure_overlay_typevar_identity_cache
This is a separate method from `ensure_overlay_identity_caches` because it requires a `db`.
crates/ty_python_semantic/src/types/constraints.rs:1162
↓ 2 callersFunctionensure_stability_when_formatting_twice
Format another time and make sure that there are no changes anymore
crates/ruff_python_formatter/tests/fixtures.rs:378
↓ 2 callersFunctionensure_unchanged_ast
Ensure that formatting doesn't change the AST and doesn't introduce any new unsupported syntax errors. Like Black, there are a few exceptions to this
crates/ruff_python_formatter/tests/fixtures.rs:442
↓ 2 callersMethodenter_level
(&mut self, first_child: Option<AnyNodeRef>)
crates/ruff_python_formatter/src/range.rs:495
↓ 2 callersMethodenter_node
(&mut self, node: AnyNodeRef<'ast>)
crates/ruff_python_formatter/src/range.rs:192
↓ 2 callersMethodentry
(&self, file: File)
crates/ty_project/src/uv/environments.rs:502
↓ 2 callersMethodentry
Adds a new entry to the join output.
crates/ruff_formatter/src/builders.rs:2475
↓ 2 callersMethodenum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/literal.rs:408
↓ 2 callersFunctionenum_functional_call_base
Find enum base class of the given type.
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:114
↓ 2 callersFunctionenum_ignored_names
(db: &'db dyn Db, scope_id: ScopeId<'db>)
crates/ty_python_semantic/src/types/enums.rs:946
↓ 2 callersFunctionenum_members_from_names
( context: &InferContext<'db, '_>, names: Vec<Name>, start: EnumStart, base_class: KnownClass,
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:229
↓ 2 callersFunctionenumerate_items
( call_expr: &'a Expr, tuple_expr: &'a Expr, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/pylint/rules/unnecessary_list_index_lookup.rs:116
↓ 2 callersMethodenumeration_allowed
Whether this directory's contents may supply names during module enumeration. This implements the policy described on `ModuleSearchCursor::list_modul
crates/ty_module_resolver/src/path.rs:350
↓ 2 callersMethodenvironment
(&self, db: &dyn Db, file: File)
crates/ty_project/src/uv/environments.rs:474
↓ 2 callersMethodeq
(&self, other: &u8)
crates/ruff_python_ast/src/int.rs:154
↓ 2 callersMethodeq
(&self, other: &MemberExprRef)
crates/ty_python_core/src/member.rs:413
↓ 2 callersMethodeq
(&self, other: &Self)
crates/ruff_linter/src/rules/pylint/settings.rs:82
↓ 2 callersMethodequivalent_representative
(&self, types: &[Type<'db>])
crates/ty_python_semantic/src/types/call/ambiguous.rs:79
↓ 2 callersMethoderror_count
Count the actual errors excluding invalid input files and io errors
crates/ruff_dev/src/format_dev.rs:643
↓ 2 callersFunctionevaluate
(a: Literal[Format.STRING], b: Literal[-1])
crates/ty_python_semantic/resources/corpus/literal_slices.py:6
↓ 2 callersFunctionevaluate_against_results
Combine comparison results produced by alternatives of the non-target operand. The target remains possible when any alternative can satisfy the selec
crates/ty_python_semantic/src/types/equality.rs:1356
↓ 2 callersFunctionevaluate_container_element_equality
( evaluator: &mut ComparisonEvaluator<'db>, left: Type<'db>, right: Type<'db>, )
crates/ty_python_semantic/src/types/equality.rs:1793
↓ 2 callersMethodevaluate_descriptor_write
Check the setter call and return whether the setter is always or only possibly present. Return `None` when the write fails, reporting the error if `em
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:880
↓ 2 callersFunctionevaluate_enum_domains
Compare values that are all enum members. Describe the result using enum members only. Do not copy other restrictions from one side to the other.
crates/ty_python_semantic/src/types/equality/enums.rs:52
↓ 2 callersMethodevaluate_explicit_member
( &mut self, requirement: &ExplicitAttributeWriteRequirement<'db>, value_ty: Type<'db>
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:819
↓ 2 callersMethodevaluate_expression_predicate
( &mut self, expression: Expression<'db>, is_positive: bool, )
crates/ty_python_semantic/src/types/narrow.rs:1733
↓ 2 callersMethodevaluate_known_cases
Evaluates the return type of certain known callables, where we have special-case logic to determine the return type in a way that isn't directly expre
crates/ty_python_semantic/src/types/call/bind.rs:1694
↓ 2 callersMethodevaluate_match_pattern_sequence_for_subject_element
( &mut self, subject_expression: Expression<'db>, elements: &[ast::Expr], kind
crates/ty_python_semantic/src/types/narrow.rs:4903
↓ 2 callersMethodevaluate_match_pattern_value
( &mut self, subject: Expression<'db>, value: Expression<'db>, is_positive: bo
crates/ty_python_semantic/src/types/narrow.rs:5024
↓ 2 callersFunctionevaluate_predicate_truthiness
A widened operand can require a new metaclass lookup, so evaluate truthiness after expression inference has normalized the operand types.
crates/ty_python_semantic/src/types/infer.rs:624
↓ 2 callersFunctionevaluate_reachability_constraint
Evaluates a reachability constraint, first caching complete blocks of statement calls up to its root predicate when the scope has many calls. Large s
crates/ty_python_semantic/src/reachability.rs:749
↓ 2 callersMethodevaluate_simple_expr
( &mut self, expr: &ast::Expr, is_positive: bool, )
crates/ty_python_semantic/src/types/narrow.rs:3771
↓ 2 callersFunctionevaluate_target_union
Combine comparison results for the alternatives of the union being constrained. Alternatives that cannot satisfy the selected branch are removed. Dyn
crates/ty_python_semantic/src/types/equality.rs:1213
↓ 2 callersFunctionevaluate_type_comparison
Return a constraint for `left` in the selected branch of an equality or inequality comparison.
crates/ty_python_semantic/src/types/equality.rs:208
↓ 2 callersFunctionevaluate_union_left
Evaluate each alternative of the union being constrained and combine their branch results.
crates/ty_python_semantic/src/types/equality.rs:1187
↓ 2 callersFunctionevaluate_union_right
Evaluate the target against each alternative of a union on the non-target side.
crates/ty_python_semantic/src/types/equality.rs:1296
↓ 2 callersMethodevaluate_with
Substitute the supplied variable values; the component solver supplies its current approximations for members and effective variance for references ou
crates/ty_python_semantic/src/types/variance/equations.rs:87
↓ 2 callersFunctionexc_info
If the keywords to a logging call contain `exc_info=True` or `exc_info=sys.exc_info()`, return the `Keyword` for `exc_info`.
crates/ruff_python_semantic/src/analyze/logging.rs:81
↓ 2 callersFunctionexcept
Return the [`TextRange`] of the `except` token in an [`ExceptHandler`].
crates/ruff_python_ast/src/identifier.rs:107
↓ 2 callersMethodexception_checkpoint_crosses_scope_boundary
Returns whether an exception raised while evaluating `scope` can propagate directly to its enclosing scope. Generator expressions follow the eager co
crates/ty_python_core/src/builder.rs:2446
↓ 2 callersMethodexclude
(&self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:141
↓ 2 callersFunctionexclude_regex
Convert a project exclusion glob to a regex for mypy and Zuban.
scripts/ty_benchmark/src/benchmark/tool.py:33
↓ 2 callersMethodexpand
(&self, ty: Type<'db>)
crates/ty_python_semantic/src/types/type_expansion.rs:77
↓ 2 callersFunctionexpand_args
Expands `@path` arguments unless the literal path, including `@`, exists. Response files contain one argument per line and may refer to other respons
crates/ruff_command_line/src/lib.rs:16
↓ 2 callersMethodexpand_elements
( &self, elements: impl IntoIterator<Item = Type<'db>>, )
crates/ty_python_semantic/src/types/type_expansion.rs:55
↓ 2 callersFunctionexpand_indent
Return the amount of indentation, expanding tabs to the next multiple of the settings' tab size.
crates/ruff_linter/src/checkers/logical_lines.rs:23
↓ 2 callersFunctionexpand_intersection_typevars_and_newtypes
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, positive: &FxOrderSet<Type<'db>>, negative:
crates/ty_python_semantic/src/types/set_theoretic.rs:1545
↓ 2 callersFunctionexpanded_class_base_entries
Expands a class's bases into the semantic entries used by [`StaticClassLiteral::explicit_bases`].
crates/ty_python_semantic/src/types/class/static_literal.rs:3496
← previousnext →5,401–5,500 of 31,562, ranked by callers