Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
28,410 in github.com/astral-sh/ruff
⨍
Functions
28,410
◇
Types & classes
6,658
↳
Endpoints
82
↓ 17 callers
Method
focus_range
Returns the [`FileRange`] of the function's name.
crates/ty_python_semantic/src/types/function.rs:413
↓ 17 callers
Method
format
(&self)
crates/ruff_python_formatter/src/generated.rs:24
↓ 17 callers
Method
format
Whether to enable concise diagnostic output or not.
crates/ruff_db/src/diagnostic/mod.rs:1485
↓ 17 callers
Method
get
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:415
↓ 17 callers
Method
in_range
Initialize [`NoqaLexer`] in the given range of source text.
crates/ruff_linter/src/noqa.rs:425
↓ 17 callers
Method
into_iter
(self)
crates/ruff_linter/src/registry/rule_set.rs:337
↓ 17 callers
Method
is_ellipsis_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2503
↓ 17 callers
Method
is_eof
(self)
crates/ruff_python_ast/src/token.rs:327
↓ 17 callers
Method
is_keyword_variadic
Returns `true` if this is a keyword-variadic parameter.
crates/ty_python_semantic/src/types/signatures.rs:5064
↓ 17 callers
Method
len
Returns the number of rules in this set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; assert_eq!(RuleSet::empty().len(), 0); as
crates/ruff_linter/src/registry/rule_set.rs:181
↓ 17 callers
Method
node
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1445
↓ 17 callers
Method
node_level
(&self)
crates/ruff_python_formatter/src/context.rs:65
↓ 17 callers
Method
paramspec_attr
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:935
↓ 17 callers
Method
place_id
Returns the [`ScopedPlaceId`] of the place expression.
crates/ty_python_core/src/place.rs:247
↓ 17 callers
Method
prefix
Return the prefix for the [`NoqaCode`], e.g., `SIM` for `SIM101`.
crates/ruff_linter/src/codes.rs:19
↓ 17 callers
Method
remove_file
(self, db: &mut dyn Db, file: File)
crates/ty_project/src/lib.rs:520
↓ 17 callers
Function
rename
Perform a rename operation on the symbol at the given position. Returns all locations that need to be updated with the new name.
crates/ty_ide/src/rename.rs:51
↓ 17 callers
Method
return_type
Compute the overall effective return type of this `ConstructorBinding`.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:210
↓ 17 callers
Method
search
Returns a sequence of symbols that matches the given query.
crates/ty_ide/src/symbols.rs:152
↓ 17 callers
Method
shrink_to_fit
(&mut self)
crates/ty_python_semantic/src/types/diagnostic.rs:1341
↓ 17 callers
Function
site_packages_directories_from_sys_prefix
Attempt to retrieve the `site-packages` directories associated with a given Python installation. The location of the `site-packages` directories can
crates/ty_site_packages/src/lib.rs:1612
↓ 17 callers
Method
snapshot
(&self)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:38
↓ 17 callers
Method
specialization
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:5313
↓ 17 callers
Method
term_width
Set the width to render within Affects the rendering of [`Snippet`][crate::Snippet]s
crates/ruff_annotate_snippets/src/renderer/mod.rs:170
↓ 17 callers
Method
to_str
(&self, db: &'a dyn Db)
crates/ty_module_resolver/src/resolve.rs:1232
↓ 17 callers
Method
trim_whitespace
(&self)
crates/ruff_python_trivia/src/whitespace.rs:113
↓ 17 callers
Method
truncate
(&mut self, a: usize)
crates/ruff_index/src/vec.rs:47
↓ 17 callers
Method
try_call
Calls `self`. Returns a [`CallError`] if `self` is (always or possibly) not callable, or if the arguments are not compatible with the formal parameter
crates/ty_python_semantic/src/types.rs:5527
↓ 17 callers
Method
type_argument
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:8989
↓ 17 callers
Method
values
Returns an iterator over the fixes in the map.
crates/ruff/src/diagnostics.rs:146
↓ 17 callers
Method
visit_body
(&mut self, body: &'db [ast::Stmt])
crates/ty_ide/src/symbols.rs:817
↓ 17 callers
Method
with_failure_code
(self, code: server::ErrorCode)
crates/ruff_server/src/server/api.rs:383
↓ 16 callers
Method
add_binding
Add a binding for the given definition. Returns the result of the `infer_value_ty` closure, which is called with the declared type as type context.
crates/ty_python_semantic/src/types/infer/builder.rs:1371
↓ 16 callers
Method
add_python_cell
(&mut self, content: &str)
crates/ty_server/tests/e2e/notebook.rs:596
↓ 16 callers
Method
all
Returns all supported semantic token types as enum variants.
crates/ty_ide/src/semantic_tokens.rs:77
↓ 16 callers
Method
as_code
Access the resulting code, borrowing the result
crates/ruff_formatter/src/lib.rs:414
↓ 16 callers
Method
as_function_def
Return the [`ast::StmtFunctionDef`] of the definition, if it's a function definition.
crates/ruff_python_semantic/src/definition.rs:174
↓ 16 callers
Method
as_function_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:399
↓ 16 callers
Method
as_subscript_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2606
↓ 16 callers
Method
as_system
(&self)
crates/ty_test/src/db.rs:383
↓ 16 callers
Method
assert_progressing
(&mut self, p: &Parser)
crates/ruff_python_parser/src/parser/progress.rs:35
↓ 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
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:1487
↓ 16 callers
Method
db
Returns the underlying test DB.
crates/ty_ide/src/completion.rs:10800
↓ 16 callers
Method
exactly_one
(self)
crates/ty_python_semantic/src/types/callable.rs:705
↓ 16 callers
Method
initialization_result
Get the initialization result
crates/ty_server/tests/e2e/main.rs:767
↓ 16 callers
Method
into_owned
(self)
crates/ruff_python_codegen/src/stylist.rs:37
↓ 16 callers
Method
is_disjoint_from
Return true if `self & other` should simplify to `Never`: if the intersection of the two types could never be inhabited by any possible runtime value.
crates/ty_python_semantic/src/types/relation.rs:693
↓ 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_global
(self)
crates/ty_python_core/src/scope.rs:96
↓ 16 callers
Method
is_literal_expr
Returns `true` if the expression is a literal expression. A literal expression is either a string literal, bytes literal, integer, float, complex num
crates/ruff_python_ast/src/nodes.rs:63
↓ 16 callers
Method
is_typevartuple
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:229
↓ 16 callers
Function
place_from_bindings
Infer the combined type from an iterator of bindings, and return it together with boundness information in a [`Place`]. The type will be a union if t
crates/ty_python_semantic/src/place.rs:670
↓ 16 callers
Method
position
(&self)
crates/ruff_linter/src/noqa.rs:695
↓ 16 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:585
↓ 16 callers
Method
resolve
Resolves a stored property accessor to the value type exposed by that access.
crates/ty_python_semantic/src/types/protocol_class.rs:1114
↓ 16 callers
Method
reverse
(self)
crates/ruff_linter/src/rules/refurb/rules/if_expr_min_max.rs:173
↓ 16 callers
Method
set
Set the value of the `AtomicNodeIndex`.
crates/ruff_python_ast/src/node_index.rs:177
↓ 16 callers
Method
set_fix
Set the fix for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:368
↓ 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:133
↓ 16 callers
Method
tuple_spec
If this is an instance type where the class has a tuple spec, returns the tuple spec. I.e., for the type `tuple[int, str]`, this will return the tupl
crates/ty_python_semantic/src/types/instance.rs:278
↓ 16 callers
Method
values
(&self)
crates/ruff_python_index/src/interpolated_string_ranges.rs:70
↓ 16 callers
Method
with_qualifiers
(self, qualifiers: TypeQualifiers)
crates/ty_python_semantic/src/place.rs:325
↓ 16 callers
Method
write_char
( ch: char, quote: Quote, formatter: &mut impl std::fmt::Write, )
crates/ruff_python_literal/src/escape.rs:178
↓ 15 callers
Method
as_function_literal
(self)
crates/ty_python_semantic/src/types.rs:1783
↓ 15 callers
Method
as_i64
(self)
crates/ty_python_semantic/src/types/literal.rs:308
↓ 15 callers
Method
as_str
The code that is ignored by the `noqa` directive.
crates/ruff_linter/src/noqa.rs:102
↓ 15 callers
Method
as_typevar
(self)
crates/ty_python_semantic/src/types/typevar.rs:36
↓ 15 callers
Method
as_u32
(self)
crates/ty_python_core/src/reachability_constraints.rs:107
↓ 15 callers
Function
assert_ok
(result: &Result<Vec<Diagnostic>, FailuresByLine>)
crates/mdtest/src/matcher.rs:623
↓ 15 callers
Method
concise_message
Introspects this diagnostic and returns its message for concise formatting. When we concisely format diagnostics, we likely want to not only include
crates/ruff_db/src/diagnostic/mod.rs:236
↓ 15 callers
Function
default_lint_registry
Returns the default registry with all known semantic lints.
crates/ty_python_semantic/src/lib.rs:73
↓ 15 callers
Method
definition
(&self)
crates/ty_python_semantic/src/types/ide_support.rs:2062
↓ 15 callers
Method
display_with
(self, db: &'db dyn Db, settings: DisplaySettings<'db>)
crates/ty_python_semantic/src/types/display.rs:611
↓ 15 callers
Method
entry
( &mut self, node: &T, content: &dyn Format<PyFormatContext<'ast>>, )
crates/ruff_python_formatter/src/builders.rs:154
↓ 15 callers
Method
exit
Current exit block, which may change during construction
crates/ruff_python_semantic/src/cfg/graph.rs:282
↓ 15 callers
Method
expect_type
(self)
crates/ty_python_semantic/src/place.rs:294
↓ 15 callers
Function
find_goto_target
( model: &'a SemanticModel, parsed: &'a ParsedModuleRef, offset: TextSize, )
crates/ty_ide/src/goto.rs:1392
↓ 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
getFileHandleForModel
(model: editor.ITextModel)
playground/ty/src/Editor/Editor.tsx:521
↓ 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
homogeneous_element_type
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:2301
↓ 15 callers
Method
infer_maybe_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:5932
↓ 15 callers
Method
intersect
Return a new tuple-spec builder that reflects the intersection of this tuple and another tuple, or `None` if the intersection is impossible (e.g., two
crates/ty_python_semantic/src/types/tuple.rs:2900
↓ 15 callers
Method
is_empty
(&self)
crates/ty_python_core/src/rank.rs:73
↓ 15 callers
Method
is_file
(self)
crates/ty_project/src/watch.rs:162
↓ 15 callers
Method
iter
(&self)
crates/mdtest/src/matcher.rs:32
↓ 15 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:522
↓ 15 callers
Method
iter_positive
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1084
↓ 15 callers
Method
iter_suffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1095
↓ 15 callers
Method
kind
(&self)
crates/ty_python_core/src/scope.rs:147
↓ 15 callers
Method
kind
Return the display kind of the function-like node.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:189
↓ 15 callers
Method
lower
(cls, my_field: str)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N805.py:30
↓ 15 callers
Method
name
(&self)
crates/ty_python_semantic/src/lint.rs:94
↓ 15 callers
Method
next
(&mut self)
crates/ruff_python_formatter/src/string/normalize.rs:787
↓ 15 callers
Method
or
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:453
↓ 15 callers
Function
place_from_declarations
Build a declared type from a [`DeclarationsIterator`]. If there is only one declaration, or all declarations declare the same type, returns `Ok(..)`.
crates/ty_python_semantic/src/place.rs:703
↓ 15 callers
Function
quit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:9
← previous
next →
801–900 of 28,410, ranked by callers