Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
28,707 in github.com/astral-sh/ruff
⨍
Functions
28,707
◇
Types & classes
6,694
↳
Endpoints
82
↓ 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:304
↓ 15 callers
Function
find_goto_target
( model: &'a SemanticModel, parsed: &'a ParsedModuleRef, offset: TextSize, )
crates/ty_ide/src/goto.rs:1398
↓ 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, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/tuple.rs:2405
↓ 15 callers
Method
infer_maybe_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6170
↓ 15 callers
Method
into_iter
(self)
crates/ty_project/src/lib.rs:786
↓ 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:34
↓ 15 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:586
↓ 15 callers
Method
iter_positive
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1190
↓ 15 callers
Method
iter_suffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1153
↓ 15 callers
Method
kind
(&self)
crates/ty_python_core/src/scope.rs:159
↓ 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
Returns the base symbol name for this group. Callers must ensure that all symbols in this group have the same base name. This returns `None` if and
crates/ty_ide/src/all_symbols.rs:521
↓ 15 callers
Method
next
(&mut self)
crates/ruff_python_formatter/src/string/normalize.rs:787
↓ 15 callers
Method
node_index
Returns the anchor node index for this scope, or `None` for the module scope. This is used to compute relative node indices for expressions within th
crates/ty_python_core/src/scope.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:824
↓ 15 callers
Method
predicates
(&self)
crates/ty_python_core/src/use_def.rs:872
↓ 15 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/db.rs:103
↓ 15 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:164
↓ 15 callers
Function
quit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:9
↓ 15 callers
Method
reachability_constraints
(&self)
crates/ty_python_core/src/use_def.rs:868
↓ 15 callers
Method
recursively_defined
(mut self, val: RecursivelyDefined)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:659
↓ 15 callers
Method
render_diagnostics
(&self, diagnostics: I)
crates/ty_ide/src/lib.rs:455
↓ 15 callers
Method
resolver_file
Returns the resolver key for this file.
crates/ty_python_core/src/program_file.rs:85
↓ 15 callers
Method
search_path
(&self)
crates/ty_module_resolver/src/path.rs:86
↓ 15 callers
Method
settings
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:817
↓ 15 callers
Method
source_type
(&self)
crates/ruff_python_formatter/src/options.rs:131
↓ 15 callers
Method
text_len
(&self)
crates/ruff_source_file/src/newlines.rs:333
↓ 15 callers
Method
to_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:7003
↓ 15 callers
Method
tokens
Returns the [`Tokens`] for the parsed type annotation if the checker is in a typing context or the parsed source code.
crates/ruff_linter/src/checkers/ast/mod.rs:480
↓ 15 callers
Function
trace_source_order_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/source_order.rs:158
↓ 15 callers
Function
trace_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:167
↓ 15 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:1981
↓ 15 callers
Method
visit_expr
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:33
↓ 15 callers
Method
visit_expr
(&self, expr: &mut Expr)
crates/ruff_python_ast/src/visitor/transformer.rs:20
↓ 15 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
↓ 14 callers
Method
add
Adds a member to the table or updates the flags of an existing member if it already exists. Members are identified by their expression, which is hash
crates/ty_python_core/src/member.rs:622
↓ 14 callers
Method
add_negative
(mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1347
↓ 14 callers
Method
annotation
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1459
↓ 14 callers
Function
any_qualified_base_class
Return `true` if any base class matches a [`QualifiedName`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:16
↓ 14 callers
Method
as_slice
Returns a slice containing the remaining comments.
crates/ruff_python_formatter/src/verbatim.rs:568
↓ 14 callers
Method
as_source_code
Returns this input as a `SourceCode` for convenient querying.
crates/ruff_db/src/diagnostic/mod.rs:1223
↓ 14 callers
Method
as_str
(&self)
crates/ruff_source_file/src/newlines.rs:258
↓ 14 callers
Method
as_str
(self)
crates/ruff_linter/src/docstrings/mod.rs:99
↓ 14 callers
Method
as_system_path
(&self)
crates/ty_module_resolver/src/path.rs:710
↓ 14 callers
Function
assert_include
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:360
↓ 14 callers
Method
binding
(&self)
crates/ty_python_core/src/use_def/place_state.rs:324
↓ 14 callers
Method
checked_add
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:100
↓ 14 callers
Method
class_specialization
If this type is a class instance or class-backed `TypedDict`, returns its specialization.
crates/ty_python_semantic/src/types.rs:1889
↓ 14 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
↓ 14 callers
Method
cover
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:249
↓ 14 callers
Method
current_scopes
Returns an iterator over all scopes, starting from the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1549
↓ 14 callers
Method
definitions
Gets the definitions for this goto target. The `alias_resolution` parameter controls whether import aliases (i.e. "x" in "from a import b as x") are
crates/ty_ide/src/goto.rs:614
↓ 14 callers
Method
display_with
( self, db: &'db dyn Db, env: &'env ProgramEnvironment<'db>, settings: Display
crates/ty_python_semantic/src/types/display.rs:655
↓ 14 callers
Method
end_of_scope_symbol_declarations
( &'map self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1103
↓ 14 callers
Method
expect_place
(&self, place_expr: &PlaceExpr)
crates/ty_python_semantic/src/types/narrow.rs:3219
↓ 14 callers
Method
extension
(&self)
crates/ruff_db/src/files/path.rs:96
↓ 14 callers
Function
f
()
crates/ruff_linter/resources/test/fixtures/ruff/noqa.py:1
↓ 14 callers
Method
first
Peeks the next character from the input stream without consuming it. Returns [`EOF_CHAR`] if the position is past the end of the file.
crates/ruff_python_parser/src/lexer/cursor.rs:42
↓ 14 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:1570
↓ 14 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/pylint/unreachable.py:13
↓ 14 callers
Method
format
(&self)
crates/ruff_python_formatter/src/expression/mod.rs:496
↓ 14 callers
Method
format
(&self, file_id: &FileHandle)
crates/ty_wasm/src/lib.rs:306
↓ 14 callers
Method
get
(&self, document_path: &Path)
crates/ruff_server/src/session/index/ruff_settings.rs:391
↓ 14 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:302
↓ 14 callers
Function
hard_line_break
()
crates/ruff_formatter/src/builders.rs:101
↓ 14 callers
Method
has_trailing
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:321
↓ 14 callers
Method
ignore_conflicting_declarations
(self)
crates/ty_python_semantic/src/place.rs:875
↓ 14 callers
Function
import_from
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:52
↓ 14 callers
Method
in_range
Returns a slice of [`Token`] that are within the given `range`. The start and end offset of the given range should be either: 1. Token boundary 2. Ga
crates/ruff_python_ast/src/token/tokens.rs:82
↓ 14 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:732
↓ 14 callers
Method
into_inner
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/infer.rs:605
↓ 14 callers
Method
is_empty
(&self)
crates/ruff_python_semantic/src/cfg/graph.rs:138
↓ 14 callers
Method
is_implicit_concatenated
Returns `true` if the f-string is implicitly concatenated, `false` otherwise.
crates/ruff_python_ast/src/nodes.rs:513
↓ 14 callers
Method
is_raw
Return true if this prefix indicates a "raw f-string", e.g. `rf"{bar}"` or `Rf"{bar}"`
crates/ruff_python_ast/src/str_prefix.rs:83
↓ 14 callers
Method
is_self
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:247
↓ 14 callers
Method
join_project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:299
↓ 14 callers
Method
local_range
Returns the range within this document. Only use `range` when you already have a URI context and this range is guaranteed to be within the same docum
crates/ty_server/src/document/range.rs:33
↓ 14 callers
Method
minimum
Returns the minimum length of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:66
↓ 14 callers
Method
mode
(self)
crates/ruff_formatter/src/printer/call_stack.rs:42
↓ 14 callers
Method
overloads_and_implementation
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/function.rs:857
↓ 14 callers
Method
parse_comma_separated_list
Parses a comma separated list of elements where each element is parsed using the given `parse_element` function. The difference between this function
crates/ruff_python_parser/src/parser/mod.rs:825
↓ 14 callers
Method
parse_expression_list
Parses every Python expression. Matches the `expressions` rule in the [Python grammar]. The [`ExpressionContext`] can be used to match the `star_expr
crates/ruff_python_parser/src/parser/expression.rs:152
↓ 14 callers
Method
parse_named_expression_or_higher
Parses every Python expression except unparenthesized tuple. Matches the `named_expression` rule in the [Python grammar]. The [`ExpressionContext`] c
crates/ruff_python_parser/src/parser/expression.rs:179
↓ 14 callers
Method
persist
Applies the pending changes and persists the cache to disk, if it has been changed.
crates/ruff/src/cache.rs:157
↓ 14 callers
Method
print
(&self)
crates/ruff_formatter/src/lib.rs:324
↓ 14 callers
Method
program_environment
(&self)
crates/ty_project/src/db.rs:726
↓ 14 callers
Method
program_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:526
↓ 14 callers
Method
provenance
(&self)
crates/ty_python_semantic/src/types/call.rs:426
↓ 14 callers
Method
resize
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, new_length: TupleLeng
crates/ty_python_semantic/src/types/tuple.rs:880
↓ 14 callers
Function
resolve_rules
( selections: impl IntoIterator<Item = RuleSelection>, preview: Option<PreviewOptions>, )
crates/ruff_workspace/src/configuration.rs:1844
↓ 14 callers
Method
rest
Returns the remaining text to lex. Use [`Cursor::text_len`] to get the length of the remaining text.
crates/ruff_python_parser/src/lexer/cursor.rs:57
← previous
next →
901–1,000 of 28,707, ranked by callers