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
indent_with_suffix
Returns the indentation of the given line and everything following it.
crates/ruff_python_formatter/src/string/docstring.rs:1863
↓ 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:1475
↓ 4 callers
Method
index
(&self, index: I)
crates/ruff_index/src/slice.rs:146
↓ 4 callers
Method
infer_comprehensions
(&mut self, comprehensions: &[ast::Comprehension])
crates/ty_python_semantic/src/types/infer/builder.rs:8992
↓ 4 callers
Method
infer_extra_items_kwarg
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:811
↓ 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:8598
↓ 4 callers
Function
infer_function_default_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:470
↓ 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:526
↓ 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:13178
↓ 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:153
↓ 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:726
↓ 4 callers
Method
instance_fallback
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1797
↓ 4 callers
Method
instance_type
(self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:754
↓ 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:89
↓ 4 callers
Method
into_bindings
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13227
↓ 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:1854
↓ 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_lower_bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:875
↓ 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
Method
is_alias_like
Whether this type wraps an alias body that can be unfolded.
crates/ty_python_semantic/src/types.rs:2737
↓ 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:248
↓ 4 callers
Method
is_byte_string
Does the string have a `b` or `B` prefix?
crates/ruff_python_ast/src/nodes.rs:2511
↓ 4 callers
Method
is_callable_type
Returns `true` if `self` is [`Type::Callable`].
crates/ty_python_semantic/src/types.rs:2631
↓ 4 callers
Function
is_camelcase
(name: &str)
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:8
↓ 4 callers
Method
is_class_literal
(&self)
crates/ty_python_semantic/src/types.rs:3210
↓ 4 callers
Function
is_class_object_type
(ty: Type<'_>)
crates/ty_python_semantic/src/types/protocol_class.rs:2622
↓ 4 callers
Method
is_classmethod
Returns true if this overload is decorated with `@classmethod`, or if it is implicitly a classmethod.
crates/ty_python_semantic/src/types/function.rs:370
↓ 4 callers
Method
is_classmethod
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:47
↓ 4 callers
Method
is_compare_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2170
↓ 4 callers
Method
is_constrained
Returns whether this type variable has constraints without evaluating a lazy bound.
crates/ty_python_semantic/src/types/typevar.rs:368
↓ 4 callers
Method
is_declared
(self)
crates/ty_python_core/src/place.rs:125
↓ 4 callers
Method
is_definitely_defined
(&self)
crates/ty_python_semantic/src/place.rs:190
↓ 4 callers
Method
is_definitely_non_data_descriptor
Returns whether this type is known not to be a data descriptor. Descriptor uncertainty propagates through outer unions, intersections, and aliases. `
crates/ty_python_semantic/src/types.rs:5609
↓ 4 callers
Function
is_discarded_dict_key_assignment
Returns `true` if the definition refers to a dictionary-key binding that should be discarded. For example, inference synthesizes an `x["a"] = "bad"`
crates/ty_python_semantic/src/types/infer.rs:295
↓ 4 callers
Method
is_dynamic
(&self)
crates/ty_python_semantic/src/types.rs:2799
↓ 4 callers
Method
is_eager_assignability
(&self)
crates/ty_python_semantic/src/types/relation.rs:1428
↓ 4 callers
Method
is_empty
(&self)
crates/ty_ide/src/will_rename.rs:225
↓ 4 callers
Function
is_empty_f_string
Returns `true` if the expression definitely resolves to the empty string, when used as an f-string expression.
crates/ruff_python_ast/src/helpers.rs:1605
↓ 4 callers
Method
is_equivalent_to_materialization
( &self, db: &'db dyn Db, left: Type<'db>, right: Type<'db>, )
crates/ty_python_semantic/src/types.rs:669
↓ 4 callers
Method
is_fixable
(self, diagnostic: &Diagnostic)
crates/ty_python_semantic/src/fixes.rs:378
↓ 4 callers
Method
is_generic
(self)
crates/ty_python_semantic/src/types/class.rs:1211
↓ 4 callers
Method
is_generic_alias
(&self)
crates/ty_python_semantic/src/types.rs:2758
↓ 4 callers
Function
is_init
Returns `true` if a function is an `__init__`.
crates/ruff_python_semantic/src/analyze/visibility.rs:127
↓ 4 callers
Method
is_int
(self)
crates/ty_python_semantic/src/types/literal.rs:244
↓ 4 callers
Method
is_invalid_syntax
Returns `true` if `self` is a syntax error message.
crates/ruff_db/src/diagnostic/mod.rs:475
↓ 4 callers
Method
is_keyword_only
Returns `true` if this is a keyword-only parameter.
crates/ty_python_semantic/src/types/signatures.rs:6262
↓ 4 callers
Method
is_kw_only_sentinel
Returns true if this field is a `dataclasses.KW_ONLY` sentinel. <https://docs.python.org/3/library/dataclasses.html#dataclasses.KW_ONLY>
crates/ty_python_semantic/src/types/class.rs:2834
↓ 4 callers
Method
is_last_top_level_statement
Returns `true` if this is the last top-level statement in the module.
crates/ruff_python_formatter/src/context.rs:244
↓ 4 callers
Method
is_lazy
Returns `true` if the import laziness is [`Self::Lazy`].
crates/ruff_python_semantic/src/model.rs:2576
↓ 4 callers
Method
is_lint
(self)
crates/ty_python_semantic/src/suppression.rs:601
↓ 4 callers
Method
is_lint_named
Returns `true` if this `DiagnosticId` represents a lint with the given name.
crates/ruff_db/src/diagnostic/mod.rs:1089
↓ 4 callers
Method
is_list_element
(self, p: &Parser)
crates/ruff_python_parser/src/parser/mod.rs:1472
↓ 4 callers
Function
is_lowercase
Return `true` if a string is lowercase. A string is lowercase if all alphabetic characters in the string are lowercase. ## Examples ```rust use ruf
crates/ruff_python_stdlib/src/str.rs:21
↓ 4 callers
Method
is_match
(&self, name: &str)
crates/ty_ide/src/completion.rs:1628
↓ 4 callers
Method
is_match_symbol_name
(&self, symbol_name: &str)
crates/ty_ide/src/symbols.rs:75
↓ 4 callers
Function
is_model
Returns whether `class` is a subclass of Django's `Model`.
crates/ty_python_semantic/src/types/dedicated/django.rs:20
↓ 4 callers
Method
is_module
(self)
crates/ty_python_core/src/scope.rs:269
↓ 4 callers
Method
is_named_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1652
↓ 4 callers
Method
is_nominal_instance
(self)
crates/ty_python_semantic/src/types/instance.rs:137
↓ 4 callers
Function
is_non_exported
( db: &'db dyn Db, declaration: Definition<'db>, requires_explicit_reexport: RequiresExplicitReExp
crates/ty_python_semantic/src/place.rs:2308
↓ 4 callers
Function
is_non_logical_token
Returns `true` if the given `token` is a non-logical token. Unlike [`TokenKind::is_trivia`], this function also considers the indent, dedent and newl
crates/ruff_linter/src/rules/pycodestyle/helpers.rs:12
↓ 4 callers
Method
is_notebook
(&self, file: &UnifiedFile)
crates/ruff_db/src/diagnostic/render.rs:797
↓ 4 callers
Function
is_or_contains_typeddict
Return true if the given type is a `TypedDict` or a union or intersection that includes at least one `TypedDict` (even if other types are also present
crates/ty_python_semantic/src/types/narrow.rs:5563
↓ 4 callers
Method
is_primary
(&self)
crates/ruff_annotate_snippets/src/renderer/render.rs:2493
↓ 4 callers
Function
is_printable
According to python following categories aren't printable: Cc (Other, Control) Cf (Other, Format) Cs (Other, Surrogate) Co (Other, Private Use) Cn (Ot
crates/ruff_python_literal/src/char.rs:12
↓ 4 callers
Method
is_private_declaration
Return `true` if this [`Binding`] represents an private declaration (e.g., `_x` in `_x = "private variable"`)
crates/ruff_python_semantic/src/binding.rs:127
↓ 4 callers
Method
is_property_instance
(&self)
crates/ty_python_semantic/src/types.rs:3250
↓ 4 callers
Method
is_pydantic
(self)
crates/ty_python_semantic/src/types/class.rs:337
↓ 4 callers
Method
is_qualifier_only
(&self)
crates/ty_python_semantic/src/place.rs:905
↓ 4 callers
Function
is_range_reachable
Check whether a diagnostic emitted at `range` is in reachable code, considering both scope reachability and statement-level reachability within the sc
crates/ty_python_semantic/src/reachability.rs:2107
↓ 4 callers
Method
is_range_reachable
Check whether a diagnostic emitted at `range` is in reachable code. This checks both whether the scope itself is reachable and whether the specific s
crates/ty_python_semantic/src/types/context.rs:421
↓ 4 callers
Method
is_raw_string
Does the string have an `r` or `R` prefix?
crates/ruff_python_ast/src/nodes.rs:2498
↓ 4 callers
Method
is_raw_string
Returns `true` if the current f-string is a raw f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:70
↓ 4 callers
Function
is_reachable_implementation_definition
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/ide_support.rs:809
↓ 4 callers
Method
is_reassigned
(&self)
crates/ty_python_core/src/symbol.rs:127
↓ 4 callers
Method
is_recursive_divergent
(&self)
crates/ty_python_semantic/src/types.rs:2479
↓ 4 callers
Method
is_return_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:444
↓ 4 callers
Method
is_root
(&self)
crates/ruff_workspace/src/resolver.rs:786
↓ 4 callers
Method
is_soft_keyword
(self)
crates/ruff_python_ast/src/token.rs:370
← previous
next →
3,301–3,400 of 31,766, ranked by callers