Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 5 callers
Method
with_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:1159
↓ 5 callers
Method
with_show_fix_status
Whether to show a fix's availability or not.
crates/ruff_db/src/diagnostic/mod.rs:1544
↓ 5 callers
Method
with_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:614
↓ 5 callers
Method
with_triple_quotes
(mut self, triple_quotes: TripleQuotes)
crates/ruff_python_ast/src/nodes.rs:1136
↓ 5 callers
Method
with_ty
(self, ty: Type<'db>)
crates/ty_python_semantic/src/types/protocol_class.rs:1371
↓ 5 callers
Function
x
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:575
↓ 4 callers
Method
accessor_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:1808
↓ 4 callers
Method
add
Adds an include pattern to the filter.
crates/ty_project/src/glob/include.rs:195
↓ 4 callers
Method
add
Adds a new binding with the given name to this scope.
crates/ruff_python_semantic/src/scope.rs:78
↓ 4 callers
Method
add
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 callers
Method
add_file
( &mut self, path: impl AsRef<VendoredPath>, content: &str, )
crates/ruff_db/src/vendored.rs:485
↓ 4 callers
Method
add_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:75
↓ 4 callers
Method
add_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 callers
Method
add_lower
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:3205
↓ 4 callers
Method
add_mutation
Register a mutation.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:250
↓ 4 callers
Method
add_single_implication
(&mut self, ante: AtomicConstraint<'db>, post: AtomicConstraint<'db>)
crates/ty_python_semantic/src/types/constraints/sequents.rs:366
↓ 4 callers
Method
add_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 callers
Method
add_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:3551
↓ 4 callers
Method
add_upper
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:3217
↓ 4 callers
Method
alias
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1239
↓ 4 callers
Method
aliased_class
(self)
crates/ty_python_semantic/src/types/special_form.rs:1005
↓ 4 callers
Function
all_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 callers
Function
all_modules
List all available modules, including all sub-modules, sorted in lexicographic order.
crates/ty_module_resolver/src/list.rs:7
↓ 4 callers
Function
ambiguous_variable_name
E741
crates/ruff_linter/src/rules/pycodestyle/rules/ambiguous_variable_name.rs:49
↓ 4 callers
Method
analyze_matched_subject_arms
( &mut self, subject_ty: Type<'db>, preservation: OriginalSubjectPreservation,
crates/ty_python_semantic/src/types/narrow.rs:3311
↓ 4 callers
Method
analyze_pattern_subject_arms
( &mut self, subject_ty: Type<'db>, preservation: OriginalSubjectPreservation,
crates/ty_python_semantic/src/types/narrow.rs:3343
↓ 4 callers
Function
any_base_class
Return `true` if any base class matches an [`Expr`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:32
↓ 4 callers
Function
any_over_body
(body: &[Stmt], mut func: F)
crates/ruff_python_ast/src/helpers.rs:773
↓ 4 callers
Function
api
( endpoint: str, *, method: str = "GET", body: str | None = None, missing_ok: bool = False
scripts/publish_pr_report.py:70
↓ 4 callers
Method
append
(self, t: _T)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP049_0.py:5
↓ 4 callers
Method
apply_type_mapping_impl
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: TypeContext
crates/ty_python_semantic/src/types.rs:1833
↓ 4 callers
Method
arbitrary_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:468
↓ 4 callers
Method
argument_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:6131
↓ 4 callers
Method
as_bin_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1718
↓ 4 callers
Method
as_concrete
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:648
↓ 4 callers
Method
as_equivalence_checker
(&self)
crates/ty_python_semantic/src/types/relation.rs:3341
↓ 4 callers
Method
as_expr_ref
(self)
crates/ruff_python_ast/src/generated.rs:6136
↓ 4 callers
Method
as_int_like_literal
(self)
crates/ty_python_semantic/src/types.rs:3335
↓ 4 callers
Method
as_named_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1681
↓ 4 callers
Method
as_notebook
Returns the underlying notebook if this is a notebook file.
crates/ruff_db/src/source.rs:99
↓ 4 callers
Method
as_number_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2421
↓ 4 callers
Method
as_parameter
(self)
crates/ruff_python_ast/src/nodes.rs:3264
↓ 4 callers
Method
as_property_instance
Returns the specialized Python property represented by this type.
crates/ty_python_semantic/src/types.rs:3071
↓ 4 callers
Method
as_single_part_fstring
Returns the single [`FString`] if the f-string isn't implicitly concatenated, [`None`] otherwise.
crates/ruff_python_ast/src/nodes.rs:536
↓ 4 callers
Method
as_single_part_tstring
Returns the single [`TString`] if the t-string isn't implicitly concatenated, [`None`] otherwise.
crates/ruff_python_ast/src/nodes.rs:841
↓ 4 callers
Method
as_str
Yields the underlying [`str`] slice.
crates/ruff_db/src/files/path.rs:72
↓ 4 callers
Method
as_tuple
(&self)
crates/ruff_linter/src/settings/types.rs:84
↓ 4 callers
Method
as_type_alias
(self)
crates/ty_python_semantic/src/types.rs:3085
↓ 4 callers
Method
as_usize
(self)
crates/ruff_linter/src/line_width.rs:288
↓ 4 callers
Function
ascii
(arg)
crates/ruff_linter/resources/test/fixtures/ruff/RUF010.py:27
↓ 4 callers
Function
assert_absolute_path
(pattern: &str, relative_to: impl AsRef<SystemPath>, expected: &str)
crates/ty_project/src/glob/portable.rs:393
↓ 4 callers
Function
assert_bound_string_symbol
(db: &'db TestDb, symbol: Place<'db>)
crates/ty_python_semantic/src/place.rs:2901
↓ 4 callers
Function
assert_no_edits
(renames: &[(&str, &str)], sources: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:1982
↓ 4 callers
Function
assert_noncomparable
(left: &str, right: &str)
crates/ruff_python_ast_integration_tests/tests/comparable.rs:25
↓ 4 callers
Method
assign_argument
( &mut self, argument_index: usize, argument: Argument<'a>, argument_type: Opt
crates/ty_python_semantic/src/types/call/bind.rs:5151
↓ 4 callers
Function
assignment_targets_from_expr
( expr: &'a Expr, dummy_variable_rgx: &'a Regex, )
crates/ruff_linter/src/rules/pylint/rules/redefined_loop_name.rs:288
↓ 4 callers
Method
atom
(self)
crates/ty_python_core/src/reachability_constraints.rs:75
↓ 4 callers
Method
atomic_constraint_source_order
(&mut self, constraint: AtomicConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1560
↓ 4 callers
Function
bench_project
( criterion: &mut Criterion, project: RealWorldProject<'_>, variants: &[ProjectVariant], )
crates/ruff_benchmark/benches/ty.rs:2798
↓ 4 callers
Function
benchmark
(bencher: Bencher, project: &Project, args: &[&str], cached: bool)
crates/ruff_benchmark/benches/ruff_walltime.rs:92
↓ 4 callers
Method
bind
(self, db: &'db dyn Db, scope: ScopeId<'db>, place: ScopedPlaceId)
crates/ty_python_semantic/src/types.rs:12842
↓ 4 callers
Function
bind_attribute_self_typevars
Bind an annotation using the selected lookup class and the original receiver. A constrained type variable has no single nominal class. The concrete l
crates/ty_python_semantic/src/types/attribute_write.rs:871
↓ 4 callers
Function
bind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured/rst.rs:846
↓ 4 callers
Method
bindings
Returns a [`Bindings`] that can be used to analyze a call to this type. You must call [`match_parameters`][Bindings::match_parameters] and [`check_typ
crates/ty_python_semantic/src/types.rs:7038
↓ 4 callers
Method
bindings_at_definition
( &self, definition: Definition<'db>, )
crates/ty_python_core/src/use_def.rs:1305
↓ 4 callers
Method
bindings_for_place
( &self, place: ScopedPlaceId, )
crates/ty_python_core/src/lib.rs:162
↓ 4 callers
Method
binds_typevar
( self, db: &'db dyn Db, typevar: TypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/generics.rs:1005
↓ 4 callers
Method
boolean_test
Read an already-inferred expression's type and truthiness using the requested [`ExpressionContext`]. Return a [`BooleanTest`] instance. Use short-cir
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:927
↓ 4 callers
Method
bottom
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1662
↓ 4 callers
Method
boundness_analysis
(&self)
crates/ty_python_core/src/use_def.rs:1553
↓ 4 callers
Method
branch_range_until_first_newline
Return a [`TextRange`] spanning from `branch_start` up to the offset of the first newline character after the start of `first_statement`. The newline
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1129
↓ 4 callers
Method
build
The filter matches if any of the globs matches. See <https://github.com/BurntSushi/ripgrep/discussions/2927> for the error returned.
crates/ty_project/src/glob/include.rs:278
↓ 4 callers
Method
build
(self)
crates/ruff_python_ast/src/name.rs:506
↓ 4 callers
Function
c3_merge
Implementation of the [C3-merge algorithm] for calculating a Python class's [method resolution order]. [C3-merge algorithm]: https://docs.python.org/
crates/ty_python_semantic/src/types/mro.rs:871
↓ 4 callers
Function
cached_vendored_root
Get the absolute root path of all cached vendored paths. This does not ensure that this path exists (this is only used for mapping cached paths back
crates/ty_ide/src/lib.rs:381
↓ 4 callers
Method
callables
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/method.rs:272
↓ 4 callers
Method
cell_offsets
The [`CellOffsets`] for the current file, if it's a Jupyter notebook.
crates/ruff_linter/src/checkers/ast/mod.rs:565
↓ 4 callers
Function
character
Find the character called `name`, or `None` if no such character exists. This searches case-insensitively. # Example ```rust assert_eq!(unicode_nam
crates/ruff_unicode_names2/src/lib.rs:308
↓ 4 callers
Method
check_call
Evaluate a call to this known class, emit any diagnostics that are necessary as a result of the call, and return the type that results from the call.
crates/ty_python_semantic/src/types/class/known.rs:2068
↓ 4 callers
Method
check_callable_signature_pair
( &self, db: &'db dyn Db, source: &CallableSignature<'db>, target: &CallableSi
crates/ty_python_semantic/src/types/signatures.rs:2692
↓ 4 callers
Method
check_deprecated
Check if the given ty is `@deprecated` or not
crates/ty_python_semantic/src/types/infer/builder.rs:10690
↓ 4 callers
Method
check_identifier
(&mut self, identifier: &ast::Identifier, kind: OccurrenceKind)
crates/ty_ide/src/references.rs:752
↓ 4 callers
Function
check_project
(db: &ProjectDatabase, project_name: &str)
crates/ruff_benchmark/src/real_world_projects.rs:31
↓ 4 callers
Method
check_settings
Check if the project's settings have any issues
crates/ty_project/src/lib.rs:850
↓ 4 callers
Method
check_type_pair
( &mut self, value_ty: Type<'db>, target_ty: Type<'db>, emit_diagnostics: bool
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:493
↓ 4 callers
Method
check_types
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Con
crates/ty_python_semantic/src/types/call/bind.rs:331
↓ 4 callers
Method
class_context_of_current_method
If the current scope is a method inside an enclosing class, return `Some(class)` where `class` represents the enclosing class. If the current scope i
crates/ty_python_semantic/src/types/infer/builder.rs:2134
↓ 4 callers
Method
class_member
Look up an attribute in the MRO of the meta-type of `self`. This returns class-level attributes when called on an instance-like type, and metaclass at
crates/ty_python_semantic/src/types.rs:4478
↓ 4 callers
Method
class_object_member
Look up attributes stored in the namespace of a class object. Besides attributes present in the class MRO, this includes attributes assigned to insta
crates/ty_python_semantic/src/types.rs:4662
↓ 4 callers
Function
class_pattern_coverage_target
Return the class expression type for coverage analysis.
crates/ty_python_semantic/src/types/match_pattern.rs:90
↓ 4 callers
Method
client_name
(&self)
crates/ty_server/src/session.rs:1489
↓ 4 callers
Method
close_file
(&mut self, file_id: FileHandle)
crates/ty_wasm/src/lib.rs:243
↓ 4 callers
Method
cmp
(&self, other: &Self)
crates/ruff_diagnostics/src/edit.rs:99
↓ 4 callers
Method
cmp
(&self, other: &Self)
crates/ruff/src/args.rs:1280
↓ 4 callers
Method
code_action_request
Send a `textDocument/codeAction` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:863
↓ 4 callers
Method
collect_publish_diagnostic_notifications
( &mut self, count: usize, )
crates/ruff_server/tests/e2e/main.rs:502
↓ 4 callers
Function
collect_while_loop_place_names
(code: &str)
crates/ty_python_core/src/builder/loop_bindings_visitor.rs:205
↓ 4 callers
Method
combine
(self, other: Self)
crates/ty_combine/src/lib.rs:82
↓ 4 callers
Method
combine
(self, config: Self)
crates/ruff_workspace/src/configuration.rs:653
↓ 4 callers
Method
combine
Logically combine two `TypingReference`s into one. `TypingReference::Runtime` has the highest precedence, followed by `TypingReference::Future`, `Typ
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:102
← previous
next →
3,001–3,100 of 31,562, ranked by callers