Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
27,349 in github.com/astral-sh/ruff
⨍
Functions
27,349
◇
Types & classes
6,530
↳
Endpoints
82
↓ 16 callers
Method
materialization_kind
(self)
crates/ty_python_semantic/src/types.rs:7847
↓ 16 callers
Method
path
Returns the relative path as specified by the user.
crates/ty_project/src/metadata/value.rs:53
↓ 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
place_id
Returns the [`ScopedPlaceId`] of the place expression.
crates/ty_python_core/src/place.rs:247
↓ 16 callers
Method
position
(&self)
crates/ruff_linter/src/noqa.rs:678
↓ 16 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:585
↓ 16 callers
Method
return_type
Compute the overall effective return type of this `ConstructorBinding`.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:179
↓ 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:351
↓ 16 callers
Method
specialization
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:4880
↓ 16 callers
Method
trim_whitespace
(&self)
crates/ruff_python_trivia/src/whitespace.rs:69
↓ 16 callers
Method
values
Returns an iterator over the fixes in the map.
crates/ruff/src/diagnostics.rs:146
↓ 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
apply_type_mapping
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, )
crates/ty_python_semantic/src/types/generics.rs:1269
↓ 15 callers
Method
as_i64
(self)
crates/ty_python_semantic/src/types/literal.rs:308
↓ 15 callers
Method
as_subscript_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2606
↓ 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:630
↓ 15 callers
Method
bump
Consumes the next character
crates/ruff_python_trivia/src/cursor.rs:82
↓ 15 callers
Method
child_scopes
Returns an iterator over the direct child scopes of `scope`.
crates/ty_python_core/src/lib.rs:563
↓ 15 callers
Method
concat
Concatenates another tuple to the end of this tuple, returning a new tuple.
crates/ty_python_semantic/src/types/tuple.rs:2460
↓ 15 callers
Method
concise_message
Introspects this diagnostic and returns what kind of "primary" message it contains for concise formatting. When we concisely format diagnostics, we l
crates/ruff_db/src/diagnostic/mod.rs:225
↓ 15 callers
Method
constraint_data
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1026
↓ 15 callers
Method
db
Returns the underlying test DB.
crates/ty_ide/src/completion.rs:10755
↓ 15 callers
Method
display_with
(self, db: &'db dyn Db, settings: DisplaySettings<'db>)
crates/ty_python_semantic/src/types/display.rs:613
↓ 15 callers
Method
entry
( &mut self, node: &T, content: &dyn Format<PyFormatContext<'ast>>, )
crates/ruff_python_formatter/src/builders.rs:154
↓ 15 callers
Method
exactly_one
(self)
crates/ty_python_semantic/src/types/callable.rs:648
↓ 15 callers
Method
exit
Current exit block, which may change during construction
crates/ruff_python_semantic/src/cfg/graph.rs:282
↓ 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
infer_maybe_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:5277
↓ 15 callers
Method
initialization_result
Get the initialization result
crates/ty_server/tests/e2e/main.rs:780
↓ 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:2574
↓ 15 callers
Method
is_always_false
(self)
crates/ty_python_core/src/lib.rs:950
↓ 15 callers
Method
is_eof
(self)
crates/ruff_python_ast/src/token.rs:327
↓ 15 callers
Method
iter
(&self)
crates/mdtest/src/matcher.rs:30
↓ 15 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:508
↓ 15 callers
Method
kind
(&self)
crates/ty_python_core/src/scope.rs:145
↓ 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
len
Length of this annotation as displayed in the stderr output
crates/ruff_annotate_snippets/src/renderer/display_list.rs:912
↓ 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
nominal_class
If this type is a class instance, returns its class.
crates/ty_python_semantic/src/types.rs:1415
↓ 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
↓ 15 callers
Method
recursively_defined
(mut self, val: RecursivelyDefined)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:622
↓ 15 callers
Method
remaining_literal_union
Expand this complement to the union of enum literals that remain possible.
crates/ty_python_semantic/src/types/enums.rs:753
↓ 15 callers
Method
search_path
(&self)
crates/ty_module_resolver/src/path.rs:86
↓ 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_search_paths
( &self, system: &dyn System, vendored: &VendoredFileSystem, strategy: &Strate
crates/ty_module_resolver/src/settings.rs:55
↓ 15 callers
Method
to_str
(&self, db: &'a dyn Db)
crates/ty_module_resolver/src/resolve.rs:1229
↓ 15 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
↓ 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
truncate
(&mut self, a: usize)
crates/ruff_index/src/vec.rs:47
↓ 15 callers
Method
value
Return the numeric value for this [`LineLength`]
crates/ruff_linter/src/line_width.rs:26
↓ 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
↓ 15 callers
Method
write_files_all
Writes the files to the file system. The operation overrides existing files with the same normalized path. Enclosing directories are automatically c
crates/ruff_db/src/system/memory_fs.rs:212
↓ 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:555
↓ 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_str
(&self)
crates/ruff_source_file/src/newlines.rs:258
↓ 14 callers
Method
as_str
The code that is ignored by the `noqa` directive.
crates/ruff_linter/src/noqa.rs:89
↓ 14 callers
Method
as_str
(self)
crates/ruff_linter/src/docstrings/mod.rs:99
↓ 14 callers
Method
as_str
(&self)
crates/ruff_linter/src/rules/ruff/rules/unused_noqa.rs:21
↓ 14 callers
Method
as_system_path
(&self)
crates/ty_module_resolver/src/path.rs:708
↓ 14 callers
Method
as_typevar
(self)
crates/ty_python_semantic/src/types/typevar.rs:35
↓ 14 callers
Function
assert_include
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:360
↓ 14 callers
Method
completion_request
Sends a `textDocument/completion` request for the document at the given URI and position.
crates/ty_server/tests/e2e/main.rs:1008
↓ 14 callers
Function
covering_node
Returns the node with a minimal range that fully contains `range`. If `range` is empty and falls within a parser *synthesized* node generated during
crates/ruff_python_ast/src/find_node.rs:14
↓ 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
Function
default_lint_registry
Returns the default registry with all known semantic lints.
crates/ty_python_semantic/src/lib.rs:72
↓ 14 callers
Method
end_of_scope_symbol_declarations
( &'map self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1096
↓ 14 callers
Method
enum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:710
↓ 14 callers
Method
expect_type
(self)
crates/ty_python_semantic/src/place.rs:294
↓ 14 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
↓ 14 callers
Function
f
()
crates/ruff_linter/resources/test/fixtures/ruff/noqa.py:1
↓ 14 callers
Method
file_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:83
↓ 14 callers
Function
find_goto_target
( model: &'a SemanticModel, parsed: &'a ParsedModuleRef, offset: TextSize, )
crates/ty_ide/src/goto.rs:1339
↓ 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:387
↓ 14 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
↓ 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:294
↓ 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
homogeneous_element_type
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:2037
↓ 14 callers
Method
ignore_conflicting_declarations
(self)
crates/ty_python_semantic/src/place.rs:751
← previous
next →
801–900 of 27,349, ranked by callers