MCPcopy Create free account

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

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

↓ 5 callersMethodtouch
Sets the last modified timestamp of the file stored at `path` to now. Creates a new file if the file at `path` doesn't exist.
crates/ruff_db/src/system/memory_fs.rs:314
↓ 5 callersFunctiontouch_directory
(paths: &mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, path: &Utf8Path)
crates/ruff_db/src/system/memory_fs.rs:507
↓ 5 callersFunctiontransform_expression
Run a transformation function over an expression. Passing an expression to [`match_expression`] directly can lead to parse errors if the expression i
crates/ruff_linter/src/cst/matchers.rs:244
↓ 5 callersMethodtriple_quotes
Returns the triple quotes for the current f-string if it is a triple-quoted f-string, `None` otherwise.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:61
↓ 5 callersMethodtrivia
(&self)
crates/ruff_python_formatter/src/context.rs:81
↓ 5 callersMethodtruncate
(&mut self, a: usize)
crates/ruff_index/src/vec.rs:47
↓ 5 callersMethodtry_expression
( &self, expression_key: impl Into<ExpressionNodeKey>, )
crates/ty_python_core/src/lib.rs:750
↓ 5 callersMethodtry_node_scope
Returns the id of the scope that `node` creates, if it exists.
crates/ty_python_core/src/lib.rs:785
↓ 5 callersMethodtry_system
Tries to look up the file for the given system path, returns `None` if no such file exists yet
crates/ruff_db/src/files.rs:168
↓ 5 callersMethodtry_upcast_to_callable_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, policy: UpcastPolicy,
crates/ty_python_semantic/src/types/callable.rs:202
↓ 5 callersMethodty
(mut self, ty: impl Into<Option<Type<'db>>>)
crates/ty_ide/src/completion.rs:589
↓ 5 callersMethodty
Returns the semantic type of this base entry.
crates/ty_python_semantic/src/types/class/static_literal.rs:3533
↓ 5 callersMethodtyped_dict_module
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:1111
↓ 5 callersMethodtyping_self_type
Returns the type that replaces any `typing.Self` annotations in the bound method signature.
crates/ty_python_semantic/src/types/method.rs:220
↓ 5 callersMethodunion
A union can invoke either target, so either target can contribute a deprecation.
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:179
↓ 5 callersMethodunion
(mut self, other: &Self)
crates/ruff_linter/src/registry/rule_set.rs:84
↓ 5 callersMethodunion_expected_types
(&mut self, expected_types: &FxHashMap<ExpressionNodeKey, Type<'db>>)
crates/ty_python_semantic/src/types/infer/builder.rs:7367
↓ 5 callersMethodunknown_specialization
Returns the unknown specialization of this class. For non-generic classes, the class is returned unchanged. For a non-specialized generic class, we re
crates/ty_python_semantic/src/types/class/static_literal.rs:682
↓ 5 callersMethodunknown_value
The type argument to use when this parameter has an unknown value.
crates/ty_python_semantic/src/types/typevar.rs:1125
↓ 5 callersFunctionunwrapped_call_argument
Returns source code that replaces a call with one of its arguments. Preserve the argument's optional parentheses, including any comments inside them.
crates/ruff_python_edits/src/call.rs:18
↓ 5 callersMethodupdate_file_watcher
(&mut self, client: &Client)
crates/ty_server/src/session.rs:1193
↓ 5 callersMethodupdated_implementation_callables
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1312
↓ 5 callersMethoduri_for_key
(&'a self, key: &'a DocumentKey)
crates/ruff_server/src/session/index.rs:357
↓ 5 callersMethoduses_pep_484_positional_only_convention
Return `true` if the parameter name uses the pre-PEP-570 convention (specified in PEP 484) to indicate to a type checker that it should be treated as
crates/ruff_python_ast/src/nodes.rs:3657
↓ 5 callersMethodvalue_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:239
↓ 5 callersMethodvendored
(&self)
crates/ty_project/src/db.rs:676
↓ 5 callersMethodvisit
Visits the nodes in the case header.
crates/ruff_python_formatter/src/statement/clause.rs:108
↓ 5 callersMethodvisit_arguments
(&mut self, arguments: &'a Arguments)
crates/ruff_python_ast/src/visitor.rs:57
↓ 5 callersMethodvisit_boolean_test
Visit an [`Expr`], and treat it as a boolean test. This is useful for detecting whether an expressions return value is significant, or whether the cal
crates/ruff_linter/src/checkers/ast/mod.rs:2807
↓ 5 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints/resolution.rs:174
↓ 5 callersFunctionwalk_decorator
(visitor: &mut V, decorator: &'a Decorator)
crates/ruff_python_ast/src/visitor.rs:358
↓ 5 callersFunctionwalk_except_handler
( visitor: &mut V, except_handler: &'a ExceptHandler, )
crates/ruff_python_ast/src/visitor.rs:644
↓ 5 callersFunctionwalk_f_string
(visitor: &mut V, f_string: &'a FString)
crates/ruff_python_ast/src/visitor.rs:810
↓ 5 callersFunctionwalk_interpolated_string_element
( visitor: &mut V, interpolated_string_element: &'a InterpolatedStringElement, )
crates/ruff_python_ast/src/visitor.rs:816
↓ 5 callersFunctionwalk_keyword
(visitor: &mut V, keyword: &'a Keyword)
crates/ruff_python_ast/src/visitor.rs:690
↓ 5 callersFunctionwalk_parameters
(visitor: &mut V, parameters: &'a Parameters)
crates/ruff_python_ast/src/visitor.rs:670
↓ 5 callersMethodwhen_constraint_set_assignable_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:759
↓ 5 callersMethodwhich
(&self, name: &str)
crates/ty_test/src/db.rs:566
↓ 5 callersMethodwith_binding_context
( self, db: &'db dyn Db, binding_context: Definition<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:286
↓ 5 callersMethodwith_kind
(self, db: &'db dyn Db, kind: CallableTypeKind)
crates/ty_python_semantic/src/types/callable.rs:804
↓ 5 callersMethodwith_options
(mut self, options: Self::Options)
crates/ruff_python_formatter/src/statement/suite.rs:773
↓ 5 callersMethodwith_paramspec_attr
Returns a new bound typevar instance with the given `ParamSpec` attribute set. This method will also set an appropriate upper bound on the typevar, b
crates/ty_python_semantic/src/types/typevar.rs:1207
↓ 5 callersMethodwith_show_fix_status
Whether to show a fix's availability or not.
crates/ruff_db/src/diagnostic/mod.rs:1515
↓ 5 callersMethodwith_source_overload_index
Records this signature's position in its defining function's overload list.
crates/ty_python_semantic/src/types/signatures.rs:2521
↓ 5 callersMethodwith_source_parameter_index
Records the source position without replacing a synthesized parameter's IDE definition. A `TypedDict` field can then keep its declaration for navigat
crates/ty_python_semantic/src/types/signatures.rs:6110
↓ 5 callersMethodwith_transposed_type_var
Converts `type[T]` with a type variable `T` into a type variable whose bound or constraints describe the runtime classes of `T`'s possible inhabitants
crates/ty_python_semantic/src/types/subclass_of.rs:618
↓ 5 callersMethodwith_triple_quotes
(mut self, triple_quotes: TripleQuotes)
crates/ruff_python_ast/src/nodes.rs:1149
↓ 5 callersMethodwith_ty
(self, ty: Type<'db>)
crates/ty_python_semantic/src/types/protocol_class.rs:1384
↓ 5 callersFunctionx
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:575
↓ 4 callersMethodaccessor_role
Returns the [`PropertyAccessorRole`] that `def` plays in this property, or `None` when `def` is not one of this property's accessors. Each accessor s
crates/ty_python_semantic/src/types.rs:1807
↓ 4 callersMethodadd
Adds an include pattern to the filter.
crates/ty_project/src/glob/include.rs:195
↓ 4 callersMethodadd
Adds a new binding with the given name to this scope.
crates/ruff_python_semantic/src/scope.rs:78
↓ 4 callersMethodadd
Adds two numbers to the current value. Parameters ---------- number : int or float The first number to a
crates/ruff_linter/resources/test/fixtures/pydoclint/DOC102_numpy.py:203
↓ 4 callersMethodadd_file
( &mut self, path: impl AsRef<VendoredPath>, content: &str, )
crates/ruff_db/src/vendored.rs:488
↓ 4 callersMethodadd_import
Add an import statement to import the given module, with an explicit `lazy` keyword if requested. If there are no existing imports, the new import wi
crates/ruff_linter/src/importer/mod.rs:79
↓ 4 callersMethodadd_interior
Adds an interior node, ensuring that we always use the same reachability constraint ID for equal nodes.
crates/ty_python_core/src/reachability_constraints.rs:349
↓ 4 callersMethodadd_lower
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:3166
↓ 4 callersMethodadd_mutation
Register a mutation.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:250
↓ 4 callersMethodadd_single_implication
(&mut self, ante: AtomicConstraint<'db>, post: AtomicConstraint<'db>)
crates/ty_python_semantic/src/types/constraints/sequents.rs:367
↓ 4 callersMethodadd_start
Looks for the start of a code example. If one was found, then the given line is kept and added as part of the code example. Otherwise, the line is pus
crates/ruff_python_formatter/src/string/docstring.rs:757
↓ 4 callersMethodadd_type_mapping
Add a type mapping for a bound typevar using the given variance to determine how the inferred type constrains the typevar.
crates/ty_python_semantic/src/types/generics.rs:3572
↓ 4 callersMethodadd_upper
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:3178
↓ 4 callersMethodalias
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1239
↓ 4 callersMethodaliased_class
(self)
crates/ty_python_semantic/src/types/special_form.rs:1004
↓ 4 callersFunctionall_members
List all members of a given type: anything that would be valid when accessed as an attribute on an object of the given type.
crates/ty_python_semantic/src/types/list_members.rs:930
↓ 4 callersFunctionall_modules
List all available modules, including all sub-modules, sorted in lexicographic order.
crates/ty_module_resolver/src/list.rs:7
↓ 4 callersFunctionambiguous_variable_name
E741
crates/ruff_linter/src/rules/pycodestyle/rules/ambiguous_variable_name.rs:49
↓ 4 callersMethodanalyze_matched_subject_arms
( &mut self, subject_ty: Type<'db>, preservation: OriginalSubjectPreservation,
crates/ty_python_semantic/src/types/narrow.rs:3313
↓ 4 callersMethodanalyze_pattern_subject_arms
( &mut self, subject_ty: Type<'db>, preservation: OriginalSubjectPreservation,
crates/ty_python_semantic/src/types/narrow.rs:3345
↓ 4 callersFunctionany_base_class
Return `true` if any base class matches an [`Expr`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:32
↓ 4 callersFunctionany_over_body
(body: &[Stmt], mut func: F)
crates/ruff_python_ast/src/helpers.rs:773
↓ 4 callersFunctionapi
( endpoint: str, *, method: str = "GET", body: str | None = None, missing_ok: bool = False
scripts/publish_pr_report.py:70
↓ 4 callersMethodappend
(self, t: _T)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP049_0.py:5
↓ 4 callersMethodapply_type_mapping_impl
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: TypeContext
crates/ty_python_semantic/src/types.rs:1832
↓ 4 callersMethodarbitrary_key_mutation_type
Returns the type that a value must be assignable to when mutating an arbitrary string key. A mutation may target any declared or extra item, so no su
crates/ty_python_semantic/src/types/typed_dict.rs:469
↓ 4 callersMethodargument_relations
Yields the effective formal and actual types for each matched argument-parameter pair. Gradual variadic parameters do not contribute constraints. For
crates/ty_python_semantic/src/types/call/bind.rs:6249
↓ 4 callersMethodas_bin_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1718
↓ 4 callersMethodas_concrete
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:648
↓ 4 callersMethodas_equivalence_checker
(&self)
crates/ty_python_semantic/src/types/relation.rs:3398
↓ 4 callersMethodas_expr_ref
(self)
crates/ruff_python_ast/src/generated.rs:6136
↓ 4 callersMethodas_int_like_literal
(self)
crates/ty_python_semantic/src/types.rs:3334
↓ 4 callersMethodas_named_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1681
↓ 4 callersMethodas_notebook
Returns the underlying notebook if this is a notebook file.
crates/ruff_db/src/source.rs:99
↓ 4 callersMethodas_number_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2421
↓ 4 callersMethodas_parameter
(self)
crates/ruff_python_ast/src/nodes.rs:3277
↓ 4 callersMethodas_property_instance
Returns the specialized Python property represented by this type.
crates/ty_python_semantic/src/types.rs:3070
↓ 4 callersMethodas_single_part_fstring
Returns the single [`FString`] if the f-string isn't implicitly concatenated, [`None`] otherwise.
crates/ruff_python_ast/src/nodes.rs:549
↓ 4 callersMethodas_single_part_tstring
Returns the single [`TString`] if the t-string isn't implicitly concatenated, [`None`] otherwise.
crates/ruff_python_ast/src/nodes.rs:854
↓ 4 callersMethodas_str
Yields the underlying [`str`] slice.
crates/ruff_db/src/files/path.rs:72
↓ 4 callersMethodas_tuple
(&self)
crates/ruff_linter/src/settings/types.rs:84
↓ 4 callersMethodas_type_alias
(self)
crates/ty_python_semantic/src/types.rs:3084
↓ 4 callersMethodas_usize
(self)
crates/ruff_linter/src/line_width.rs:288
↓ 4 callersFunctionascii
(arg)
crates/ruff_linter/resources/test/fixtures/ruff/RUF010.py:27
↓ 4 callersFunctionassert_absolute_path
(pattern: &str, relative_to: impl AsRef<SystemPath>, expected: &str)
crates/ty_project/src/glob/portable.rs:393
↓ 4 callersFunctionassert_bound_string_symbol
(db: &'db TestDb, symbol: Place<'db>)
crates/ty_python_semantic/src/place.rs:2838
↓ 4 callersMethodassert_can_import
(&self, module: &str)
crates/ty_project/src/uv/environments.rs:1495
↓ 4 callersMethodassert_module_file
(&self, name: &str, mode: ModuleResolveMode, expected: &str)
crates/ty_module_resolver/src/resolve.rs:3592
↓ 4 callersFunctionassert_noncomparable
(left: &str, right: &str)
crates/ruff_python_ast_integration_tests/tests/comparable.rs:25
↓ 4 callersMethodassign_argument
( &mut self, argument_index: usize, argument: Argument<'a>, argument_type: Opt
crates/ty_python_semantic/src/types/call/bind.rs:5221
↓ 4 callersFunctionassignment_targets_from_expr
( expr: &'a Expr, dummy_variable_rgx: &'a Regex, )
crates/ruff_linter/src/rules/pylint/rules/redefined_loop_name.rs:288
← previousnext →3,001–3,100 of 31,766, ranked by callers