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
↓ 21 callers
Method
line_column
(&self, offset: TextSize)
crates/ruff_source_file/src/lib.rs:39
↓ 21 callers
Method
or
(self, other: Self)
crates/ty_python_core/src/lib.rs:1082
↓ 21 callers
Method
parse
Parses the content and returns its AST
crates/ruff_wasm/src/lib.rs:506
↓ 21 callers
Function
parse_suite
(source: &str)
crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs:197
↓ 21 callers
Method
preceding_node
Returns the comment's preceding node. The direct child node (ignoring lists) of the [`enclosing_node`](DecoratedComment::enclosing_node) that precede
crates/ruff_python_formatter/src/comments/visitor.rs:255
↓ 21 callers
Method
predicates
(&self)
crates/ty_python_core/src/use_def.rs:1059
↓ 21 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/generics.rs:805
↓ 21 callers
Method
push
(&mut self, value: T)
crates/ruff_formatter/src/printer/stack.rs:18
↓ 21 callers
Method
push
Pushes the given line as part of this code example.
crates/ruff_python_formatter/src/string/docstring.rs:1235
↓ 21 callers
Method
remove_file
(self, db: &mut dyn Db, file: File)
crates/ty_project/src/lib.rs:686
↓ 21 callers
Method
report_diagnostic
( &self, context: &CallDiagnosticContext<'_, '_, 'db, '_>, node: ast::AnyNodeRef,
crates/ty_python_semantic/src/types/call/bind.rs:10461
↓ 21 callers
Method
search_path
(&self)
crates/ty_module_resolver/src/path.rs:67
↓ 21 callers
Method
solutions
Computes default solutions for each BDD path within the default projection budget. Constraints on non-inferable typevars are not necessarily retained
crates/ty_python_semantic/src/types/constraints/projection.rs:117
↓ 21 callers
Method
sum
(iter: I)
crates/ruff_text_size/src/size.rs:216
↓ 21 callers
Method
to_notebook_or_file
Returns the database file for this document, or its containing notebook for a cell. Returns [`None`] if the file cannot be resolved.
crates/ty_server/src/session.rs:1598
↓ 21 callers
Method
tokens
Returns all the tokens for the parsed output.
crates/ruff_python_parser/src/lib.rs:409
↓ 21 callers
Method
uv_environments
(&self)
crates/ty_project/src/db.rs:709
↓ 21 callers
Method
workspace_diagnostic_request
Send a `workspace/diagnostic` request with optional previous result IDs.
crates/ty_server/tests/e2e/main.rs:1054
↓ 20 callers
Method
body
Return the body of the function-like node. If the node is a function definition that consists of more than a single return statement, returns `None`.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:179
↓ 20 callers
Method
build
(db: &'db dyn Db, input: OrderedUnionInput<'db>)
crates/ty_python_semantic/src/types/set_theoretic.rs:58
↓ 20 callers
Method
change_text_document
Send a `textDocument/didChange` notification with the given content changes
crates/ty_server/tests/e2e/main.rs:909
↓ 20 callers
Function
contains_effect
Return `true` if the `Expr` contains an expression that appears to include a side-effect (like a function call). Accepts a closure that determines wh
crates/ruff_python_ast/src/helpers.rs:220
↓ 20 callers
Method
cover
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:249
↓ 20 callers
Method
db
(&self)
crates/ty/tests/file_watching.rs:73
↓ 20 callers
Function
default_lint_registry
Returns the default registry with all known semantic lints.
crates/ty_python_semantic/src/lib.rs:81
↓ 20 callers
Method
display
( self, db: &'db dyn Db, env: &'env ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/display.rs:737
↓ 20 callers
Method
find_positional
Return the positional argument at the given index, or `None` if no such argument exists.
crates/ruff_python_ast/src/nodes.rs:3759
↓ 20 callers
Method
finish
(self)
crates/ty_python_core/src/place.rs:464
↓ 20 callers
Method
fmt
(&self, expression: &Expr, f: &mut PyFormatter)
crates/ruff_python_formatter/src/expression/mod.rs:76
↓ 20 callers
Method
focus_range
Returns the [`FileRange`] of the function's name.
crates/ty_python_semantic/src/types/function.rs:442
↓ 20 callers
Function
indentation
( logical_line: &LogicalLine, prev_logical_line: Option<&LogicalLine>, indent_char: char, inde
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/indentation.rs:270
↓ 20 callers
Function
infer_expression_types
Infer all types for an [`Expression`] (including sub-expressions). Use rarely; only for cases where we'd otherwise risk double-inferring an expression
crates/ty_python_semantic/src/types/infer.rs:579
↓ 20 callers
Method
insert
(mut self, insert: impl Into<CompactString>)
crates/ty_ide/src/completion.rs:584
↓ 20 callers
Method
is_always_true
(self)
crates/ty_python_core/src/lib.rs:1013
↓ 20 callers
Method
is_empty
Returns `true` if there are no fixes in the map.
crates/ruff/src/diagnostics.rs:136
↓ 20 callers
Method
is_empty
(&self, snapshot: &ScratchSnapshot)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:29
↓ 20 callers
Method
is_language_services_disabled
(&self)
crates/ty_server/src/session/settings.rs:51
↓ 20 callers
Method
iter
Returns an iterator over the fixes in the map, along with the file path.
crates/ruff/src/diagnostics.rs:141
↓ 20 callers
Method
len
(&self)
crates/ruff_db/src/parsed.rs:541
↓ 20 callers
Method
minimum
Returns the minimum length of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:65
↓ 20 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:343
↓ 20 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:790
↓ 20 callers
Method
primary
Add a primary annotation with a message. If the message is empty, then an annotation without any message be created. See the docs on `TestEnvironmen
crates/ruff_db/src/diagnostic/render.rs:2779
↓ 20 callers
Method
provenance
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:469
↓ 20 callers
Method
push
Pushes a new [`Binding`] and returns its [`BindingId`].
crates/ruff_python_semantic/src/binding.rs:474
↓ 20 callers
Method
qualified_name
Returns the [`QualifiedName`] of the imported name (e.g., given `from foo import bar as baz`, returns `["foo", "bar"]`).
crates/ruff_python_semantic/src/imports.rs:60
↓ 20 callers
Method
range
Returns the [`TextRange`] for the diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:504
↓ 20 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:487
↓ 20 callers
Method
reachability_constraints
(&self)
crates/ty_python_core/src/use_def.rs:1055
↓ 20 callers
Function
remove_argument
Generic function to remove arguments or keyword arguments in function calls and class definitions. (For classes, `args` should be considered `bases`.)
crates/ruff_linter/src/fix/edits.rs:208
↓ 20 callers
Method
settings
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:950
↓ 20 callers
Method
system
(&self)
crates/ty_project/src/db.rs:680
↓ 20 callers
Method
system
Returns the system wrapped by this test system.
crates/ruff_db/src/system/test.rs:106
↓ 20 callers
Method
to_str
(&self, db: &'a dyn Db)
crates/ty_module_resolver/src/resolve.rs:1377
↓ 20 callers
Method
trailing
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:326
↓ 20 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:8352
↓ 20 callers
Method
tuple
(tuple: TupleType<'db>)
crates/ty_python_semantic/src/types/instance.rs:98
↓ 20 callers
Method
tuple_instance_spec
If this type 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
crates/ty_python_semantic/src/types.rs:3008
↓ 20 callers
Method
type_argument
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:13032
↓ 20 callers
Method
vendored
(&self)
crates/ty_module_resolver/src/resolve.rs:1864
↓ 19 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:1568
↓ 19 callers
Method
ancestor_ids
Returns an iterator over all [`NodeId`] ancestors, starting from the given [`NodeId`].
crates/ruff_python_semantic/src/nodes.rs:63
↓ 19 callers
Method
as_nominal_instance
(self)
crates/ty_python_semantic/src/types/instance.rs:141
↓ 19 callers
Method
as_slice
Returns a slice of all the [`TString`]s contained in this value.
crates/ruff_python_ast/src/nodes.rs:887
↓ 19 callers
Method
as_str
The code that is ignored by the `noqa` directive.
crates/ruff_linter/src/noqa.rs:103
↓ 19 callers
Method
as_str
(&self)
crates/ruff_linter/src/rules/ruff/rules/unused_noqa.rs:22
↓ 19 callers
Function
bool
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM210.py:12
↓ 19 callers
Method
bump
(&mut self)
crates/ruff_python_trivia/src/cursor.rs:94
↓ 19 callers
Method
close
Closes the virtual file.
crates/ruff_db/src/files.rs:631
↓ 19 callers
Function
create_diagnostics
Create Ruff-style diagnostics for testing the various output formats.
crates/ruff_db/src/diagnostic/render.rs:2939
↓ 19 callers
Method
current_statements
Returns an [`Iterator`] over the current statement hierarchy, from the current [`Stmt`] through to any parents.
crates/ruff_python_semantic/src/model.rs:1467
↓ 19 callers
Method
display_with
( self, db: &'db dyn Db, env: &'env ProgramEnvironment<'db>, settings: Display
crates/ty_python_semantic/src/types/display.rs:750
↓ 19 callers
Method
eat_char
(&mut self, c: char)
crates/ruff_python_trivia/src/cursor.rs:104
↓ 19 callers
Method
exactly_one
(&self)
crates/ty_python_semantic/src/types/callable.rs:1133
↓ 19 callers
Method
extend
Extend `self` with the components of `other` # Examples ``` use ty_module_resolver::ModuleName; let mut module_name = ModuleName::new_static("foo")
crates/ty_module_resolver/src/module_name.rs:280
↓ 19 callers
Method
finish
(self)
crates/ruff_python_formatter/src/comments/visitor.rs:613
↓ 19 callers
Method
following_node
Returns the node following the comment. The direct child node (ignoring lists) of the [`enclosing_node`](DecoratedComment::enclosing_node) that follo
crates/ruff_python_formatter/src/comments/visitor.rs:313
↓ 19 callers
Method
is_empty
(&self)
crates/ruff_annotate_snippets/src/snippet.rs:95
↓ 19 callers
Method
is_global
(self)
crates/ty_python_core/src/scope.rs:108
↓ 19 callers
Method
is_inferable
(self, db: &'db dyn Db, inferable: TypeVarSet<'db>)
crates/ty_python_semantic/src/types/typevar.rs:1984
↓ 19 callers
Method
is_keyword_variadic
Returns `true` if this is a keyword-variadic parameter.
crates/ty_python_semantic/src/types/signatures.rs:6374
↓ 19 callers
Function
is_overload
Returns `true` if a function definition is an `@overload`.
crates/ruff_python_semantic/src/analyze/visibility.rs:30
↓ 19 callers
Method
iter
(&self)
crates/ruff_unicode_names2_generator/src/trie.rs:60
↓ 19 callers
Method
kind
Returns the collection mechanism responsible for this test.
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:152
↓ 19 callers
Method
matches
Returns `true` if the given name matches any of the ignored patterns.
crates/ruff_linter/src/rules/pep8_naming/settings.rs:140
↓ 19 callers
Function
metadata
()
crates/ty_project/src/uv/metadata/dependencies.rs:361
↓ 19 callers
Method
name
(self, db: &'db dyn Db, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/scope.rs:71
↓ 19 callers
Function
original_class_type
Return the original class literal for a class definition. For decorated classes, this is the class object before applying decorators. The public bind
crates/ty_python_semantic/src/types/infer.rs:951
↓ 19 callers
Method
overloads_and_implementation
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/function.rs:928
↓ 19 callers
Function
parse_suite
(source: &str)
crates/ruff_linter/src/rules/pylint/helpers.rs:414
↓ 19 callers
Method
path
Returns the directory's path without permitting it to change.
crates/ty_module_resolver/src/path.rs:383
↓ 19 callers
Function
process
(__debug__)
crates/ruff_linter/resources/test/fixtures/semantic_errors/write_to_debug.py:3
↓ 19 callers
Method
program_file
(self, db: &'db dyn Db, file: File)
crates/ty_python_core/src/program.rs:51
↓ 19 callers
Method
program_file
(&self)
crates/ty_python_semantic/src/semantic_model.rs:78
↓ 19 callers
Method
record_constraint_set
Records one relation in the call-wide constraint set. Generic unsatisfiability is retained in `pending` rather than reported as a misleading type-var
crates/ty_python_semantic/src/types/generics.rs:3686
↓ 19 callers
Method
remove
(&mut self, name: impl Into<String>)
crates/ruff_db/src/system/command.rs:135
↓ 19 callers
Function
render_docstring
(raw: &str)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:834
↓ 19 callers
Method
seen_typing
(&self)
crates/ruff_python_semantic/src/model.rs:1717
↓ 19 callers
Method
status
(&self)
crates/ty_python_semantic/src/lint.rs:134
↓ 19 callers
Method
stmt
Generate source code from a [`Stmt`].
crates/ruff_python_codegen/src/generator.rs:140
← previous
next →
801–900 of 31,562, ranked by callers