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
↓ 4 callers
Method
flags
Returns the line's flags
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:214
↓ 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:680
↓ 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:3474
↓ 4 callers
Function
function_known_decorator_flags
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:345
↓ 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_for_declared_type
Returns the type of this argument when inferred against the provided declared type. If the type was not inferred against the declared type directly,
crates/ty_python_semantic/src/types/call/arguments.rs:486
↓ 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:688
↓ 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:1925
↓ 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:465
↓ 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:407
↓ 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:33
↓ 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
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:771
↓ 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:366
↓ 4 callers
Method
importer
Constructs an importer using the file's cached imports and source style.
crates/ty_python_semantic/src/types/context.rs:218
↓ 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:2173
↓ 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:2240
↓ 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:2095
↓ 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:648
↓ 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
↓ 4 callers
Function
indent_with_suffix
Returns the indentation of the given line and everything following it.
crates/ruff_python_formatter/src/string/docstring.rs:1866
↓ 4 callers
Method
index
Returns a reference to the index. # Panics Panics if there's a mutable reference to the index via [`index_mut`]. [`index_mut`]: Session::index_mut
crates/ty_server/src/session.rs:1447
↓ 4 callers
Method
index
(&self, index: I)
crates/ruff_index/src/slice.rs:146
↓ 4 callers
Method
infer
(&self, constraints: &ConstraintSetBuilder<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:6768
↓ 4 callers
Method
infer_comprehensions
(&mut self, comprehensions: &[ast::Comprehension])
crates/ty_python_semantic/src/types/infer/builder.rs:8858
↓ 4 callers
Method
infer_extra_items_kwarg
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:786
↓ 4 callers
Method
infer_first_comprehension_iter
Infer the type of the `iter` expression of the first comprehension.
crates/ty_python_semantic/src/types/infer/builder.rs:8464
↓ 4 callers
Function
infer_function_default_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:471
↓ 4 callers
Function
infer_scope_types
Infer all types for a [`ScopeId`], including all definitions and expressions in that scope. Use when checking a scope, or needing to provide a type fo
crates/ty_python_semantic/src/types/infer.rs:527
↓ 4 callers
Method
infer_silent
Infer the expression silently, with diagnostics disabled. This method may be called an unlimited number of times.
crates/ty_python_semantic/src/types/infer/builder.rs:13029
↓ 4 callers
Method
infer_subscript_type_expression
( &mut self, subscript: &ast::ExprSubscript, value_ty: Type<'db>, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2029
↓ 4 callers
Function
inherited_class_body_declaration
( db: &'db dyn Db, scope: ScopeId<'db>, symbol: ScopedSymbolId, )
crates/ty_python_semantic/src/types/member.rs:155
↓ 4 callers
Function
inline
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/comments9.py:86
↓ 4 callers
Function
inner
(expr: &Expr, func: &mut dyn FnMut(&Expr) -> bool)
crates/ruff_python_ast/src/helpers.rs:261
↓ 4 callers
Method
insert
insert the value given by the sequence `it`, returning a tuple (is this a substring already in the tree, was this exact sequence previously inserted).
crates/ruff_unicode_names2_generator/src/trie.rs:37
↓ 4 callers
Method
insert_print_mode
(&mut self, group_id: GroupId, mode: PrintMode)
crates/ruff_formatter/src/printer/mod.rs:926
↓ 4 callers
Method
insert_type
( &mut self, index: usize, tcx: impl Into<TypeContext<'db>>, ty: Type<'db>,
crates/ty_python_semantic/src/types/call/arguments.rs:711
↓ 4 callers
Method
instance_fallback
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1798
↓ 4 callers
Method
instance_type
(self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:774
↓ 4 callers
Method
intern_declarations
(&mut self, declarations: Declarations)
crates/ty_python_core/src/use_def.rs:412
↓ 4 callers
Method
interpolated_string_ranges
Returns the byte offset ranges of interpolated strings.
crates/ruff_python_index/src/indexer.rs:111
↓ 4 callers
Method
intersects_range_filter
(&self, range: TextRange)
crates/ty_ide/src/folding_range.rs:117
↓ 4 callers
Method
into_accesses
(self)
crates/ruff_linter/src/rules/pylint/helpers.rs:92
↓ 4 callers
Method
into_bindings
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13078
↓ 4 callers
Method
into_diagnostic
Create a new guard. This initializes a new diagnostic using the given message along with the ID and severity used to create this builder. The diagno
crates/ty_python_semantic/src/suppression.rs:355
↓ 4 callers
Method
into_document
Consumes `self` and returns the formatted document.
crates/ruff_formatter/src/lib.rs:315
↓ 4 callers
Method
into_error_context
Return the collected error context, or an empty tree if collection was disabled.
crates/ty_python_semantic/src/types/relation.rs:1805
↓ 4 callers
Method
into_file_path
(self)
crates/ty_server/src/document.rs:132
↓ 4 callers
Method
into_iter
(self)
crates/ty/src/args.rs:348
↓ 4 callers
Method
into_iter
(self)
crates/ruff_formatter/src/format_element.rs:405
↓ 4 callers
Method
into_lookup_result
Transform place and qualifiers into a [`LookupResult`], a [`Result`] type in which the `Ok` variant represents a definitely defined place and the `Err
crates/ty_python_semantic/src/place.rs:1156
↓ 4 callers
Method
into_lower_bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:875
↓ 4 callers
Method
into_module
This is the module we were actually interested in resolving, complete the resolution
crates/ty_module_resolver/src/resolve.rs:1325
↓ 4 callers
Method
into_navigation_targets
Convert these semantic definitions to editor-facing navigation targets.
crates/ty_ide/src/goto.rs:408
↓ 4 callers
Method
into_path
(self)
crates/ruff_db/src/system.rs:358
↓ 4 callers
Method
into_path
(self)
crates/ty_site_packages/src/lib.rs:72
↓ 4 callers
Method
into_string
(self)
crates/ruff_db/src/system/path.rs:592
↓ 4 callers
Method
into_syntax
Consumes the [`Parsed`] output and returns the contained syntax node.
crates/ruff_python_parser/src/lib.rs:424
↓ 4 callers
Method
into_upper_bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:994
↓ 4 callers
Method
into_vec
Consumes the buffer and returns the written [`FormatElement]`s as a vector.
crates/ruff_formatter/src/buffer.rs:195
↓ 4 callers
Function
invalid_end_tag
(end_tag: TagKind, start_tag: Option<TagKind>)
crates/ruff_formatter/src/printer/mod.rs:1569
↓ 4 callers
Function
is_available_definition
Returns whether `definition` remains bound in its defining scope and may exist at runtime.
crates/ty_python_semantic/src/types/dedicated/pytest.rs:18
↓ 4 callers
Method
is_binding
True if this definition assigns a value to the place. False only for annotated assignments without a RHS.
crates/ty_python_core/src/definition.rs:918
↓ 4 callers
Method
is_bool
(self)
crates/ty_python_semantic/src/types/literal.rs:233
↓ 4 callers
Method
is_byte_string
Does the string have a `b` or `B` prefix?
crates/ruff_python_ast/src/nodes.rs:2498
↓ 4 callers
Method
is_callable_type
Returns `true` if `self` is [`Type::Callable`].
crates/ty_python_semantic/src/types.rs:2632
↓ 4 callers
Function
is_camelcase
(name: &str)
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:8
← previous
next →
3,201–3,300 of 31,562, ranked by callers