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
↓ 6 callers
Method
definition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/cyclic.rs:287
↓ 6 callers
Method
definition_span
Returns a [`Span`] pointing to the definition of this class. For static classes, this is the class header (name and arguments). For dynamic classes,
crates/ty_python_semantic/src/types/class.rs:2562
↓ 6 callers
Function
definitions_for_name
Returns definitions for IDE navigation, expanding numeric annotations to their accepted classes.
crates/ty_python_semantic/src/types/ide_support.rs:83
↓ 6 callers
Method
deprecated_functions
Returns the deprecated functions invoked by each union alternative, including downstream constructor methods. An intersection only reports deprecation
crates/ty_python_semantic/src/types/call/bind.rs:977
↓ 6 callers
Function
deserialize
(deserializer: D)
crates/ty_project/src/uv/metadata/string_interner.rs:37
↓ 6 callers
Method
did_change_watched_file
Sends a `workspace/didChangeWatchedFiles` notification for one path.
crates/ty_server/tests/e2e/main.rs:955
↓ 6 callers
Method
dispose
()
playground/ty/src/Editor/Editor.tsx:556
↓ 6 callers
Method
eat_if
Eats the next character if `predicate` returns `true`.
crates/ruff_python_trivia/src/cursor.rs:152
↓ 6 callers
Method
emit
(&mut self, text: &dyn Debug)
crates/ruff_python_ast_integration_tests/tests/source_order.rs:176
↓ 6 callers
Function
empty
()
crates/ty_python_core/src/lib.rs:1305
↓ 6 callers
Method
entries
Adds the contents of an iterator of entries to the join output.
crates/ruff_formatter/src/builders.rs:2491
↓ 6 callers
Function
enumerate_argument_types
( arguments: &'a CallArguments<'a, 'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:5877
↓ 6 callers
Method
env_remove
Removes an environment variable from the command.
crates/ruff_db/src/system/command.rs:61
↓ 6 callers
Method
escape_for_display
(mut self)
crates/ruff_python_literal/src/escape.rs:84
↓ 6 callers
Method
evaluate
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, id: ScopedPredicateId
crates/ty_python_semantic/src/reachability.rs:851
↓ 6 callers
Method
evaluate_expr_compare_op
( &self, lhs_ty: Type<'db>, rhs_ty: Type<'db>, op: ast::CmpOp, is_posi
crates/ty_python_semantic/src/types/narrow.rs:3917
↓ 6 callers
Function
evaluate_reachability_with_cache
Evaluates a reachability constraint, optionally using an inference-local cache.
crates/ty_python_semantic/src/reachability.rs:2263
↓ 6 callers
Function
exact
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, typevar: BoundTypeVarInstance<'db>,
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:39
↓ 6 callers
Function
expect_formatted
(result: FormatResult)
crates/ruff_server/src/format.rs:389
↓ 6 callers
Method
expect_union
(self)
crates/ty_python_semantic/src/types.rs:3280
↓ 6 callers
Method
explicit_bases
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:162
↓ 6 callers
Method
extend_cycle_recovery
(&mut self, other: Option<Type<'db>>)
crates/ty_python_semantic/src/types/infer/builder.rs:621
↓ 6 callers
Method
extend_definition
( &mut self, definition: Definition<'db>, inference: &DefinitionInference<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:640
↓ 6 callers
Method
extend_expression_types
Replacing an expression's type also replaces any truthiness override. A newly inferred comparison may no longer need an override, so extending the spa
crates/ty_python_semantic/src/types/infer/builder.rs:787
↓ 6 callers
Function
extract_result_ids_from_response
(response: &WorkspaceDiagnosticReport)
crates/ty_server/tests/e2e/pull_diagnostics.rs:1600
↓ 6 callers
Method
file_expression_type
Get the type of an expression from any scope in the same file. If the expression is in the current scope, and we are inferring the entire scope, just
crates/ty_python_semantic/src/types/infer/builder.rs:1138
↓ 6 callers
Function
file_to_uri
Returns a [`Uri`] for the given [`File`].
crates/ty_server/src/system.rs:26
↓ 6 callers
Function
find_best_suggestion
( options: O, typo: &str, hide_underscored_suggestions: HideUnderscoredSuggestions, )
crates/ty_python_semantic/src/diagnostic/levenshtein.rs:27
↓ 6 callers
Method
first_help_text
Returns the message of the first sub-diagnostic with a `Help` severity. Note that this is used as the fix title/suggestion for some of Ruff's output
crates/ruff_db/src/diagnostic/mod.rs:483
↓ 6 callers
Function
fix_all
Applies all fixes for the given fix mode. `check_file` is a separate parameter so that tests can easily mock out a file's diagnostics.
crates/ty_python_semantic/src/fixes.rs:80
↓ 6 callers
Function
fixture_exposures_for_definition
Returns the available pytest fixture exposures contributed by `definition`. A decorated function contributes an exposure directly: ```python # fixtu
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:285
↓ 6 callers
Method
flow_snapshot
(&self)
crates/ty_python_core/src/builder.rs:1329
↓ 6 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/flake8_pytest_style/PT031.py:37
↓ 6 callers
Function
full
()
crates/ty_python_semantic/src/types/signatures.rs:6876
↓ 6 callers
Method
future_annotations_or_stub
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:911
↓ 6 callers
Method
get
Get a resolved glob.
crates/ruff/src/commands/analyze_graph.rs:297
↓ 6 callers
Method
get
(&self, directive: MdtestDirective)
crates/mdtest/src/parser.rs:1104
↓ 6 callers
Method
get_default
Returns the most appropriate type of this argument when there is no specific declared type.
crates/ty_python_semantic/src/types/call/arguments.rs:459
↓ 6 callers
Method
has
Returns `true` if this set has an option that resolves to `name`. The name can be separated by `.` to find a nested option. ## Examples ### Test fo
crates/ruff_options_metadata/src/lib.rs:199
↓ 6 callers
Method
has_aliases
Returns `true` if any direct element of this union is a type alias.
crates/ty_python_semantic/src/types/set_theoretic.rs:213
↓ 6 callers
Method
has_cyclic_mro
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class_base.rs:474
↓ 6 callers
Method
has_dangling
Returns `true` if node has any [dangling comments](self#dangling-comments).
crates/ruff_python_formatter/src/comments/mod.rs:308
↓ 6 callers
Method
has_generated_slots
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/slots.rs:266
↓ 6 callers
Method
has_implicit_receiver
Returns true if this overload has an implicit `self` or `cls` receiver parameter.
crates/ty_python_semantic/src/types/function.rs:382
↓ 6 callers
Method
has_known_fields
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/named_tuple.rs:485
↓ 6 callers
Method
has_provisional_marker
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:149
↓ 6 callers
Method
has_relation_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:871
↓ 6 callers
Method
has_relation_to_with_typevar_evaluation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:893
↓ 6 callers
Method
has_unspecialized_type_var
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:137
↓ 6 callers
Method
header_span
Returns a [`Span`] pointing to the definition of this class. For static classes, this is the class header (name and arguments). For dynamic classes,
crates/ty_python_semantic/src/types/class.rs:981
↓ 6 callers
Method
hover
(&self)
crates/ty_ide/src/hover.rs:7510
↓ 6 callers
Function
imported_symbol
Infers the public type of an imported symbol. If `requires_explicit_reexport` is [`None`], it will be inferred from the file's source type. For stub
crates/ty_python_semantic/src/place.rs:535
↓ 6 callers
Method
in_boolean_test
Return `true` if the model is in boolean test.
crates/ruff_python_semantic/src/model.rs:2251
↓ 6 callers
Method
in_init_module
Returns whether the file under analysis is an `__init__.py` file.
crates/ruff_linter/src/checkers/ast/mod.rs:553
↓ 6 callers
Method
in_pep_257_docstring
Return `true` if the model is in a docstring as described in [PEP 257]. [PEP 257]: https://peps.python.org/pep-0257/#what-is-a-docstring
crates/ruff_python_semantic/src/model.rs:2274
↓ 6 callers
Method
in_runtime_evaluated_annotation
Return `true` if the context is in a runtime-evaluated type annotation.
crates/ruff_python_semantic/src/model.rs:2101
↓ 6 callers
Method
infer_optional_expression
( &mut self, expression: Option<&ast::Expr>, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6661
↓ 6 callers
Function
infer_unpack_types
(db: &'db dyn Db, unpack: Unpack<'db>)
crates/ty_python_semantic/src/types/infer.rs:895
↓ 6 callers
Method
insert
Insert a resolved glob.
crates/ruff/src/commands/analyze_graph.rs:292
↓ 6 callers
Method
insert
Insert the type of this argument when inferred with the provided type context.
crates/ty_python_semantic/src/types/call/arguments.rs:492
↓ 6 callers
Method
intern_bindings
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:376
↓ 6 callers
Method
interpolations
Returns an iterator over all the [`InterpolatedElement`] nodes contained in this f-string.
crates/ruff_python_ast/src/nodes.rs:1414
↓ 6 callers
Method
into_code
Access the resulting code, consuming the result
crates/ruff_formatter/src/lib.rs:419
↓ 6 callers
Method
into_diagnostic
Convert this program-settings diagnostic into a diagnostic that can be stored on a project.
crates/ty_project/src/metadata/options.rs:723
↓ 6 callers
Method
into_diagnostic_message
(self)
crates/ruff_db/src/diagnostic/mod.rs:1664
↓ 6 callers
Method
into_edit
(self)
crates/ruff_linter/src/noqa.rs:1084
↓ 6 callers
Method
into_settings
( self, )
crates/ruff_workspace/src/options.rs:1189
↓ 6 callers
Method
is_alias
Return `true` if this [`Binding`] represents an aliased symbol (e.g., `app` in `from fastapi import FastAPI as app`).
crates/ruff_python_semantic/src/binding.rs:76
↓ 6 callers
Method
is_always_raise
Returns `true` if the [`Terminal`] behavior is `Raise` or `RaiseNotImplemented`.
crates/ruff_python_semantic/src/analyze/terminal.rs:44
↓ 6 callers
Method
is_attribute_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2540
↓ 6 callers
Function
is_cased_lowercase
Return `true` if a string is _cased_ as lowercase. A string is cased as lowercase if it contains at least one lowercase character and no uppercase ch
crates/ruff_python_stdlib/src/str.rs:96
↓ 6 callers
Method
is_closed
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:125
↓ 6 callers
Function
is_const_false
Return `true` if an [`Expr`] is a literal `False`.
crates/ruff_python_ast/src/helpers.rs:846
↓ 6 callers
Method
is_data_descriptor
Returns whether this type is a data descriptor, i.e. defines `__set__` or `__delete__`. If this type is a union, requires all elements of union to be
crates/ty_python_semantic/src/types.rs:5547
↓ 6 callers
Method
is_dataclass_like
Returns `true` if this class is a dataclass-like class. This covers `@dataclass`-decorated classes, as well as classes created via `dataclass_transfo
crates/ty_python_semantic/src/types/class/static_literal.rs:259
↓ 6 callers
Method
is_empty
(&self)
crates/ty_project/src/files.rs:207
↓ 6 callers
Method
is_empty
Whether there are no modules or stub override names to visit during recursive enumeration.
crates/ty_module_resolver/src/resolve/search.rs:459
↓ 6 callers
Method
is_empty
(&self)
crates/ruff_python_parser/tests/generate_inline_tests.rs:46
↓ 6 callers
Method
is_enabled
(self)
crates/ruff_python_formatter/src/options.rs:362
↓ 6 callers
Method
is_f_string_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2244
↓ 6 callers
Method
is_first_party
Is this search path in "first party" code? i.e., The end user's project code.
crates/ty_module_resolver/src/path.rs:717
↓ 6 callers
Method
is_fluent
(self)
crates/ruff_python_formatter/src/expression/mod.rs:1137
↓ 6 callers
Method
is_fully_static
Checks whether the visited type contents contain no dynamic types. This is not a complete test for semantic staticness: the visitor skips original fu
crates/ty_python_semantic/src/types.rs:2545
↓ 6 callers
Function
is_immutable_annotation
Return `true` if `Expr` represents a reference to a type annotation that resolves to an immutable type.
crates/ruff_python_semantic/src/analyze/typing.rs:293
↓ 6 callers
Function
is_import_required_by_isort
( required_imports: &RequiredImports, stmt: StmtRef, alias: &Alias, )
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_future_import.rs:85
↓ 6 callers
Method
is_interpolated_string
Does the string have an `f`,`F`,`t`, or `T` prefix?
crates/ruff_python_ast/src/nodes.rs:2492
↓ 6 callers
Method
is_intersection
Returns true if this element is an intersection of multiple callables.
crates/ty_python_semantic/src/types/call/bind.rs:511
↓ 6 callers
Function
is_keyword
See: https://github.com/python/cpython/blob/9d692841691590c25e6cf5b2250a594d3bf54825/Lib/keyword.py#L18
crates/ruff_python_stdlib/src/keyword.rs:2
↓ 6 callers
Method
is_method_like
Returns `true` if this callable represents a function used as a class member.
crates/ty_python_semantic/src/types/callable.rs:907
↓ 6 callers
Method
is_not
( self, because: impl std::fmt::Display, error_context: ErrorC
crates/ty_python_semantic/src/types/iteration.rs:801
↓ 6 callers
Method
is_notimplemented
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:2742
↓ 6 callers
Method
is_promotable
(self)
crates/ty_python_semantic/src/types/literal.rs:55
↓ 6 callers
Method
is_raw_string
(&self)
crates/ruff_linter/src/docstrings/mod.rs:53
↓ 6 callers
Method
is_removed
(&self)
crates/ty_python_semantic/src/lint.rs:222
↓ 6 callers
Function
is_set
Test whether the given binding can be considered a set. For this, we check what value might be associated with it through it's initialization and wha
crates/ruff_python_semantic/src/analyze/typing.rs:1097
↓ 6 callers
Method
is_start
Returns `true` if `self` is any start tag.
crates/ruff_formatter/src/format_element/tag.rs:103
↓ 6 callers
Method
is_terminal
(self)
crates/ty_python_core/src/narrowing_constraints.rs:58
↓ 6 callers
Method
is_third_party
(self)
crates/ty_python_semantic/src/types/class/known.rs:2250
↓ 6 callers
Method
iter
Return an iterator over live declarations for this place.
crates/ty_python_core/src/use_def/place_state.rs:263
↓ 6 callers
Method
iter_callable_items
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:1050
← previous
next →
2,301–2,400 of 31,562, ranked by callers