MCPcopy Create free account

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

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

↓ 2 callersFunctionunquote_annotation_string
Safely remove quotes from a type expression. This function handles edge cases like multiline strings correctly by checking for and potentially adding
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:421
↓ 2 callersFunctionunreachable_ranges
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:48
↓ 2 callersFunctionunused_bindings
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:105
↓ 2 callersMethodunused_self_typevar
Returns the receiver's `Self` type variable if it is unused in the rest of the signature.
crates/ty_python_semantic/src/types/signatures.rs:1909
↓ 2 callersMethodunwrap_suppression_starts
(&self)
crates/ruff_python_formatter/src/verbatim.rs:531
↓ 2 callersMethodupdate
( &mut self, cells: Option<lsp_types::NotebookDocumentCellChanges>, metadata_change: O
crates/ruff_server/src/edit/notebook.rs:110
↓ 2 callersFunctionupdateFragmentLinks
()
docs/js/rule-filters.js:193
↓ 2 callersFunctionupdateURL
(clearFragment = false)
docs/js/rule-filters.js:200
↓ 2 callersMethodupdate_cell_content
Update the cell contents with the transformed content. Returns `true` if a cell separator was removed and the source code and cell offsets need to be
crates/ruff_notebook/src/notebook.rs:305
↓ 2 callersMethodupdate_environment_error
Update or clear the environment error while retaining the last working search paths.
crates/ty_project/src/lib.rs:352
↓ 2 callersMethodupdate_max_precedence_with_count
(&mut self, precedence: OperatorPrecedence, count: u32)
crates/ruff_python_formatter/src/expression/mod.rs:629
↓ 2 callersMethodupdate_options
(&mut self, options: JsValue)
crates/ty_wasm/src/lib.rs:153
↓ 2 callersMethodupdate_signature_generic_context
Updates the generic context of a [`Signature`] according to the current type mapping. Returns `None` if the mapping removes all type variables from t
crates/ty_python_semantic/src/types.rs:11795
↓ 2 callersMethodupdate_version
(&mut self, new_version: DocumentVersion)
crates/ty_server/src/document/text_document.rs:143
↓ 2 callersMethoduriForPath
(path: string)
playground/ty/src/Editor/Editor.tsx:986
↓ 2 callersFunctionuseTheme
()
playground/shared/src/theme.ts:8
↓ 2 callersFunctionuser_config_directory_env_var
()
crates/ty/tests/common/mod.rs:180
↓ 2 callersFunctionuses_base_model_setattr
Check whether attribute assignments use Pydantic's setter. Return `None` if the MRO does not resolve to a known setter.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:671
↓ 2 callersMethoduses_enclosing_snapshots
(self)
crates/ty_python_semantic/src/place_load.rs:1200
↓ 2 callersFunctionuses_legacy_inference
(db: &'db dyn Db, generic_context: GenericContext<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:301
↓ 2 callersMethoduses_locals
Returns `true` if this scope uses locals (e.g., `locals()`).
crates/ruff_python_semantic/src/scope.rs:160
↓ 2 callersMethoduses_special_method_lookup
Returns whether this member is dispatched through special-method lookup on the type. The names are the methods registered in CPython's `slotdefs` tab
crates/ty_python_semantic/src/types/protocol_class.rs:2357
↓ 2 callersMethoduses_star_imports
Returns `true` if this scope contains a star import (e.g., `from sys import *`).
crates/ruff_python_semantic/src/scope.rs:140
↓ 2 callersMethodvalid_first_argument_name
(self)
crates/ruff_linter/src/rules/pep8_naming/rules/invalid_first_argument_name.rs:189
↓ 2 callersMethodvalidate_assignment_type
Checks an assigned value against its target's declared type and reports any mismatch. Returns `true` when the value is assignable, even if the strict
crates/ty_python_semantic/src/types/infer/builder.rs:2036
↓ 2 callersFunctionvalidate_ast
Verifies that: the range of the parent node fully encloses all its child nodes the ranges are strictly increasing when traversing the nodes in pre-ord
crates/ruff_python_parser/tests/fixtures.rs:431
↓ 2 callersMethodvalidate_class_pattern
(&mut self, pattern: &ast::PatternMatchClass, cls_ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:2877
↓ 2 callersMethodvalidate_constrained
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:1165
↓ 2 callersFunctionvalidate_extracted_typed_dict_keys
Validates a set of extracted `TypedDict`-like keys against a constructor target. This is shared by `**kwargs` validation and mixed constructor calls
crates/ty_python_semantic/src/types/typed_dict.rs:2379
↓ 2 callersFunctionvalidate_extracted_typed_dict_openness
Validates the arbitrary keys of a `TypedDict`-shaped constructor argument. The source's effective extra items must be valid for every target field th
crates/ty_python_semantic/src/types/typed_dict.rs:2420
↓ 2 callersMethodvalidate_generator_yield_type
( &self, yielded_value: impl Ranged, yield_kind: YieldKind, return_type_span:
crates/ty_python_semantic/src/types/infer/builder.rs:10628
↓ 2 callersMethodvalidate_generic_class_attribute_access
Reject access to a generic instance attribute through a class while retaining the normal attribute type for recovery. Reads and writes use the same re
crates/ty_python_semantic/src/types/infer/builder.rs:11286
↓ 2 callersMethodvalidate_impl
( &self, db: &'db dyn Db, ty: Type<'db>, mut validate: impl FnMut(Type<'db>) -
crates/ty_python_semantic/src/types/call/bind.rs:11719
↓ 2 callersFunctionvalidate_inline_snapshot
( db: &dyn Db, tool_name: &'static str, test_file: &TestFile<'_>, inline_diagnostics: &[Diagno
crates/mdtest/src/lib.rs:357
↓ 2 callersFunctionvalidate_keyword_unpack_key_type
Validate the key type of a keyword-unpack argument without checking its value type.
crates/ty_python_semantic/src/types/call/bind.rs:5885
↓ 2 callersFunctionvalidate_merged_unpacked_keyword_argument
( context: &InferContext<'db, 'ast>, typed_dict: TypedDictType<'db>, expr: &'ast ast::Expr, un
crates/ty_python_semantic/src/types/typed_dict.rs:2997
↓ 2 callersFunctionvalidate_required_version
(required_version: &RequiredVersion)
crates/ruff_workspace/src/options.rs:617
↓ 2 callersMethodvalidate_satisfied_path
Having found a satisfiable path in the BDD, validates that path against the declared upper bound (TODO and constraints) of all relevant typevars.
crates/ty_python_semantic/src/types/constraints/solutions.rs:1081
↓ 2 callersMethodvalidate_subscript_assignment
Validate a subscript assignment of the form `object[key] = rhs_value`.
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:1714
↓ 2 callersFunctionvalidate_tokens
Verifies that: the ranges are strictly increasing when loop the tokens in insertion order all ranges are within the length of the source code
crates/ruff_python_parser/tests/fixtures.rs:402
↓ 2 callersMethodvalidate_typed_dict_items
( &self, dict: &ast::ExprDict, typed_dict: TypedDictType<'db>, item_types: &Fx
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:385
↓ 2 callersFunctionvalidate_typed_dict_required_keys
Validates that all required keys are provided in a `TypedDict` construction. Reports errors for any keys that are required but not provided. Returns
crates/ty_python_semantic/src/types/typed_dict.rs:1779
↓ 2 callersMethodvalidate_typevar_default
Validate that a `TypeVar`'s default is compatible with its bound or constraints.
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:166
↓ 2 callersMethodvalidation_config
Resolve compatibility behavior after inherited and local configuration has been merged.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:512
↓ 2 callersMethodvalue
(self)
crates/ruff_formatter/src/format_element.rs:497
↓ 2 callersMethodvalue
(&self)
crates/ruff_python_formatter/src/expression/expr_yield.rs:22
↓ 2 callersMethodvalue_type_with_recursion
Resolve this alias while preserving active recursion guards. During meta-type projection, results can depend on which aliases or type variables are a
crates/ty_python_semantic/src/types/type_alias.rs:630
↓ 2 callersFunctionvariable_kind
Returns the variable kind for an attribute if it should participate in `ClassVar` override checks.
crates/ty_python_semantic/src/types/overrides.rs:1813
↓ 2 callersMethodvariance_receiver
Keeps `Self` symbolic while inspecting a class's interface. Substituting `C[T]` would incorrectly make a parameter annotated as `Self` consume the cla
crates/ty_python_semantic/src/types/variance.rs:17
↓ 2 callersMethodvariance_types
The exposed read and write types, with their positions in variance inference.
crates/ty_python_semantic/src/types/protocol_class.rs:923
↓ 2 callersMethodvariance_with_polarity
( self, db: &'db dyn Db, polarity: TypeVarVariance, )
crates/ty_python_semantic/src/types/typevar.rs:1391
↓ 2 callersMethodvendored
Looks up a vendored file by its path. Returns `Some` if a vendored file for the given path exists and `None` otherwise.
crates/ruff_db/src/files.rs:185
↓ 2 callersFunctionversion
Returns information about Ruff's version.
crates/ruff/src/version.rs:43
↓ 2 callersMethodversion
(&self)
crates/ty_server/src/session/index.rs:245
↓ 2 callersFunctionversion_always_less_than
Returns true if the `check_version` is always less than the [`PythonVersion`].
crates/ruff_linter/src/rules/pyupgrade/rules/outdated_version_block.rs:207
↓ 2 callersFunctionversion_builtin_was_added
Return `Some(version)`, where `version` corresponds to the Python minor version in which the builtin was added
crates/ruff_python_stdlib/src/builtins.rs:436
↓ 2 callersMethodviolations
(&self)
crates/ty_python_semantic/src/types/constraints.rs:4969
↓ 2 callersMethodvirtual_file
Create a new virtual file at the given path and store it for future lookups. This will always create a new file, overwriting any existing file at `pa
crates/ruff_db/src/files.rs:221
↓ 2 callersFunctionvirtual_path_not_found
(path: impl Display)
crates/ty_server/src/system.rs:352
↓ 2 callersMethodvisibility
(&self)
crates/ty_python_core/src/scope.rs:162
↓ 2 callersMethodvisible
(self)
crates/ty_python_core/src/lib.rs:895
↓ 2 callersMethodvisible_ancestor_scopes
See [`SemanticIndex::visible_ancestor_scopes`].
crates/ty_python_core/src/builder.rs:424
↓ 2 callersMethodvisit
(mut self, root: AnyNodeRef<'a>)
crates/ruff_python_formatter/src/comments/visitor.rs:54
↓ 2 callersMethodvisit_alias
(&mut self, alias: &'a Alias)
crates/ruff_python_ast/src/visitor.rs:69
↓ 2 callersMethodvisit_annotation
(&self, expr: &mut Expr)
crates/ruff_python_ast/src/visitor/transformer.rs:14
↓ 2 callersMethodvisit_annotation
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/checkers/ast/mod.rs:1784
↓ 2 callersMethodvisit_arguments
(&self, arguments: &mut Arguments)
crates/ruff_python_ast/src/visitor/transformer.rs:44
↓ 2 callersFunctionvisit_assignments
(checker: &Checker, left: &Expr, right: &Expr)
crates/ruff_linter/src/rules/pylint/rules/self_assigning_variable.rs:80
↓ 2 callersMethodvisit_bool_op
(&mut self, bool_op: &'a BoolOp)
crates/ruff_python_ast/src/visitor.rs:39
↓ 2 callersMethodvisit_boolean_test
Visit a boolean test. A boolean test is an expression that Python tests for truthiness, such as an `if` condition or the operand of a `not` expressio
crates/ty_python_core/src/builder.rs:2312
↓ 2 callersMethodvisit_bytes_literal
(&mut self, bytes_literal: &'a BytesLiteral)
crates/ruff_python_ast/src/visitor.rs:114
↓ 2 callersMethodvisit_callable_type
(&self, db: &'db dyn Db, callable: CallableType<'db>)
crates/ty_python_semantic/src/types/generics.rs:817
↓ 2 callersMethodvisit_callable_type
(&self, db: &'db dyn Db, callable: CallableType<'db>)
crates/ty_python_semantic/src/types/constraints/resolution.rs:225
↓ 2 callersMethodvisit_cmp_op
(&mut self, cmp_op: &'a CmpOp)
crates/ruff_python_ast/src/visitor.rs:48
↓ 2 callersMethodvisit_comprehension
(&mut self, comprehension: &'_ crate::Comprehension)
crates/ruff_python_ast/src/helpers.rs:1236
↓ 2 callersMethodvisit_comprehension
(&mut self, comprehension: &'a Comprehension)
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:238
↓ 2 callersMethodvisit_constraint
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:609
↓ 2 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/helpers.rs:1120
↓ 2 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/visitor/source_order.rs:38
↓ 2 callersMethodvisit_expr
(&mut self, expr: &'ast ast::Expr)
crates/ty_python_core/src/builder/loop_bindings_visitor.rs:163
↓ 2 callersMethodvisit_expr
(&self, expr: &mut Expr)
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:527
↓ 2 callersMethodvisit_expr
(&mut self, expr: &Expr)
crates/ruff_linter/src/rules/ruff/rules/fallible_context_manager.rs:219
↓ 2 callersMethodvisit_expr_context
(&mut self, expr_context: &'a ExprContext)
crates/ruff_python_ast/src/visitor.rs:36
↓ 2 callersMethodvisit_expr_with_type_form
(&mut self, expr: &Expr, in_type_form: bool)
crates/ty_ide/src/semantic_tokens.rs:788
↓ 2 callersMethodvisit_f_string
(&mut self, f_string: &'a FString)
crates/ruff_python_ast/src/visitor.rs:99
↓ 2 callersMethodvisit_identifier
(&mut self, identifier: &'a Identifier)
crates/ruff_python_ast/src/visitor/source_order.rs:183
↓ 2 callersMethodvisit_match_case
(&mut self, match_case: &'a MatchCase)
crates/ruff_linter/src/rules/isort/block.rs:290
↓ 2 callersMethodvisit_mod
(&mut self, module: &'a Mod)
crates/ruff_python_ast/src/visitor/source_order.rs:23
↓ 2 callersMethodvisit_newtype_instance_type
(&self, db: &'db dyn Db, newtype: NewType<'db>)
crates/ty_python_semantic/src/types/visitor.rs:828
↓ 2 callersMethodvisit_operator
(&self, operator: &mut Operator)
crates/ruff_python_ast/src/visitor/transformer.rs:29
↓ 2 callersMethodvisit_parameter
(&mut self, parameter: &'a Parameter)
crates/ruff_python_ast/src/visitor.rs:63
↓ 2 callersMethodvisit_parameters
(&self, parameters: &mut Parameters)
crates/ruff_python_ast/src/visitor/transformer.rs:47
↓ 2 callersMethodvisit_pattern
(&mut self, pattern: &'a Pattern, context: &PyFormatContext)
crates/ruff_python_formatter/src/pattern/mod.rs:282
↓ 2 callersMethodvisit_pattern_arguments
(&mut self, pattern_arguments: &'a PatternArguments)
crates/ruff_python_ast/src/visitor.rs:87
↓ 2 callersMethodvisit_pattern_keyword
(&mut self, pattern_keyword: &'a PatternKeyword)
crates/ruff_python_ast/src/visitor.rs:90
↓ 2 callersMethodvisit_property_instance_type
(&self, db: &'db dyn Db, property: PropertyInstanceType<'db>)
crates/ty_python_semantic/src/types/visitor.rs:76
↓ 2 callersFunctionvisit_shared_inherited_names
Collect the same candidate names for cached and uncached base pairs.
crates/ty_python_semantic/src/types/overrides.rs:589
↓ 2 callersMethodvisit_signature
(&self, db: &'db dyn Db, signature: &Signature<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:166
↓ 2 callersMethodvisit_stmt
(&mut self, stmt: &'a ruff_python_ast::Stmt)
crates/ruff_python_formatter/tests/fixtures.rs:625
↓ 2 callersMethodvisit_stmt
(&mut self, stmt: &ast::Stmt)
crates/ruff_python_parser/tests/fixtures.rs:722
← previousnext →7,301–7,400 of 31,766, ranked by callers