Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
27,645 in github.com/astral-sh/ruff
⨍
Functions
27,645
◇
Types & classes
6,577
↳
Endpoints
82
↓ 19 callers
Method
pop
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:6981
↓ 19 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:2791
↓ 19 callers
Function
process
(__debug__)
crates/ruff_linter/resources/test/fixtures/semantic_errors/write_to_debug.py:3
↓ 19 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
↓ 19 callers
Method
range
Returns the [`TextRange`] for the diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:506
↓ 19 callers
Function
render_docstring
(raw: &str)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:834
↓ 19 callers
Method
scope
(&self)
crates/ty_python_semantic/src/types/context.rs:78
↓ 19 callers
Method
seen_typing
(&self)
crates/ruff_python_semantic/src/model.rs:1716
↓ 19 callers
Method
source
(&self)
crates/ruff_linter/src/rules/pep8_naming/settings.rs:63
↓ 19 callers
Method
stmt
Generate source code from a [`Stmt`].
crates/ruff_python_codegen/src/generator.rs:140
↓ 19 callers
Method
suffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1099
↓ 19 callers
Method
sum
(iter: I)
crates/ruff_text_size/src/size.rs:216
↓ 19 callers
Method
to_notebook_or_file
(&self, db: &dyn Db)
crates/ty_server/src/session.rs:1403
↓ 19 callers
Method
tokens
Returns all the tokens for the parsed output.
crates/ruff_python_parser/src/lib.rs:401
↓ 19 callers
Method
top_materialization
Returns the top materialization for this class.
crates/ty_python_semantic/src/types/class.rs:908
↓ 19 callers
Function
trailing
()
crates/ruff_python_formatter/src/comments/map.rs:643
↓ 19 callers
Function
walk_stmt
(visitor: &mut V, stmt: &'a Stmt)
crates/ruff_python_ast/src/visitor.rs:135
↓ 18 callers
Method
anonymized_line_numbers
Anonymize line numbers This enables (or disables) line number anonymization. When enabled, line numbers are replaced with `LL`. # Example ```text -
crates/ruff_annotate_snippets/src/renderer/mod.rs:99
↓ 18 callers
Method
append
(self)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_long_strings__regression.py:109
↓ 18 callers
Method
as_function
(&self)
crates/ty_python_core/src/scope.rs:415
↓ 18 callers
Method
as_str
(self)
crates/ty_ide/src/docstring/markdown/structured.rs:129
↓ 18 callers
Method
binding_id
Returns the [`BindingId`] if this symbol resolves to a concrete binding.
crates/ruff_python_semantic/src/model.rs:44
↓ 18 callers
Method
collect_publish_diagnostic_notifications
( &mut self, count: usize, )
crates/ty_server/tests/e2e/main.rs:568
↓ 18 callers
Method
concat
Concatenates another tuple to the end of this tuple, returning a new tuple.
crates/ty_python_semantic/src/types/tuple.rs:2792
↓ 18 callers
Method
constraint_data
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1211
↓ 18 callers
Method
contents
Return the underlying source code.
crates/ruff_linter/src/locator.rs:117
↓ 18 callers
Method
definition
(&self, id: ScopedDefinitionId)
crates/ty_python_core/src/use_def.rs:946
↓ 18 callers
Method
end_of_scope_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:978
↓ 18 callers
Method
enter_node
(&mut self, node: T)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:205
↓ 18 callers
Method
exit_node
(&mut self)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:213
↓ 18 callers
Method
expression_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:222
↓ 18 callers
Function
file_to_module
(db: &dyn Db, file: File)
crates/ty_module_resolver/src/resolve.rs:294
↓ 18 callers
Method
finish
(&mut self)
crates/ruff_db/src/display.rs:49
↓ 18 callers
Method
finish
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:915
↓ 18 callers
Method
format
Whether to enable concise diagnostic output or not.
crates/ruff_db/src/diagnostic/mod.rs:1471
↓ 18 callers
Method
generic_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:275
↓ 18 callers
Method
has_leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:272
↓ 18 callers
Method
inference_flags
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:11046
↓ 18 callers
Method
insert
(mut self, insert: impl Into<CompactString>)
crates/ty_ide/src/completion.rs:517
↓ 18 callers
Method
into_iter
(self)
crates/ty_site_packages/src/lib.rs:255
↓ 18 callers
Method
is_file
(self)
crates/ruff_db/src/system.rs:305
↓ 18 callers
Method
is_ipynb
(self)
crates/ruff_python_ast/src/lib.rs:153
↓ 18 callers
Method
is_language_services_disabled
(&self)
crates/ty_server/src/session/settings.rs:43
↓ 18 callers
Method
is_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2318
↓ 18 callers
Method
is_triple_quoted
Returns `true` if the current f-string is a triple-quoted f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:75
↓ 18 callers
Method
iter_all_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:825
↓ 18 callers
Method
kind
(&self)
crates/ty_python_core/src/builder.rs:4980
↓ 18 callers
Method
len
(&self)
crates/ruff_db/src/parsed.rs:477
↓ 18 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:441
↓ 18 callers
Method
open
(self, server: &mut TestServer)
crates/ty_server/tests/e2e/notebook.rs:629
↓ 18 callers
Method
p
(&mut self, s: &str)
crates/ruff_python_codegen/src/generator.rs:171
↓ 18 callers
Function
predicate
(index: usize)
crates/ty_python_core/src/narrowing_constraints.rs:425
↓ 18 callers
Method
push
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:465
↓ 18 callers
Method
report_diagnostic
( &self, context: &InferContext<'db, '_>, node: ast::AnyNodeRef, callable_ty:
crates/ty_python_semantic/src/types/call/bind.rs:7431
↓ 18 callers
Method
try_call_dunder
Look up a dunder method on the meta-type of `self` and call it. Returns an `Err` if the dunder method can't be called, or the given arguments are not
crates/ty_python_semantic/src/types.rs:5558
↓ 18 callers
Method
try_upcast_to_callable
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:43
↓ 18 callers
Method
vendored
(&self)
crates/ty_module_resolver/src/resolve.rs:1751
↓ 18 callers
Method
with_file
( mut self, path: &'a (impl AsRef<SystemPath> + ?Sized), content: &'a str,
crates/ty_python_semantic/src/db.rs:220
↓ 18 callers
Method
workspace_settings
Returns the client settings for the workspace that this document belongs to.
crates/ty_server/src/session.rs:1390
↓ 17 callers
Method
as_str
(self)
crates/ty_module_resolver/src/module.rs:361
↓ 17 callers
Method
as_str
(&self)
crates/ruff_linter/src/rules/ruff/rules/unused_noqa.rs:21
↓ 17 callers
Method
as_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1594
↓ 17 callers
Function
binding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:220
↓ 17 callers
Function
check_os_pathlib_single_arg_calls
We check functions that take only 1 argument, this does not apply to functions with `dir_fd` argument, because `dir_fd` is not supported by pathlib,
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:53
↓ 17 callers
Function
delete_stmt
Return the [`Edit`] to use when deleting a [`Stmt`]. In some cases, this is as simple as deleting the [`TextRange`] of the [`Stmt`] itself. However,
crates/ruff_linter/src/fix/edits.rs:39
↓ 17 callers
Method
display
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/display.rs:605
↓ 17 callers
Method
element_type
(self, _db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:778
↓ 17 callers
Method
explicit_extra_items
Returns extra items only when they were explicitly declared. An implicitly open `TypedDict` returns `None` here because its hidden items are not dire
crates/ty_python_semantic/src/types/typed_dict.rs:95
↓ 17 callers
Method
extension
(&self)
crates/ty_module_resolver/src/path.rs:838
↓ 17 callers
Method
finish
(self)
crates/ty_python_core/src/place.rs:419
↓ 17 callers
Method
first_public_binding
(&self, symbol: ScopedSymbolId)
crates/ty_python_core/src/lib.rs:1087
↓ 17 callers
Method
format
(&self)
crates/ruff_python_formatter/src/generated.rs:24
↓ 17 callers
Method
in_range
Initialize [`NoqaLexer`] in the given range of source text.
crates/ruff_linter/src/noqa.rs:421
↓ 17 callers
Method
into_inner
(self)
crates/ty_python_semantic/src/types/callable.rs:709
↓ 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
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
materialization_kind
(self)
crates/ty_python_semantic/src/types.rs:7985
↓ 17 callers
Method
name
(self, db: &'db dyn Db, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/scope.rs:59
↓ 17 callers
Method
node
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1444
↓ 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:901
↓ 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
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:1331
↓ 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:1597
↓ 17 callers
Method
snapshot
(&self)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:38
↓ 17 callers
Method
system
(&self)
crates/ruff_db/src/system/test.rs:90
↓ 17 callers
Method
trim_whitespace
(&self)
crates/ruff_python_trivia/src/whitespace.rs:113
↓ 17 callers
Method
type_argument
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:8958
↓ 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:1366
↓ 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
← previous
next →
701–800 of 27,645, ranked by callers