MCPcopy Create free account

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

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

↓ 2 callersMethodadd_node
Interns a projected node, collapsing nodes with identical branches.
crates/ty_python_semantic/src/reachability.rs:1315
↓ 2 callersFunctionadd_non_runtime_checkable_protocol_context
( db: &'db dyn Db, diagnostic: &mut LintDiagnosticGuard<'db, '_>, protocol: ProtocolClass, )
crates/ty_python_semantic/src/types/diagnostic.rs:4076
↓ 2 callersMethodadd_predicate_expression
Record a predicate in the context in which Python tests it.
crates/ty_python_core/src/builder.rs:2916
↓ 2 callersMethodadd_primary_tag
Adds a tag on the primary annotation for this diagnostic. This tag is associated with the primary annotation created for every `Diagnostic` that uses
crates/ty_python_semantic/src/types/context.rs:537
↓ 2 callersMethodadd_python_cell_with_version
( &mut self, content: &str, version: i32, )
crates/ty_server/tests/e2e/notebook.rs:814
↓ 2 callersMethodadd_to
(self, builder: &mut GlobSetBuilder)
crates/ruff_linter/src/settings/types.rs:205
↓ 2 callersFunctionadd_to_dunder_all
Fix to add the specified imports to the `__all__` export list.
crates/ruff_linter/src/fix/edits.rs:149
↓ 2 callersFunctionadd_to_existing_suppression
(existing: ExistingSuppression, codes: &[LintName])
crates/ty_python_semantic/src/suppression/add_ignore.rs:296
↓ 2 callersMethodadd_to_union
(&mut self, element: Type<'db>)
crates/ty_python_semantic/src/place.rs:2130
↓ 2 callersFunctionadd_undeclared_protocol_member_context
( diagnostic: &mut Diagnostic, db: &dyn Db, protocol_class: ProtocolClass, symbol_name: &str,
crates/ty_python_semantic/src/types/diagnostic.rs:4335
↓ 2 callersFunctionadd_unimported_completions
Adds completions not in scope. `scoped` should be information about the identified scope in which the cursor is currently placed. The completions re
crates/ty_ide/src/completion.rs:2394
↓ 2 callersMethodadd_unpackable_assignment
Add an unpackable assignment for the given [`Unpackable`]. This method handles assignments that can contain unpacking like assignment statements, for
crates/ty_python_core/src/builder.rs:3334
↓ 2 callersMethodadd_width
(mut self, width: usize)
crates/ruff_linter/src/line_width.rs:235
↓ 2 callersMethodadded_name
Returns the dotted name of `benchmark_added`, a sibling of the final leaf module.
crates/ruff_benchmark/benches/ty_ide.rs:253
↓ 2 callersMethodadded_path
Returns the path of `benchmark_added.py`, beside the final leaf module.
crates/ruff_benchmark/benches/ty_ide.rs:259
↓ 2 callersFunctionaffix_matches_slice_bound
Tests whether the slice of the given string actually removes the detected affix. For example, in the situation ```python text[:bound] if text.endswi
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:334
↓ 2 callersFunctionaffix_removal_data
Suppose given a statement of the form: ```python if test: else_or_target_name = value[slice] ``` or an expression of the form: ```python value[slice]
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:254
↓ 2 callersMethodafter_stdlib
Returns indexed paths that follow stdlib in normal typing resolution.
crates/ty_module_resolver/src/resolve.rs:544
↓ 2 callersMethodalias_target
Returns the target of a registered alias.
crates/ty_python_semantic/src/lint.rs:468
↓ 2 callersMethodaliases
Returns an iterator over all known aliases and to their target lints. This iterator includes aliases that point to removed lints.
crates/ty_python_semantic/src/lint.rs:478
↓ 2 callersMethodalign
Returns the number of trailing align spaces or 0 if none
crates/ruff_formatter/src/printer/mod.rs:976
↓ 2 callersMethodall
Returns all the commands that the server currently supports.
crates/ty_server/src/capabilities.rs:69
↓ 2 callersMethodall
Returns all indexed paths in normal typing-resolution order.
crates/ty_module_resolver/src/resolve.rs:508
↓ 2 callersFunctionall_reachable_members
Iterate over all declarations and bindings that are reachable anywhere in the given scope.
crates/ty_python_semantic/src/types/list_members.rs:90
↓ 2 callersMethodall_submodules
Returns resolved immediate submodules, including portions of namespace packages. Names are discovered only in directories whose path below their sear
crates/ty_module_resolver/src/module.rs:148
↓ 2 callersMethodallow_invalid_settings
(&mut self)
crates/ty/tests/file_watching.rs:419
↓ 2 callersFunctionalready_inherited
Whether a parent already contains the same incompatible attribute contract. Inspect every parent hierarchy, since the conflicting parent need not be
crates/ty_python_semantic/src/types/overrides/attributes.rs:816
↓ 2 callersFunctionambiguous_pytest_fixture_cursor_test
( first_fixture: &str, ambiguous_test: &str, )
crates/ty_ide/src/find_references.rs:3194
↓ 2 callersFunctionambiguous_unicode_character
( text: &str, range: TextRange, context: Context, lint_context: &LintContext, )
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:226
↓ 2 callersMethodanalysis
(&self)
crates/ty_project/src/metadata/settings.rs:67
↓ 2 callersMethodanalysis
(&'db self, db: &'db Db)
crates/ty_test/src/db.rs:254
↓ 2 callersFunctionanalyze_escape_chars
Traverses string, collects invalid escape characters, and flags if a valid escape character is found.
crates/ruff_linter/src/rules/pycodestyle/rules/invalid_escape_sequence.rs:117
↓ 2 callersFunctionanalyze_non_terminal_call_range
( db: &'db dyn Db, scope: ScopeId<'db>, level: u32, index: usize, )
crates/ty_python_semantic/src/reachability.rs:723
↓ 2 callersFunctionanalyze_non_terminal_calls_up_to_predicate
Infers complete blocks of call predicates at or before the given predicate, in source order. Predicate IDs are assigned in source order, but the deci
crates/ty_python_semantic/src/reachability.rs:634
↓ 2 callersFunctionanalyze_single
Evaluate a predicate, returning `Uninhabited` when it cannot produce a boolean outcome. Unlike ambiguous truthiness, an uninhabited condition does no
crates/ty_python_semantic/src/reachability.rs:2028
↓ 2 callersMethodand
(self, other: Self)
crates/ty_python_core/src/lib.rs:1055
↓ 2 callersMethodannotate_diagnostic
Annotate a diagnostic with the unimplemented methods and their declarations.
crates/ty_python_semantic/src/types/abstract_methods.rs:42
↓ 2 callersMethodannotate_final_declaration
Add a secondary annotation to a diagnostic pointing to the `Final` declaration site.
crates/ty_python_semantic/src/types/infer/builder/final_attribute.rs:20
↓ 2 callersFunctionannotate_unpacked_assignment_target
( context: &InferContext, diagnostic: &mut LintDiagnosticGuard, target: AnyNodeRef, definition
crates/ty_python_semantic/src/types/diagnostic.rs:2213
↓ 2 callersMethodannotated_lambda_parameter_type
Returns the annotated type of the lambda parameter at the given index in the provided lambda expression, based on a `Callable` type annotation, if pre
crates/ty_python_semantic/src/types/infer/builder/function.rs:1474
↓ 2 callersMethodannotated_lines
( &self, annotations: Vec<Annotation<'a>>, fold: bool, )
crates/ruff_annotate_snippets/src/renderer/source_map.rs:171
↓ 2 callersMethodannotation
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1363
↓ 2 callersMethodannotation_parent_scope_id
Returns the scope enclosing the syntactic annotation containing `expression`, if any. `module` must correspond to the same file and revision as this
crates/ty_python_core/src/lib.rs:459
↓ 2 callersMethodannotations
Returns all annotations in the order in which they were added.
crates/ruff_db/src/diagnostic/mod.rs:316
↓ 2 callersMethodannotations_mut
Returns a mutable borrow of all annotations of this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:321
↓ 2 callersMethodanother_method
Gets the value.
crates/ruff_linter/resources/test/fixtures/pydocstyle/D421.py:102
↓ 2 callersMethodany_enabled
(&self, rules: &[Rule])
crates/ruff_linter/src/settings/rule_table.rs:33
↓ 2 callersFunctionany_infinite_iterables
Return `true` if any expression in the iterator appears to be an infinite iterator.
crates/ruff_linter/src/rules/flake8_bugbear/helpers.rs:75
↓ 2 callersFunctionany_over_stmt
(stmt: &Stmt, mut func: F)
crates/ruff_python_ast/src/helpers.rs:533
↓ 2 callersFunctionapi
(endpoint: str, *, data: dict | None = None)
scripts/pull_request_reviewers.py:35
↓ 2 callersMethodappend
(self, x)
crates/ruff_linter/resources/test/fixtures/perflint/PERF402.py:30
↓ 2 callersMethodapplies_to
Returns whether this suppression covers either endpoint of `range`. Requiring endpoint containment, rather than any intersection, prevents a suppress
crates/ty_python_semantic/src/suppression.rs:525
↓ 2 callersMethodapplies_to_diagnostic
Returns whether the suppression's range applies to a diagnostic. `ruff: ignore` comments only need to contain the start of the diagnostic range (or i
crates/ruff_linter/src/suppression.rs:154
↓ 2 callersFunctionapply_accumulated_narrowing
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, base_ty: Type<'db>, accumulated: Option<Narr
crates/ty_python_semantic/src/reachability.rs:1032
↓ 2 callersMethodapply_change_in_databases
( &self, session: &mut Session, client: &Client, change: ChangeEvent, )
crates/ty_server/src/session.rs:2118
↓ 2 callersMethodapply_requires_python
Infers the Python version from `requires-python` unless it was configured explicitly.
crates/ty_project/src/metadata/options.rs:143
↓ 2 callersMethodapply_specialization
Applies a specialization to this type, replacing any typevars with the types that they are specialized to. Note that this does not specialize generic
crates/ty_python_semantic/src/types.rs:9735
↓ 2 callersMethodapply_specialization
( mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, specialization: Op
crates/ty_python_semantic/src/types/protocol_class.rs:3434
↓ 2 callersMethodapply_specialization
Applies a specialization to this specialization. This is used, for instance, when a generic class inherits from a generic alias: ```py class A[T]: ..
crates/ty_python_semantic/src/types/generics.rs:1410
↓ 2 callersMethodapply_specialization_impl
Applies either an ordinary specialization or an enclosing-owner specialization. Both modes share the same leaf fast paths. They differ only in whethe
crates/ty_python_semantic/src/types.rs:9747
↓ 2 callersMethodapply_specialization_impl
Compose specializations while preserving the enclosing transformation's recursion guard.
crates/ty_python_semantic/src/types/generics.rs:1416
↓ 2 callersMethodapply_to_current_thread
(self)
crates/ty_server/src/server/schedule/thread/priority.rs:25
↓ 2 callersMethodapply_to_current_thread
(self)
crates/ruff_server/src/server/schedule/thread/priority.rs:25
↓ 2 callersMethodapply_type_mapping_impl
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, visitor: &ApplyT
crates/ty_python_semantic/src/types/typevar.rs:1373
↓ 2 callersMethodapply_type_mapping_impl
Apply a mapping, retaining the alias's identity when its mapped body is unchanged.
crates/ty_python_semantic/src/types/type_alias.rs:776
↓ 2 callersMethodapply_type_mapping_impl
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: TypeContext
crates/ty_python_semantic/src/types/class_base.rs:415
↓ 2 callersMethodapply_type_mapping_impl
( &self, db: &'db dyn Db, builder: &ConstraintSetBuilder<'db>, type_mapping: &
crates/ty_python_semantic/src/types/constraints/variables.rs:157
↓ 2 callersMethodarbitrary_key_initialization_type_excluding
Returns the arbitrary-key initialization type after excluding keys that are known to be shadowed. This is used while validating merged dictionary lit
crates/ty_python_semantic/src/types/typed_dict.rs:444
↓ 2 callersFunctionarbitrary_name
(g: &mut Gen)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:658
↓ 2 callersFunctionare_same_optional
Returns `true` if `right` is `Some` and `left` and `right` are referentially equal.
crates/ruff_python_ast/src/node.rs:754
↓ 2 callersMethodargument_context_type
(&self)
crates/ty_python_semantic/src/types/signatures.rs:6423
↓ 2 callersMethodargument_type_context_specialization
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, generic_context: Gene
crates/ty_python_semantic/src/types/call/bind.rs:9154
↓ 2 callersMethodas_abstract_method
Return `Some()` if this function is an abstract method. A method can be abstract if it is explicitly decorated with `@abstractmethod`, or if it is an
crates/ty_python_semantic/src/types/function.rs:1061
↓ 2 callersMethodas_any_mut
(&mut self)
crates/ty_server/src/system.rs:288
↓ 2 callersMethodas_constrained
(self)
crates/ty_python_semantic/src/types/constraints.rs:4927
↓ 2 callersMethodas_constructor_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:380
↓ 2 callersMethodas_dict_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1866
↓ 2 callersMethodas_dynamic
(self)
crates/ty_python_semantic/src/types.rs:3154
↓ 2 callersMethodas_except_handler
(&self)
crates/ruff_python_ast/src/generated.rs:2894
↓ 2 callersMethodas_expression_ref
(self)
crates/ruff_python_ast/src/expression.rs:117
↓ 2 callersMethodas_i32
Return the [`Int`] as an i32, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:125
↓ 2 callersMethodas_i8
Return the [`Int`] as an i8, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:109
↓ 2 callersMethodas_if_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:769
↓ 2 callersMethodas_instance_attribute_candidate
If the place expression has the form `<NAME>.<MEMBER>` (meaning it *may* be an instance attribute), return `Some(<MEMBER>)`. Else, return `None`. Thi
crates/ty_python_core/src/member.rs:83
↓ 2 callersMethodas_interpolation
(&self)
crates/ruff_python_ast/src/generated.rs:2970
↓ 2 callersMethodas_intersection
(self)
crates/ty_python_semantic/src/types.rs:2549
↓ 2 callersMethodas_list_comp_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1940
↓ 2 callersMethodas_lsp_concept
Converts this semantic token type to its LSP string representation. Some of these are standardized terms in the LSP specification, while others are sp
crates/ty_ide/src/semantic_tokens.rs:112
↓ 2 callersFunctionas_non_finite_float_string_literal
Returns `true` if `expr` is a string literal that represents a non-finite float. E.g., `"NaN"`, "-inf", `"Infinity"`, or even `" +Inf \n \t"`. Return
crates/ruff_linter/src/linter/float.rs:14
↓ 2 callersFunctionas_only_an_ellipsis
Returns `Some(Stmt::Ellipsis)` if a function or class body contains only an ellipsis with no comments.
crates/ruff_python_formatter/src/statement/suite.rs:748
↓ 2 callersMethodas_output
Borrow this input docstring line as an output docstring line.
crates/ruff_python_formatter/src/string/docstring.rs:620
↓ 2 callersFunctionas_pep_585_generic
Given a typing member, returns the module and member name for a generic from the Python standard library (e.g., `list` for `typing.List`), if such a g
crates/ruff_python_stdlib/src/typing.rs:362
↓ 2 callersMethodas_ref
(&self)
crates/ruff_ranged_value/src/lib.rs:294
↓ 2 callersMethodas_rule
Returns the rule if this prefix matches a single rule exactly (e.g., `E225`, as opposed to `E2`).
crates/ruff_linter/src/rule_selector.rs:202
↓ 2 callersMethodas_rule_table
(&self, preview: PreviewMode)
crates/ruff_workspace/src/configuration.rs:904
↓ 2 callersMethodas_single_part_bytestring
Return `Some(literal)` if the bytestring only consists of a single `BytesLiteral` part (indicating that it is not implicitly concatenated). Otherwise,
crates/ruff_python_ast/src/nodes.rs:1995
↓ 2 callersMethodas_single_upper_bound
Returns one effective upper bound without expanding factored intersections.
crates/ty_python_semantic/src/types/constraints.rs:3524
↓ 2 callersMethodas_str
(&'a self)
crates/ruff_annotate_snippets/src/level.rs:131
↓ 2 callersMethodas_str
(&self)
crates/ty_module_resolver/src/module_name.rs:230
↓ 2 callersMethodas_str
Returns the string representation of the indent style.
crates/ruff_formatter/src/lib.rs:86
← previousnext →4,901–5,000 of 31,562, ranked by callers