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
↓ 16 callers
Method
as_subscript_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2606
↓ 16 callers
Method
assert_progressing
(&mut self, p: &Parser)
crates/ruff_python_parser/src/parser/progress.rs:35
↓ 16 callers
Method
attach_to
( &self, db: &'db dyn Db, env: &ProgramEnvironment, relation: ErrorRelation,
crates/ty_python_semantic/src/types/relation_error.rs:739
↓ 16 callers
Method
before
Returns a slice of tokens before the given [`TextSize`] offset. If the given offset is between two tokens, the returned slice will end just before th
crates/ruff_python_ast/src/token/tokens.rs:144
↓ 16 callers
Function
catch_unwind
Invokes a closure, capturing and returning the cause of an unwinding panic if one occurs. ### Thread safety This is implemented by installing a cust
crates/ruff_db/src/panic.rs:145
↓ 16 callers
Method
class
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/instance.rs:241
↓ 16 callers
Function
classify
Classify a function based on its scope, name, and decorators.
crates/ruff_python_semantic/src/analyze/function_type.rs:20
↓ 16 callers
Method
content
Returns the source between the role's backtick delimiters. For `` :class:`Model <pkg.Model>` ``, this returns `Model <pkg.Model>`.
crates/ty_ide/src/docstring/document/syntax.rs:203
↓ 16 callers
Method
contents
(&self)
crates/ruff_server/src/edit/text_document.rs:68
↓ 16 callers
Method
current_expressions
Returns an [`Iterator`] over the current expression hierarchy, from the current [`Expr`] through to any parents.
crates/ruff_python_semantic/src/model.rs:1488
↓ 16 callers
Method
element_type
(self, _db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:952
↓ 16 callers
Method
entry
( &mut self, node: &T, content: &dyn Format<PyFormatContext<'ast>>, )
crates/ruff_python_formatter/src/builders.rs:156
↓ 16 callers
Method
err
(self)
crates/ty_site_packages/src/lib.rs:2565
↓ 16 callers
Method
exit
Current exit block, which may change during construction
crates/ruff_python_semantic/src/cfg/graph.rs:282
↓ 16 callers
Method
expression
(&self, expression_key: impl Into<ExpressionNodeKey>)
crates/ty_python_core/src/lib.rs:746
↓ 16 callers
Method
extend
(&mut self, diagnostics: impl IntoIterator<Item = Diagnostic>)
crates/ty_project/src/script.rs:389
↓ 16 callers
Method
file_path
(&self, path: impl AsRef<SystemPath>)
crates/ty_server/tests/e2e/main.rs:856
↓ 16 callers
Method
finish
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:916
↓ 16 callers
Method
first_non_type_parent_scope
Returns the first parent of the given [`Scope`] that is not of [`ScopeKind::Type`] or [`ScopeKind::DunderClassCell`], if any.
crates/ruff_python_semantic/src/model.rs:1571
↓ 16 callers
Method
get_positional
Return positional parameter at given index, or `None` if `index` is out of range. Does not return variadic parameter.
crates/ty_python_semantic/src/types/signatures.rs:5776
↓ 16 callers
Method
has_known_decorator
(self, db: &dyn Db, decorator: FunctionDecorators)
crates/ty_python_semantic/src/types/function.rs:353
↓ 16 callers
Method
header
(&mut self, original: &'a str, modified: &'a str)
crates/ruff_linter/src/source_kind.rs:306
↓ 16 callers
Method
in_string_annotation
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:1054
↓ 16 callers
Method
initialization_result
Get the initialization result
crates/ty_server/tests/e2e/main.rs:848
↓ 16 callers
Function
intersection
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, tys: impl IntoIterator<Item = Type<'db>>, )
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:784
↓ 16 callers
Method
into_iter
(self)
crates/ruff_linter/src/registry/rule_set.rs:332
↓ 16 callers
Method
is_global
Returns `true` if this is the id of the global scope
crates/ruff_python_semantic/src/scope.rs:252
↓ 16 callers
Method
is_variadic
(&self, index: usize)
crates/ty_python_semantic/src/types/call/arguments.rs:693
↓ 16 callers
Method
iter_element_types
( &self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/tuple.rs:2625
↓ 16 callers
Method
iter_flat
Returns an iterator over all `CallableBinding`s, flattening the two-level structure. Note: This loses the union/intersection distinction. The returne
crates/ty_python_semantic/src/types/call/bind.rs:1036
↓ 16 callers
Method
iter_suffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1240
↓ 16 callers
Method
map_bound_or_constraints
Returns an identical type variable with its `TypeVarBoundOrConstraints` mapped by the provided closure.
crates/ty_python_semantic/src/types/typevar.rs:1314
↓ 16 callers
Method
name
The absolute name of the module (e.g. `foo.bar`)
crates/ty_module_resolver/src/module.rs:65
↓ 16 callers
Method
open
Open or create a new cache. `package_root` is the path to root of the package that is contained within this cache and must be canonicalized (to avoid
crates/ruff/src/cache.rs:94
↓ 16 callers
Method
ordered_source_order
Repeating a source-order tree cannot change the first occurrence of any constraint, so combining identical trees must reuse their existing sidecar.
crates/ty_python_semantic/src/types/constraints.rs:1536
↓ 16 callers
Method
program_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:613
↓ 16 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:586
↓ 16 callers
Method
render_diagnostics
(&self, diagnostics: I)
crates/ty_ide/src/lib.rs:456
↓ 16 callers
Method
scope_id
Returns the tracked scope for an ID assigned by this index.
crates/ty_python_core/src/lib.rs:493
↓ 16 callers
Method
search
Returns a sequence of symbols that matches the given query.
crates/ty_ide/src/symbols.rs:153
↓ 16 callers
Method
search_paths
(&self)
crates/ty_module_resolver/src/db.rs:69
↓ 16 callers
Function
setup_uv
Writes the fixture files and creates a watched project with the selected uv mode. Installs project dependencies for `UseUv::On` and synchronizes disco
crates/ty/tests/file_watching.rs:4425
↓ 16 callers
Method
signatures
Iterates over every signature of every callable alternative without merging the alternatives into an overloaded callable.
crates/ty_python_semantic/src/types/callable.rs:1150
↓ 16 callers
Method
site_packages
Add a file to site-packages (simulating a third-party dependency). The path should be relative to site-packages root (e.g., "numpy/__init__.py").
crates/ty_ide/src/lib.rs:743
↓ 16 callers
Method
to_text_size
( &self, db: &dyn Db, file: File, uri: &lsp_types::Uri, encoding: Posi
crates/ty_server/src/document/range.rs:143
↓ 16 callers
Method
to_type_identity
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/cyclic.rs:57
↓ 16 callers
Method
types
(&self)
crates/ty_python_semantic/src/types/constraints/variables.rs:172
↓ 16 callers
Method
values
(&self)
crates/ruff_python_index/src/interpolated_string_ranges.rs:70
↓ 16 callers
Method
with_extra_file
(&mut self, file_name: &str, content: &str)
crates/ty_ide/src/inlay_hints.rs:1327
↓ 16 callers
Method
write
Write the notebook back to the given [`Write`] implementer.
crates/ruff_notebook/src/notebook.rs:477
↓ 16 callers
Method
write
Write the transformed source file to the given writer. For Jupyter notebooks, this will write out the notebook as JSON.
crates/ruff_linter/src/source_kind.rs:161
↓ 16 callers
Method
write_char
( ch: char, quote: Quote, force_escape: bool, formatter: &mut impl std::fmt::W
crates/ruff_python_literal/src/escape.rs:404
↓ 16 callers
Method
write_file
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`.
crates/ruff_db/src/system/memory_fs.rs:192
↓ 15 callers
Method
as_i64
(self)
crates/ty_python_semantic/src/types/literal.rs:315
↓ 15 callers
Method
as_literal_value_kind
(self)
crates/ty_python_semantic/src/types.rs:3222
↓ 15 callers
Function
assert_ok
(result: &Result<Vec<Diagnostic>, FailuresByLine>)
crates/mdtest/src/matcher.rs:627
↓ 15 callers
Method
atomic_constraint_data
(&self, constraint: AtomicConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1485
↓ 15 callers
Method
await_diagnostic_refresh
Wait for and acknowledge a server-requested diagnostic refresh.
crates/ty_server/tests/e2e/main.rs:612
↓ 15 callers
Method
bool
Determine whether instances of this class are always truthy, always falsy, or have an ambiguous truthiness. Returns `None` for `KnownClass::Tuple`, s
crates/ty_python_semantic/src/types/class/known.rs:324
↓ 15 callers
Method
bottom_materialization
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:2950
↓ 15 callers
Method
build
(self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1394
↓ 15 callers
Method
checked_add
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:100
↓ 15 callers
Method
clear_salsa_events
Clears the salsa events. ## Panics If there are any pending salsa snapshots.
crates/ty_python_semantic/src/db.rs:129
↓ 15 callers
Method
cmp
(&self, rhs: &CompletionRanker<'_>)
crates/ty_ide/src/completion.rs:3398
↓ 15 callers
Method
entry
( &'a mut self, members: &IndexVec<ScopedMemberId, Member>, member: &Member, )
crates/ty_python_core/src/member.rs:512
↓ 15 callers
Method
env
Sets an environment variable for the command.
crates/ruff_db/src/system/command.rs:55
↓ 15 callers
Method
expect_place
(&self, place_expr: &PlaceExpr)
crates/ty_python_semantic/src/types/narrow.rs:3551
↓ 15 callers
Method
explicit_bases
Returns all of the explicit base class types for this class. Note that when this is a namedtuple this always returns a sequence of length one corresp
crates/ty_python_semantic/src/types/class.rs:1123
↓ 15 callers
Function
f
()
crates/ruff_linter/resources/test/fixtures/ruff/noqa.py:1
↓ 15 callers
Function
find_goto_target
( model: &'a SemanticModel, parsed: &'a ParsedModuleRef, offset: TextSize, )
crates/ty_ide/src/goto.rs:1433
↓ 15 callers
Method
fmt
(&self, item: &Stmt, f: &mut PyFormatter)
crates/ruff_python_formatter/src/statement/mod.rs:40
↓ 15 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF026.py:6
↓ 15 callers
Method
get
(&self)
crates/ty_project/src/files.rs:45
↓ 15 callers
Method
getFileHandleForModel
(model: editor.ITextModel)
playground/ty/src/Editor/Editor.tsx:535
↓ 15 callers
Method
get_all
Like [`Scope::get`], but returns all bindings with the given name, including those that were shadowed by later bindings.
crates/ruff_python_semantic/src/scope.rs:109
↓ 15 callers
Method
get_or_import_builtin_symbol
For a given builtin symbol, determine whether an [`Edit`] is necessary to make the symbol available in the current scope. For example, if `zip` has be
crates/ruff_linter/src/importer/mod.rs:306
↓ 15 callers
Method
homogeneous_element_type
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/tuple.rs:2587
↓ 15 callers
Function
import_from
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:53
↓ 15 callers
Method
infer_maybe_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6693
↓ 15 callers
Method
into_protocol_class
Returns the protocol class if this is a protocol.
crates/ty_python_semantic/src/types/class.rs:1035
↓ 15 callers
Method
into_type
(self)
crates/ty_python_semantic/src/types/recursive.rs:707
↓ 15 callers
Method
is_async
(self)
crates/ty_python_core/src/lib.rs:1127
↓ 15 callers
Method
is_typed_dict
Return `true` if this class constitutes a typed dict specification (inherits from `typing.TypedDict` or `typing_extensions.TypedDict`, either directly
crates/ty_python_semantic/src/types/class/static_literal.rs:1119
↓ 15 callers
Method
iter
(&self)
crates/mdtest/src/matcher.rs:34
↓ 15 callers
Method
iter_mut
(&mut self)
crates/ruff_index/src/slice.rs:89
↓ 15 callers
Method
kind
Return the display kind of the function-like node.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:190
↓ 15 callers
Function
known_instance
(db: &TestDb, class: KnownClass)
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:35
↓ 15 callers
Method
map_type
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/member.rs:51
↓ 15 callers
Method
name
Returns the public name that pytest uses to request this exposure.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:761
↓ 15 callers
Method
negate_if
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, yes: bool)
crates/ty_python_semantic/src/types.rs:3517
↓ 15 callers
Method
next
(&mut self)
crates/ruff_python_formatter/src/string/normalize.rs:787
↓ 15 callers
Method
or
Merge the provenance from two places.
crates/ty_python_semantic/src/place.rs:130
↓ 15 callers
Method
path
(&'a self, resolver: &'a dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1182
↓ 15 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/db.rs:107
↓ 15 callers
Function
quit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:9
↓ 15 callers
Function
remove_file
()
crates/ruff_db/src/system/memory_fs.rs:971
↓ 15 callers
Method
replace_deferred_state
Temporarily changes lookup behavior without discarding the current string annotation. Parsed string nodes do not belong to the module's semantic inde
crates/ty_python_semantic/src/types/infer/builder.rs:1062
↓ 15 callers
Function
resolve
Resolve the relevant settings strategy and defaults for the current invocation.
crates/ruff/src/resolve.rs:20
↓ 15 callers
Method
self_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/method.rs:72
↓ 15 callers
Method
set_env_var
Sets an environment variable override. This takes precedence over the inner system.
crates/ruff_db/src/system/test.rs:54
← previous
next →
1,001–1,100 of 31,562, ranked by callers