MCPcopy Create free account

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

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

↓ 1 callersMethodadd_rebinding_scope
Mark the given [`BindingId`] as rebound in the given [`ScopeId`] (i.e., declared as `global` or `nonlocal`).
crates/ruff_python_semantic/src/model.rs:2055
↓ 1 callersFunctionadd_required_import
( required_import: &NameImport, parsed: &Parsed<ModModule>, locator: &Locator, stylist: &Styli
crates/ruff_linter/src/rules/isort/rules/add_required_imports.rs:99
↓ 1 callersFunctionadd_required_imports
I002
crates/ruff_linter/src/rules/isort/rules/add_required_imports.rs:142
↓ 1 callersMethodadd_result
(&mut self, result: notify::Result<notify::Event>)
crates/ty_project/src/watch/watcher.rs:197
↓ 1 callersFunctionadd_return_none
(checker: &Checker, stmt: &Stmt, range: TextRange)
crates/ruff_linter/src/rules/flake8_return/rules/function.rs:475
↓ 1 callersMethodadd_secondary_annotations_for_redundant_assert
( &self, diagnostic: &mut Diagnostic, full_condition_truthiness: Truthiness, f
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1236
↓ 1 callersMethodadd_secondary_annotations_for_redundant_if_or_elif
( &self, condition: &RedundantCondition<'_, 'db>, diagnostic: &mut Diagnostic,
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1304
↓ 1 callersMethodadd_secondary_annotations_for_redundant_match
( &self, diagnostic: &mut Diagnostic, full_condition_truthiness: Truthiness, c
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1254
↓ 1 callersMethodadd_secondary_annotations_for_redundant_while
( &self, diagnostic: &mut Diagnostic, full_condition_truthiness: Truthiness, w
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1149
↓ 1 callersMethodadd_semantic
Attempts to add the given semantic completion to this collection. When added, `true` is returned.
crates/ty_ide/src/completion.rs:255
↓ 1 callersMethodadd_sequents
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, map: &mut SequentMapBu
crates/ty_python_semantic/src/types/constraints/sequents.rs:536
↓ 1 callersMethodadd_sequents
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:615
↓ 1 callersMethodadd_sequents_with
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, map: &mut SequentMapBu
crates/ty_python_semantic/src/types/constraints/sequents.rs:551
↓ 1 callersMethodadd_sequents_with_concrete_equivalence
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, map: &mut SequentMapBu
crates/ty_python_semantic/src/types/constraints/sequents.rs:1566
↓ 1 callersMethodadd_sequents_with_concrete_lower
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, map: &mut SequentMapBu
crates/ty_python_semantic/src/types/constraints/sequents.rs:1451
↓ 1 callersMethodadd_sequents_with_concrete_upper
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, map: &mut SequentMapBu
crates/ty_python_semantic/src/types/constraints/sequents.rs:1507
↓ 1 callersMethodadd_sequents_with_typevar_equivalence
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, map: &mut SequentMapBu
crates/ty_python_semantic/src/types/constraints/sequents.rs:1632
↓ 1 callersMethodadd_sequents_with_typevar_range
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, map: &mut SequentMapBu
crates/ty_python_semantic/src/types/constraints/sequents.rs:1612
↓ 1 callersMethodadd_single_tautology
(&mut self, ante: AtomicConstraint<'db>)
crates/ty_python_semantic/src/types/constraints/sequents.rs:307
↓ 1 callersFunctionadd_source
( sources: &mut Vec<Source>, path: impl Into<SystemPathBuf>, contents: impl AsRef<str>
crates/ty_ide/src/lib.rs:759
↓ 1 callersMethodadd_source
(&mut self, db: &'db dyn Db, resolved_source: &ResolvedPlaceLoadSource<'_, 'db>)
crates/ty_python_semantic/src/place/definitions.rs:68
↓ 1 callersMethodadd_space
(self)
crates/ruff_python_parser/src/lexer/indentation.rs:53
↓ 1 callersMethodadd_standalone_assigned_expression
Record an expression that is immediately assigned to a target, and that needs to be a Salsa ingredient, because we need to infer its type standalone (
crates/ty_python_core/src/builder.rs:2934
↓ 1 callersMethodadd_standalone_statement
(&mut self, statement_node: &ast::Stmt)
crates/ty_python_core/src/builder.rs:2970
↓ 1 callersMethodadd_standalone_type_expression
Same as [`SemanticIndexBuilder::add_standalone_expression`], but marks the expression as a type* expression, which makes sure that it will later be in
crates/ty_python_core/src/builder.rs:2948
↓ 1 callersMethodadd_star_import
Adds a reference to a star import (e.g., `from sys import *`) to this scope.
crates/ruff_python_semantic/src/scope.rs:135
↓ 1 callersFunctionadd_string_literal_completions
( model: &SemanticModel<'db>, string_expr: &ast::ExprStringLiteral, subscript: Option<&ast::ExprSu
crates/ty_ide/src/completion.rs:2329
↓ 1 callersMethodadd_subdiagnostics
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mut diagnostic: LintDi
crates/ty_python_semantic/src/types.rs:12432
↓ 1 callersMethodadd_subscript_expression_ranges
( &mut self, subscript: &'a ExprSubscript, node: AnyNodeRef<'a>, )
crates/ty_ide/src/folding_range.rs:221
↓ 1 callersFunctionadd_suppression
( path: &Path, diagnostics: &[Diagnostic], locator: &Locator, comment_ranges: &CommentRanges,
crates/ruff_linter/src/noqa.rs:784
↓ 1 callersFunctionadd_suppressions
( path: &Path, source_kind: &SourceKind, settings: &LinterSettings, suppressio
crates/ruff_linter/src/noqa.rs:1410
↓ 1 callersFunctionadd_suppressions_to_path
Add any missing suppression comments to the source code at the given `Path`.
crates/ruff_linter/src/linter.rs:358
↓ 1 callersMethodadd_symbol
(&mut self, symbol: Symbol)
crates/ty_python_core/src/place.rs:389
↓ 1 callersMethodadd_tab
(self)
crates/ruff_python_parser/src/lexer/indentation.rs:61
↓ 1 callersMethodadd_to_type_checking_block
Add an import statement to an existing `TYPE_CHECKING` block.
crates/ruff_linter/src/importer/mod.rs:533
↓ 1 callersMethodadd_triple_impossibility
( &mut self, ante1: AtomicConstraint<'db>, ante2: AtomicConstraint<'db>, ante3
crates/ty_python_semantic/src/types/constraints/sequents.rs:324
↓ 1 callersMethodadd_type_checking_block
Add a `TYPE_CHECKING` block to the given module.
crates/ruff_linter/src/importer/mod.rs:515
↓ 1 callersMethodadd_type_hint
(&mut self, expr: &Expr)
crates/ty_ide/src/inlay_hints.rs:459
↓ 1 callersMethodadd_typevar
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:1933
↓ 1 callersMethodadd_upper_bound
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:1999
↓ 1 callersFunctionadd_uv_setting_info
Explain why ty tried to run uv, using the setting's current source and range.
crates/ty_project/src/uv.rs:75
↓ 1 callersMethodadjusted_constraint_id
(&self, id: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1181
↓ 1 callersMethodadjusted_node_id
(&self, id: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1174
↓ 1 callersMethodadjusted_source_order_id
(&self, id: SourceOrderId)
crates/ty_python_semantic/src/types/constraints.rs:1195
↓ 1 callersMethodadjusted_support_id
(&self, id: SupportId)
crates/ty_python_semantic/src/types/constraints.rs:1188
↓ 1 callersMethodadjusted_typevar_id
(&self, id: TypeVarId)
crates/ty_python_semantic/src/types/constraints.rs:1202
↓ 1 callersMethodaenter
Returns the type bound from a context manager with type `self`. This method should only be used outside of type checking because it omits any errors.
crates/ty_python_semantic/src/types/context_manager.rs:165
↓ 1 callersMethodaffects_overload_resolution
Returns `true` if this error indicates the overload didn't match the call arguments. Returns `false` for semantic errors where the overload matched t
crates/ty_python_semantic/src/types/call/bind.rs:10660
↓ 1 callersFunctionaffects_python_environment
Returns whether a filesystem event should trigger Python environment discovery. `pyvenv.cfg` records the environment's Python version and whether imp
crates/ty_project/src/db/changes.rs:539
↓ 1 callersFunctionaffects_uv_metadata
(db: &dyn Db, change: &ChangeEvent)
crates/ty_project/src/db/changes.rs:596
↓ 1 callersFunctionaffix_removal_data_expr
Given an expression of the form: ```python text[slice] if text.func(affix) else text ``` where `func` is either `startswith` or `endswith`, this fun
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:158
↓ 1 callersFunctionaffix_removal_data_stmt
Given a statement of the form: ```python if text.func(affix): text = text[slice] ``` where `func` is either `startswith` or `endswith`, this functio
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:185
↓ 1 callersMethodafter_operator
Creates a slice starting at the right operand of `index`.
crates/ruff_python_formatter/src/expression/binary_like.rs:576
↓ 1 callersFunctionairflow_3_0_suggested_update_expr
AIR311
crates/ruff_linter/src/rules/airflow/rules/suggested_to_update_3_0.rs:90
↓ 1 callersFunctionairflow_3_1_moved_expr
AIR321
crates/ruff_linter/src/rules/airflow/rules/moved_in_3_1.rs:82
↓ 1 callersFunctionairflow_3_dag_dynamic_value
AIR304
crates/ruff_linter/src/rules/airflow/rules/runtime_value_in_dag_or_task.rs:59
↓ 1 callersFunctionairflow_3_incompatible_function_signature
AIR303
crates/ruff_linter/src/rules/airflow/rules/function_signature_change_in_3.rs:63
↓ 1 callersFunctionairflow_3_incompatible_method_signature_def
AIR303
crates/ruff_linter/src/rules/airflow/rules/function_signature_change_in_3.rs:100
↓ 1 callersFunctionairflow_3_removal_expr
AIR301
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:94
↓ 1 callersFunctionairflow_3_removal_function_def
AIR301
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:137
↓ 1 callersMethodalias_cycle_representative
Substitution can leave several variables bound to one another: for `T = S, S = T`, both slots end up containing whichever variable was eliminated last
crates/ty_python_semantic/src/types/generics.rs:1099
↓ 1 callersMethodalias_detection_value
Returns the value to use when checking whether an enum member is an alias. For an `auto()` member with a resolvable `_generate_next_value_`, this use
crates/ty_python_semantic/src/types/enums.rs:194
↓ 1 callersMethodall_bindings
Like [`Scope::bindings`], but returns all bindings added to the scope, including those that were shadowed by later bindings.
crates/ruff_python_semantic/src/scope.rs:117
↓ 1 callersFunctionall_codes_invalid_diagnostic
( directive: &Codes<'_>, invalid_codes: Vec<&Code<'_>>, locator: &Locator, context: &LintConte
crates/ruff_linter/src/rules/ruff/rules/invalid_rule_code.rs:140
↓ 1 callersFunctionall_implicit_module_globals
Returns an iterator over all implicit module global symbols and their types. This is used for completions in the global scope of a module. It returns
crates/ty_python_semantic/src/place.rs:2617
↓ 1 callersFunctionall_lines_fit
Returns `true` if all lines in the fix are shorter than the given line length.
crates/ruff_linter/src/fix/edits.rs:648
↓ 1 callersFunctionall_narrowing_constraints_for_expression
( db: &'db dyn Db, expression: Expression<'db>, )
crates/ty_python_semantic/src/types/narrow.rs:153
↓ 1 callersFunctionall_narrowing_constraints_for_pattern
( db: &'db dyn Db, pattern: PatternPredicate<'db>, )
crates/ty_python_semantic/src/types/narrow.rs:136
↓ 1 callersFunctionall_narrowing_constraints_for_subject_element_pattern
( db: &'db dyn Db, pattern: PatternPredicate<'db>, target: ExpressionNodeKey, )
crates/ty_python_semantic/src/types/narrow.rs:199
↓ 1 callersFunctionall_negative_narrowing_constraints_for_pattern
( db: &'db dyn Db, pattern: PatternPredicate<'db>, )
crates/ty_python_semantic/src/types/narrow.rs:182
↓ 1 callersMethodall_negative_path_to_false
Look for a counterexample by falsifying each atom. When the false branch has no disjunct of its own, only the uncertain branch can still be true. Stop
crates/ty_python_semantic/src/types/constraints.rs:2456
↓ 1 callersMethodall_parts
(&self)
crates/ruff_python_formatter/src/comments/map.rs:270
↓ 1 callersMethodall_reachable_symbols
( &'map self, )
crates/ty_python_core/src/use_def.rs:1447
↓ 1 callersFunctionall_section_headings
Helper to create a standard `import_headings` map for all sections.
crates/ruff_linter/src/rules/isort/mod.rs:1302
↓ 1 callersMethodall_sequents
(&self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:237
↓ 1 callersMethodall_targets_are_dunder
Returns `true` when every assignment target is a simple name and each name is a dunder (`__` prefix and suffix), matching [`is_dunder`].
crates/ruff_linter/src/rules/ruff/rules/non_empty_init_module.rs:176
↓ 1 callersFunctionall_with_model_form
DJ007
crates/ruff_linter/src/rules/flake8_django/rules/all_with_model_form.rs:53
↓ 1 callersFunctionallocate_tokens_vec
Allocates a token buffer with a capacity intended to skip early grows.
crates/ruff_python_parser/src/token_source.rs:258
↓ 1 callersFunctionallow_boolean_trap
Returns `true` if an argument is allowed to use a boolean trap. To return `true`, the function name must be explicitly allowed, and the argument must
crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs:129
↓ 1 callersFunctionallow_nested_expression
Returns `true` if this is a dunder method that is excusable in a nested expression. Some methods are otherwise unusable in lambda expressions and else
crates/ruff_linter/src/rules/pylint/rules/unnecessary_dunder_call.rs:589
↓ 1 callersMethodallow_trailing_comma
Returns `true` if a trailing comma is allowed in the current context.
crates/ruff_python_parser/src/parser/mod.rs:1245
↓ 1 callersFunctionallowed_dunder_constants
Return `true` if this is a dunder method that is allowed to be called explicitly.
crates/ruff_linter/src/rules/pylint/rules/unnecessary_dunder_call.rs:248
↓ 1 callersMethodallows_concatenation_with_self_environment
Whether paths with this origin should allow combination with paths with a [`SysPrefixPathOrigin::SelfEnvironment`] origin.
crates/ty_site_packages/src/lib.rs:2244
↓ 1 callersMethodallows_file_rename_edits
Returns whether client settings permit import updates for a rename of `path`.
crates/ty_server/src/session.rs:1269
↓ 1 callersMethodallows_fixed_suffix
(self)
crates/ty_python_semantic/src/types/tuple.rs:1422
↓ 1 callersMethodallows_styling
(&self)
crates/ruff_annotate_snippets/src/renderer/render.rs:2337
↓ 1 callersMethodallows_text_overflow
Returns `true` if this mode allows text exceeding the configured line width.
crates/ruff_formatter/src/printer/mod.rs:1643
↓ 1 callersMethodallows_type_parameters
(self)
crates/ty_python_semantic/src/types/display.rs:117
↓ 1 callersFunctionalternative_formatter
(src, **kwargs)
crates/ruff_linter/resources/test/fixtures/ruff/RUF027_1.py:5
↓ 1 callersFunctionalways_breaks
Returns `true` if the body may break via a `break` statement.
crates/ruff_python_semantic/src/analyze/terminal.rs:357
↓ 1 callersFunctionambiguous_class_name
E742
crates/ruff_linter/src/rules/pycodestyle/rules/ambiguous_class_name.rs:42
↓ 1 callersFunctionambiguous_function_name
E743
crates/ruff_linter/src/rules/pycodestyle/rules/ambiguous_function_name.rs:42
↓ 1 callersFunctionambiguous_unicode_character_comment
RUF003
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:180
↓ 1 callersFunctionambiguous_unicode_character_string
RUF001, RUF002
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:190
↓ 1 callersMethodanalysis
(&self)
crates/ty_project/src/metadata/settings.rs:69
↓ 1 callersFunctionanalyze_enum_literal_union_pattern_predicate
Determine the static truthiness of a `match` case over a union of enum literals. The analysis removes enum members already matched by earlier cases w
crates/ty_python_semantic/src/reachability.rs:466
↓ 1 callersFunctionanalyze_escape_chars_in_interpolated_string
( flags: AnyStringFlags, elements: &InterpolatedStringElements, locator: &Locator, )
crates/ruff_linter/src/rules/pycodestyle/rules/invalid_escape_sequence.rs:224
↓ 1 callersFunctionanalyze_graph
( args: AnalyzeGraphCommand, global_options: GlobalConfigArgs, )
crates/ruff/src/lib.rs:224
↓ 1 callersFunctionanalyze_non_empty_iterable
(db: &dyn Db, iterable: Expression)
crates/ty_python_semantic/src/reachability.rs:1980
↓ 1 callersFunctionanalyze_non_terminal_call
(db: &'db dyn Db, call: CallableAndCallExpr<'db>)
crates/ty_python_semantic/src/reachability.rs:1922
← previousnext →7,701–7,800 of 31,766, ranked by callers