Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 4 callers
Function
end_of_scope_definition
Returns the sole definition bound to a module symbol at the end of its scope.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1839
↓ 4 callers
Method
end_of_scope_imported_final_candidates
Imports that may contribute a `Final` qualifier at the end of the scope.
crates/ty_python_core/src/use_def.rs:1403
↓ 4 callers
Method
end_token
(self)
crates/ruff_python_parser/src/string.rs:66
↓ 4 callers
Method
entry
(&mut self, node: ast::NodeIndex)
crates/ty_python_core/src/ast_ids.rs:64
↓ 4 callers
Method
entry_is_file
Returns whether `name` resolves to a file, following symbolic links.
crates/ruff_db/src/files/directory.rs:34
↓ 4 callers
Function
enum_member_literals
Return the enum's canonical member literals when they exhaust its runtime domain.
crates/ty_python_semantic/src/types/enums.rs:1626
↓ 4 callers
Method
error_priority
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/call/bind.rs:434
↓ 4 callers
Method
errors
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:9918
↓ 4 callers
Method
evaluate
Compare all possible values. If no member of an enum can match, exclude it from the other possible values. Return whether the result is certain or w
crates/ty_python_semantic/src/types/equality/enums.rs:204
↓ 4 callers
Function
evaluate_reachability
( db: &dyn Db, use_def: &UseDefMap, reachability: ScopedReachabilityConstraintId, )
crates/ty_python_semantic/src/reachability.rs:2147
↓ 4 callers
Function
evaluate_type_equality
Return a constraint for `left` in a branch where `left == right` has the given truthiness. Returns `None` when the comparison behavior of either oper
crates/ty_python_semantic/src/types/equality.rs:134
↓ 4 callers
Method
exact
(&self, module_name: &ModuleName)
crates/ty_module_resolver/src/typeshed.rs:74
↓ 4 callers
Method
exceptions
Return the union of all handled exceptions as an [`Exceptions`] bitflag.
crates/ruff_python_semantic/src/model.rs:2074
↓ 4 callers
Method
existing_entry
(&self, file: File)
crates/ty_project/src/uv/environments.rs:497
↓ 4 callers
Method
expand_eagerly
Returns the eagerly expanded type. In the case of recursive type aliases, this will diverge, so that part will be replaced with `Divergent`.
crates/ty_python_semantic/src/types.rs:10813
↓ 4 callers
Function
expand_parent
IR element that forces the parent group to print in expanded mode. Has no effect if used outside of a group or element that introduce implicit groups
crates/ruff_formatter/src/builders.rs:1783
↓ 4 callers
Method
expand_starred_variadic_annotations
Expands an unpacked `*args` annotation into its logical callable parameters. Preserve the original `*args` definition and source position on every ex
crates/ty_python_semantic/src/types/signatures.rs:5764
↓ 4 callers
Method
expression_id
The expression that the reference occurs in.
crates/ruff_python_semantic/src/reference.rs:31
↓ 4 callers
Method
expression_node
(&self, expr: &ast::Expr)
crates/ty_python_core/src/place.rs:642
↓ 4 callers
Method
expression_truthiness
Evaluate an already-inferred expression, preserving the absence of a result.
crates/ty_python_semantic/src/types/infer/builder.rs:9159
↓ 4 callers
Function
extract
(line: &'static str)
crates/ruff_unicode_names2_generator/src/lib.rs:29
↓ 4 callers
Method
extract_explicit_bases
Extract base classes from the bases argument of a `type()` or `types.new_class()` call. Emits a diagnostic if `bases_type` is not a valid bases itera
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:82
↓ 4 callers
Function
extract_unpacked_typed_dict_from_value_type
Extracts the declared keys and openness from a `TypedDict`-shaped value.
crates/ty_python_semantic/src/types/typed_dict.rs:1928
↓ 4 callers
Function
f
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/if.py:82
↓ 4 callers
Method
fallback_enter_type
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/context_manager.rs:343
↓ 4 callers
Method
fallback_type
(&self)
crates/ty_python_semantic/src/types/infer.rs:1168
↓ 4 callers
Function
fetch
( request: Request, env: Env, ctx: ExecutionContext, )
playground/api/src/index.ts:41
↓ 4 callers
Method
file_name
Returns the entry's name without its parent directory.
crates/ty_module_resolver/src/path.rs:475
↓ 4 callers
Method
file_name
(&self)
crates/ruff_workspace/src/resolver.rs:781
↓ 4 callers
Method
file_type_expression_flags
Get metadata for a type expression from any scope in the same file.
crates/ty_python_semantic/src/types/infer/builder.rs:1161
↓ 4 callers
Method
filename
(mut self, filename: &'a str)
crates/ruff/tests/integration_test.rs:59
↓ 4 callers
Method
files_to_check
(self)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:198
↓ 4 callers
Method
finalize
(&mut self, trailer: Option<Trailer>)
crates/ruff_linter/src/rules/isort/block.rs:107
↓ 4 callers
Method
find_name_in_mro_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, po
crates/ty_python_semantic/src/types/subclass_of.rs:269
↓ 4 callers
Function
find_over_type
Recurse into a type and calls the passed-in closure on every nested type encountered, returning the first non-`None` value returned by the closure. F
crates/ty_python_semantic/src/types/visitor.rs:1162
↓ 4 callers
Function
find_symbol_in_scope
Find definitions for a symbol name in a specific scope.
crates/ty_python_semantic/src/types/definition_resolution.rs:817
↓ 4 callers
Method
find_token_start
Attempts to find the start of the given token in the given range.
crates/ty_ide/src/folding_range.rs:423
↓ 4 callers
Method
finish
Consumes `self` and returns the [`SourceFile`].
crates/ruff_source_file/src/lib.rs:120
↓ 4 callers
Method
finish
Finishes the output and returns any error encountered.
crates/ruff_formatter/src/builders.rs:2504
↓ 4 callers
Method
finish
(&mut self)
crates/ty_python_semantic/src/types/narrow.rs:1713
↓ 4 callers
Method
finish_visit
Finish a [`CycleDetectorVisit::Pending`] visit and cache its result.
crates/ty_python_semantic/src/types/cyclic.rs:1002
↓ 4 callers
Method
finite_alternatives
Return the exact finite alternatives represented by this intersection, if available.
crates/ty_python_semantic/src/types/set_theoretic.rs:1074
↓ 4 callers
Function
first_nontrivial_statement
Return the first "nontrivial" statement in `suite`, if any. See [`is_trivial_statement`] for the definition of a trivial statement.
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1647
↓ 4 callers
Method
first_operand
Returns the first operand in the slice.
crates/ruff_python_formatter/src/expression/binary_like.rs:589
↓ 4 callers
Method
fits
(&mut self, queue: &PrintQueue<'a>, stack: &PrintCallStack)
crates/ruff_formatter/src/printer/mod.rs:395
↓ 4 callers
Method
flags
(self)
crates/ruff_python_formatter/src/other/interpolated_string.rs:20
↓ 4 callers
Method
flags
Returns the line's flags
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:214
↓ 4 callers
Method
folding_range_request
(&mut self, uri: &Uri)
crates/ty_server/tests/e2e/main.rs:1185
↓ 4 callers
Function
foo
(answer=(p := 42))
crates/ruff_python_formatter/resources/test/fixtures/black/cases/pep_572.py:14
↓ 4 callers
Function
foo
(a, /)
crates/ruff_python_parser/resources/inline/ok/pos_only_py38.py:2
↓ 4 callers
Function
foo
(a, /)
crates/ruff_python_parser/resources/inline/err/pos_only_py37.py:2
↓ 4 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB101_0.py:1
↓ 4 callers
Method
for_new_materialization_root
(&self)
crates/ty_python_semantic/src/types.rs:681
↓ 4 callers
Function
formatError
(error: unknown)
playground/ty/src/Editor/Chrome.tsx:380
↓ 4 callers
Function
format_node
( parsed: &'a Parsed<N>, trivia: &'a TriviaRanges, source: &'a str, options: PyFormatOptions,
crates/ruff_python_formatter/src/lib.rs:162
↓ 4 callers
Method
free_threaded_build_available
(self)
crates/ruff_python_ast/src/python_version.rs:83
↓ 4 callers
Method
freeze
Freezes all inputs on files created from now on. Existing files retain their current durability. Callers should therefore call this before discoverin
crates/ruff_db/src/files.rs:92
↓ 4 callers
Method
fresh_revision
(&mut self)
crates/ty_python_core/src/use_def/exception_checkpoint.rs:40
↓ 4 callers
Method
from
(text: &'a str)
crates/ruff_source_file/src/newlines.rs:51
↓ 4 callers
Method
full_range
(&self)
crates/ty_ide/src/lib.rs:161
↓ 4 callers
Method
function_definition
(&'db self, path: &str, name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4361
↓ 4 callers
Function
function_known_decorator_flags
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:344
↓ 4 callers
Function
g
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/return_type_parameters.py:149
↓ 4 callers
Method
get
(&self, index: usize)
crates/ruff_db/src/parsed.rs:547
↓ 4 callers
Method
get_line
(&self, idx: usize)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:57
↓ 4 callers
Method
get_or_build
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:701
↓ 4 callers
Method
get_or_create_nest
( self, key: Key, *, access_lists: bool = True, )
crates/ruff_benchmark/resources/tomllib/_parser.py:198
↓ 4 callers
Function
get_redirect
Returns the original selector and its redirect target, both with a static lifetime.
crates/ruff_linter/src/rule_redirects.rs:12
↓ 4 callers
Method
hasConfigurationFile
()
playground/ty/src/Playground.tsx:741
↓ 4 callers
Method
has_active_exception_handler
Returns whether an active `try` or `with` context can receive an exception from this scope. A context can remain on the stack for its `finally` suite
crates/ty_python_core/src/builder/except_handlers.rs:148
↓ 4 callers
Method
has_applicable_fix
Returns `true` if the diagnostic has a fix that applies at the configured applicability level.
crates/ruff_db/src/diagnostic/mod.rs:409
↓ 4 callers
Method
has_decorators
Whether the function has decorators, without loading its module's AST.
crates/ty_python_core/src/definition.rs:1207
↓ 4 callers
Method
has_implicit_positional_receiver_annotation
(&self)
crates/ty_python_semantic/src/types/signatures.rs:1902
↓ 4 callers
Method
has_known_members
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:207
↓ 4 callers
Method
has_pending_synchronizations
Returns whether any project or script synchronization is pending. A request stays pending until [`poll_sync`](Self::poll_sync) applies its result, ev
crates/ty_project/src/uv/environments.rs:469
↓ 4 callers
Method
has_pep_695_type_params
Returns `true` if the class has a PEP 695 type parameter list, including an empty list recovered from invalid syntax such as `class C[]: ...`.
crates/ty_python_semantic/src/types/class/static_literal.rs:406
↓ 4 callers
Function
has_skip_comment
(trailing_comments: &[SourceComment], source: &str)
crates/ruff_python_formatter/src/comments/mod.rs:534
↓ 4 callers
Method
has_syntax_errors
Returns `true` if the parsed source code contains any [`ParseError`]s *or [`UnsupportedSyntaxError`]s. See [`Parsed::has_invalid_syntax`] for a versi
crates/ruff_python_parser/src/lib.rs:463
↓ 4 callers
Function
has_trailing_content
Return `true` if the node ending at the given [`TextSize`] has trailing content.
crates/ruff_python_trivia/src/whitespace.rs:67
↓ 4 callers
Method
has_unguarded_alias_cycle
Returns whether expanding aliases, unions, and intersections can return to the same alias without entering another type. For example, `type A = int |
crates/ty_python_semantic/src/types/type_alias.rs:36
↓ 4 callers
Method
highlight_source
Style the source according to the [`AnnotationKind`] This gives extra emphasis to this annotation
crates/ruff_annotate_snippets/src/snippet.rs:386
↓ 4 callers
Function
hints
(db: &dyn Db, file: File)
crates/ty_ide/src/hints.rs:43
↓ 4 callers
Function
hover
( db: &'db dyn Db, file: ProgramFile<'db>, offset: TextSize, )
crates/ty_ide/src/hover.rs:21
↓ 4 callers
Method
implementation_callables
Return all effective implementation callables, falling back to the raw implementation.
crates/ty_python_semantic/src/types/function.rs:1319
↓ 4 callers
Method
implicit_attribute_name
( &self, db: &'db dyn Db, name: &str, decorator: MethodDecorator, init
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:478
↓ 4 callers
Method
implies
Returns a constraint set encoding that this constraint set implies another. In the result's source order, `self` will appear before `other`.
crates/ty_python_semantic/src/types/constraints.rs:767
↓ 4 callers
Function
import
()
crates/ty_python_core/src/lib.rs:1341
↓ 4 callers
Method
import
(alias: &ast::Alias, kind: ImportKind)
crates/ty_ide/src/symbols.rs:444
↓ 4 callers
Method
import_rewrite_preserves_laziness
Whether changing this import's module preserves membership in `__lazy_modules__`.
crates/ruff_linter/src/checkers/ast/mod.rs:371
↓ 4 callers
Method
importer
Constructs an importer using the file's cached imports and source style.
crates/ty_python_semantic/src/types/context.rs:220
↓ 4 callers
Method
in_forward_reference
Return `true` if the model is in a forward type reference. Includes deferred string types, and future types in annotations. ## Examples ```python fr
crates/ruff_python_semantic/src/model.rs:2202
↓ 4 callers
Method
in_interpolated_string
Return `true` if the model is in an f-string or t-string.
crates/ruff_python_semantic/src/model.rs:2269
↓ 4 callers
Method
in_parenthesized_context
Returns `true` if the iterator is within a parenthesized context.
crates/ruff_python_ast/src/token/tokens.rs:373
↓ 4 callers
Method
in_runtime_context
Return `true` if the context is in a runtime context.
crates/ruff_python_semantic/src/reference.rs:51
↓ 4 callers
Method
in_typing_only_annotation
Return `true` if the model is in a typing-only type annotation.
crates/ruff_python_semantic/src/model.rs:2124
↓ 4 callers
Method
included_paths_or_root
Returns the paths that should be checked. The default is to check the entire project in which case this method returns the project root. However, use
crates/ty_project/src/lib.rs:658
↓ 4 callers
Method
incoming
Returns the client to server request queue.
crates/ty_server/src/session/request_queue.rs:34
↓ 4 callers
Function
incoming_calls
Find every place in the project that calls the symbol at `offset`, grouped by enclosing function/method/class/module.
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:32
↓ 4 callers
Method
increment
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:558
↓ 4 callers
Method
indent_width
Width of an indent in characters.
crates/ruff_formatter/src/printer/printer_options/mod.rs:56
← previous
next →
3,201–3,300 of 31,766, ranked by callers