MCPcopy Create free account

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

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

↓ 3 callersFunctionto_string
TODO: rewrite using format_general
crates/ruff_python_literal/src/float.rs:6
↓ 3 callersMethodto_system_path
(&self)
crates/ty_module_resolver/src/path.rs:141
↓ 3 callersMethodto_text_range
( &self, db: &dyn Db, file: File, uri: &lsp_types::Uri, encoding: Posi
crates/ty_server/src/document/range.rs:99
↓ 3 callersMethodto_text_range
( &self, text: &str, index: &LineIndex, encoding: PositionEncoding, )
crates/ruff_server/src/edit/range.rs:35
↓ 3 callersMethodto_update_patch
Returns a patch version of this `TypedDict` for in-place mutations such as `update()` and `__ior__` (`|=`). All fields become optional, and read-only
crates/ty_python_semantic/src/types/typed_dict.rs:670
↓ 3 callersMethodtop_kind
Returns the [`TagKind`] of the current stack frame or [None] if this is the root stack frame.
crates/ruff_formatter/src/printer/call_stack.rs:170
↓ 3 callersMethodtop_materialized_upper_bound
Returns the static upper bound used when materializing a gradual type argument. Constraints are unioned only when materializing an exposed member, wh
crates/ty_python_semantic/src/types/typevar.rs:1513
↓ 3 callersFunctiontrailing_comment_start_offset
If a [`Ranged`] has a trailing comment, return the index of the hash.
crates/ruff_python_ast/src/whitespace.rs:26
↓ 3 callersMethodtransform
(&self, mut configuration: Configuration)
crates/ruff_server/src/session/index/ruff_settings.rs:76
↓ 3 callersMethodtranslate_source_location
Translates the given [`SourceLocation`] based on the indexing table. This will translate the line/character in the concatenated source code to the li
crates/ruff_notebook/src/index.rs:64
↓ 3 callersFunctiontraverse_union_and_optional
Traverse a "union" type annotation, applying `func` to each union member. Supports traversal of `Union`, `|`, and `Optional` union expressions. The
crates/ruff_python_semantic/src/analyze/typing.rs:490
↓ 3 callersMethodtruthiness
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, left: Type<'db>,
crates/ty_python_semantic/src/types/infer/comparisons.rs:702
↓ 3 callersMethodtry_compare
(self, other: Indentation)
crates/ruff_python_parser/src/lexer/indentation.rs:72
↓ 3 callersMethodtry_into_expression
Attempts to convert the [`Parsed<Mod>`] into a [`Parsed<ModExpression>`]. This method checks if the `syntax` field of the output is a [`Mod::Expressi
crates/ruff_python_parser/src/lib.rs:521
↓ 3 callersMethodtry_mro
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:203
↓ 3 callersMethodtry_parse_type_params
Try to parse a type parameter list. If the parser is not at the start of a type parameter list, return `None`. See: <https://docs.python.org/3/refere
crates/ruff_python_parser/src/parser/statement.rs:3625
↓ 3 callersMethodtry_scoped_use
( &self, scope: FileScopeId, key: impl Into<ExpressionNodeKey>, )
crates/ty_python_core/src/ast_ids.rs:100
↓ 3 callersMethodtry_stop_watch
( &mut self, mut matcher: M, timeout: Duration, )
crates/ty/tests/file_watching.rs:141
↓ 3 callersMethodtry_upcast_to_callable_with_policy_and_context
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, policy: UpcastPolicy,
crates/ty_python_semantic/src/types/callable.rs:217
↓ 3 callersMethodtry_visit
( &self, db: &'db dyn Db, item: T, reuse_cached: impl FnOnce(&R) -> bool,
crates/ty_python_semantic/src/types/cyclic.rs:919
↓ 3 callersFunctiontuple_literal_needs_promotion
Applies the tuple precision limit after expanding literal elements. For `(*[1, 2], 3)`, all three positions count, even though the outer tuple has onl
crates/ty_python_semantic/src/types/unpacker.rs:657
↓ 3 callersMethodty
(&self)
crates/ty_project/src/script.rs:372
↓ 3 callersMethodty
Return the union of all contributions to this binding.
crates/ty_python_semantic/src/types/narrow.rs:352
↓ 3 callersFunctiontype_alias_arguments
Find the `name` and `value` arguments to `TypeAliasType`. If either is supplied twice, use the positional argument for error recovery.
crates/ty_python_semantic/src/types/type_alias.rs:310
↓ 3 callersMethodtype_check_only
(mut self, yes: bool)
crates/ty_ide/src/completion.rs:619
↓ 3 callersMethodtype_context
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:13503
↓ 3 callersMethodtype_form_argument
Return the type denoted by this retained special-form value when it is valid without parameters or a surrounding inference scope.
crates/ty_python_semantic/src/types/special_form.rs:215
↓ 3 callersFunctiontype_hierarchy_class_to_item
( db: &'db dyn Db, class: TypeHierarchyClass<'db>, )
crates/ty_ide/src/type_hierarchy.rs:104
↓ 3 callersFunctiontype_narrowed_by_previous_patterns
Narrow the subject by preceding match patterns with no guard or an always-true guard. Caching the subject type narrowed by the patterns before each c
crates/ty_python_semantic/src/reachability.rs:254
↓ 3 callersFunctiontype_param_name
Returns the value of the `name` parameter to, e.g., a `TypeVar` constructor.
crates/ruff_linter/src/rules/pylint/helpers.rs:19
↓ 3 callersMethodtype_satisfies_protocol_member
Return `true` if `ty` provides every access required by this protocol member.
crates/ty_python_semantic/src/types/protocol_class.rs:2940
↓ 3 callersFunctiontyped_dict_class_member
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, class: ClassType<'db>, module: TypingModule,
crates/ty_python_semantic/src/types/class/typed_dict.rs:1097
↓ 3 callersFunctiontyped_dict_fallback_class_member
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, module: TypingModule, lookup_policy: MemberL
crates/ty_python_semantic/src/types/class/typed_dict.rs:1079
↓ 3 callersFunctiontypeshed_test_case
( typeshed: MockedTypeshed, python_version: PythonVersion, )
crates/ty_module_resolver/src/path.rs:1250
↓ 3 callersMethodtypeshed_versions
(&self)
crates/ty_module_resolver/src/resolve.rs:961
↓ 3 callersMethodtypevartuple
(self)
crates/ty_python_semantic/src/types/tuple.rs:945
↓ 3 callersFunctiontyping_extensions_symbol
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, symbol: &str, )
crates/ty_python_semantic/src/place.rs:752
↓ 3 callersFunctiontyping_module_for_fix
Selects a runtime typing module for a fix, checking declared dependencies and installed exports when the requested member needs a backport.
crates/ty_python_semantic/src/types/diagnostic.rs:3295
↓ 3 callersFunctiontyping_self
Create a `typing.Self` type variable for a given class.
crates/ty_python_semantic/src/types/generics.rs:262
↓ 3 callersMethodunannotated_collection_initializer
If this is a potentially constraining use of an unannotated collection initializer, returns its definition.
crates/ty_python_core/src/lib.rs:596
↓ 3 callersMethodundeclared_reachability_constraint
( &self, )
crates/ty_python_core/src/use_def/place_state.rs:182
↓ 3 callersFunctionunescape_string
Return a modified version of the string with all quote escapes removed.
crates/ruff_linter/src/rules/flake8_quotes/helpers.rs:29
↓ 3 callersMethodunion_narrowed_types
(&mut self, narrowed: Vec<(Type<'db>, Self)>)
crates/ty_python_semantic/src/types/infer/builder.rs:7269
↓ 3 callersMethodunknowns_may_overlap
(&self, other: &Self)
crates/ty_python_semantic/src/types/equality/enums.rs:1026
↓ 3 callersMethodupdate
Add or update a file cache at `path` relative to the package root.
crates/ruff/src/cache.rs:282
↓ 3 callersFunctionupdateOptions
( workspace: Workspace | null, content: string | null, setError: (error: string | null) => void, )
playground/ty/src/Playground.tsx:648
↓ 3 callersMethodupdate_all_origin
Updates the origin of `__all__` in the current module.
crates/ty_ide/src/symbols.rs:1194
↓ 3 callersFunctionupdate_and_synchronize_script
(case: &mut TestCase, source: &str)
crates/ty/tests/file_watching.rs:4526
↓ 3 callersFunctionupdate_file_and_wait_for_uv_sync
Updates an existing file, waits for its watcher event, and completes any resulting uv project synchronization. Relative paths are resolved against the
crates/ty/tests/file_watching.rs:4496
↓ 3 callersMethodupdate_in_databases
(&self, session: &mut Session, client: &Client)
crates/ty_server/src/session.rs:2106
↓ 3 callersMethodupdate_program
(&mut self, settings: ProgramSettings)
crates/ty_test/src/db.rs:61
↓ 3 callersMethodupdated
(&self, new_source: String, source_map: &SourceMap)
crates/ruff_linter/src/source_kind.rs:89
↓ 3 callersMethodurl_for
Return the remote GitHub URL for the given path in this repository.
python/ruff-ecosystem/ruff_ecosystem/projects.py:439
↓ 3 callersFunctionurlopen
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC210.py:66
↓ 3 callersMethoduse_generic_filtering
(&self)
crates/ty_python_semantic/src/types/narrow.rs:2181
↓ 3 callersMethoduse_index
Looks up a node in the packed use array. Each earlier set bit on the same page accounts for one preceding entry in the array.
crates/ty_python_core/src/ast_ids.rs:206
↓ 3 callersFunctionuv_command
(case: &CliTest)
crates/ty/tests/cli/uv_workspace.rs:57
↓ 3 callersMethodvalidate
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:1623
↓ 3 callersMethodvalidate
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:11471
↓ 3 callersFunctionvalidate_merged_dict_literal
( context: &InferContext<'db, 'ast>, typed_dict: TypedDictType<'db>, dict_expr: &'ast ast::ExprDic
crates/ty_python_semantic/src/types/typed_dict.rs:2874
↓ 3 callersFunctionvalidate_typed_dict_constructor
Validates a `TypedDict` constructor call. This handles keyword-only construction, a single positional mapping argument, and mixed positional-and-keyw
crates/ty_python_semantic/src/types/typed_dict.rs:2604
↓ 3 callersMethodvalue_operands
Returns the types of this union's immediate operand values, if they were recorded.
crates/ty_python_semantic/src/types/union_type_instance.rs:306
↓ 3 callersMethodvariable_element_type
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:2618
↓ 3 callersMethodvariable_index
( self, db: &'db dyn Db, typevar: BoundTypeVarIdentity<'db>, )
crates/ty_python_semantic/src/types/generics.rs:560
↓ 3 callersMethodvariadic_parameter_annotation
Check that a `ParamSpec` component annotates the corresponding variadic parameter. A misplaced component or a bare `ParamSpec` gives the parameter an
crates/ty_python_semantic/src/types/infer/builder/function.rs:1197
↓ 3 callersMethodvariance_of_items
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, typevar: BoundTypeVarI
crates/ty_python_semantic/src/types/typed_dict.rs:586
↓ 3 callersMethodverbose
(&self)
crates/ty_python_semantic/src/db.rs:207
↓ 3 callersMethodversion
()
crates/ruff_wasm/src/lib.rs:276
↓ 3 callersMethodvirtual_file
(name: &str)
crates/ty_server/tests/e2e/notebook.rs:802
↓ 3 callersMethodvisible_binding_sources
Returns nested binding sources that can update the same variable as `scope`. A synthetic binding can collect both `global` and `nonlocal` writes to o
crates/ty_python_core/src/definition.rs:1721
↓ 3 callersMethodvisit_body
(&mut self, body: &'ast [ruff_python_ast::Stmt])
crates/ruff_linter/src/rules/ruff/rules/suppression_comment_visitor.rs:177
↓ 3 callersMethodvisit_body_with_terminal
Visits each statement in `body`, tracking whether each is in a terminal position. A statement is considered terminal if it is the last in the body (w
crates/ruff_linter/src/rules/ruff/rules/fallible_context_manager.rs:251
↓ 3 callersMethodvisit_condition
(&mut self, test: &'ast ast::Expr)
crates/ty_python_core/src/builder.rs:2247
↓ 3 callersMethodvisit_decorator
(&mut self, decorator: &'a Decorator)
crates/ruff_db/src/parsed.rs:724
↓ 3 callersMethodvisit_decorator
(&mut self, decorator: &'a Decorator)
crates/ruff_python_ast/src/visitor.rs:30
↓ 3 callersMethodvisit_elif_else_clause
(&mut self, elif_else_clause: &'a ElifElseClause)
crates/ruff_python_ast/src/visitor.rs:96
↓ 3 callersMethodvisit_elif_else_clause
(&mut self, elif_else_clause: &'a ElifElseClause)
crates/ruff_linter/src/rules/isort/block.rs:297
↓ 3 callersMethodvisit_except_handler
(&mut self, except_handler: &'a ExceptHandler)
crates/ruff_python_ast/src/visitor.rs:54
↓ 3 callersMethodvisit_expr
(&mut self, expr: &ast::Expr)
crates/ty_python_semantic/src/pull_types.rs:104
↓ 3 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/rules/pylint/rules/unnecessary_lambda.rs:262
↓ 3 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs:67
↓ 3 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/mod.rs:255
↓ 3 callersMethodvisit_interpolated_string_element
( &self, interpolated_string_element: &mut InterpolatedStringElement, )
crates/ruff_python_ast/src/visitor/transformer.rs:89
↓ 3 callersMethodvisit_match_case
(&mut self, match_case: &'a MatchCase)
crates/ruff_python_ast/src/visitor.rs:81
↓ 3 callersMethodvisit_operator
(&mut self, operator: &'a Operator)
crates/ruff_python_ast/src/visitor.rs:42
↓ 3 callersMethodvisit_parameters
(&mut self, parameters: &'ast ast::Parameters)
crates/ty_python_core/src/builder.rs:5774
↓ 3 callersMethodvisit_parameters
(&mut self, parameters: &'a Parameters)
crates/ruff_linter/src/checkers/ast/mod.rs:2461
↓ 3 callersMethodvisit_stmt
(&mut self, stmt: &'a Stmt)
crates/ruff_linter/src/rules/isort/block.rs:124
↓ 3 callersMethodvisit_string_like_part
(&mut self, part: StringLikePart)
crates/ruff_python_formatter/src/string/normalize.rs:959
↓ 3 callersMethodvisit_token_kind
(&mut self, token_kind: TokenKind)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:522
↓ 3 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:202
↓ 3 callersMethodvisit_type_context_callables
Visits the callables that should contribute argument type context, including deferred constructor callables that are relevant to the matched upstream
crates/ty_python_semantic/src/types/call/bind.rs:1100
↓ 3 callersMethodwalk
( &self, visitor_builder: &mut dyn WalkDirectoryVisitorBuilder, configuration: WalkDir
crates/ruff_db/src/system/os.rs:297
↓ 3 callersFunctionwalk_bytes_literal
( _visitor: &V, _bytes_literal: &'a BytesLiteral, )
crates/ruff_python_ast/src/visitor.rs:863
↓ 3 callersMethodwalk_directory
Creates a builder to recursively walk `path`. The walker ignores files according to [`::ignore::WalkBuilder::standard_filters`] when setting [`WalkDi
crates/ruff_db/src/system/os.rs:186
↓ 3 callersMethodwalk_edge
Walks one of the outgoing edges of an internal BDD node. `assignment` describes the constraint that the BDD node checks, and whether we are following
crates/ty_python_semantic/src/types/constraints/paths.rs:437
↓ 3 callersFunctionwalk_generic_context
( db: &'db dyn Db, context: GenericContext<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/generics.rs:364
↓ 3 callersFunctionwalk_identifier
( visitor: &mut V, identifier: &'a Identifier, )
crates/ruff_python_ast/src/visitor/source_order.rs:614
↓ 3 callersFunctionwalk_known_instance_type
( db: &'db dyn Db, known_instance: KnownInstanceType<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/known_instance.rs:308
↓ 3 callersFunctionwalk_match_case
(visitor: &mut V, match_case: &'a MatchCase)
crates/ruff_python_ast/src/visitor.rs:746
← previousnext →4,701–4,800 of 31,562, ranked by callers