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
↓ 10 callers
Method
quote_style
(&self)
crates/ruff_linter/src/docstrings/mod.rs:49
↓ 10 callers
Method
range
(&self)
crates/ty_project/src/metadata/value.rs:60
↓ 10 callers
Method
range
The range from the clause keyword up to and including the final colon.
crates/ruff_python_formatter/src/statement/clause.rs:76
↓ 10 callers
Method
reachable_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1259
↓ 10 callers
Method
receiver
Returns the receiver for the next step of assignment or deletion validation. Validation stays on `object_ty` for a frozen field because the generated
crates/ty_python_semantic/src/types/class/static_literal.rs:140
↓ 10 callers
Method
receiver_constraints
(&self)
crates/ty_python_semantic/src/types/signatures.rs:2539
↓ 10 callers
Method
remove_directory
Deletes the directory at `path`. ## Errors If the directory is not empty The `path` is not a directory The `path` does not exist
crates/ruff_db/src/system/memory_fs.rs:337
↓ 10 callers
Method
render
Render the docstring to the given markup format
crates/ty_ide/src/docstring.rs:30
↓ 10 callers
Method
reverse
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1391
↓ 10 callers
Method
secondary_code_or_id
Returns the secondary code for the diagnostic if it exists, or the lint name otherwise. This is a common pattern for Ruff diagnostics, which want to
crates/ruff_db/src/diagnostic/mod.rs:459
↓ 10 callers
Function
set_expr_ctx
Set the `ctx` for `Expr::Id`, `Expr::Attribute`, `Expr::Subscript`, `Expr::Starred`, `Expr::Tuple` and `Expr::List`. If `expr` is either `Expr::Tuple`
crates/ruff_python_parser/src/parser/helpers.rs:10
↓ 10 callers
Method
set_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:415
↓ 10 callers
Method
settings
Get the document settings associated with this query.
crates/ruff_server/src/session/index.rs:558
↓ 10 callers
Method
should_colorize
Returns whether to use color on this stream. Call [`Self::resolve`] first to apply the environment. In the resolved [`Self::Auto`] mode, this checks w
crates/ruff_command_line/src/color.rs:61
↓ 10 callers
Method
show_fix_status
Show fix availability when rendering.
crates/ruff_db/src/diagnostic/render.rs:2571
↓ 10 callers
Method
shrink_to_fit
(&mut self)
crates/ruff_index/src/vec.rs:74
↓ 10 callers
Method
source_code
Returns the Python source code for this source kind.
crates/ruff_linter/src/source_kind.rs:105
↓ 10 callers
Method
split_around_star
Return the patterns before and after the starred element.
crates/ty_python_core/src/predicate.rs:238
↓ 10 callers
Function
str
(x)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP029_3.py:2
↓ 10 callers
Method
symbol_mut
(&mut self, id: ScopedSymbolId)
crates/ty_python_core/src/place.rs:354
↓ 10 callers
Method
symbols
Iterator over all symbols in this scope.
crates/ty_python_core/src/place.rs:230
↓ 10 callers
Method
system
Looks up a file by its `path`. For a non-existing file, creates a new salsa [`File`] ingredient and stores it for future lookups. The operation alwa
crates/ruff_db/src/files.rs:110
↓ 10 callers
Function
test_helper
(source: &str, expected_num_branches: usize)
crates/ruff_linter/src/rules/pylint/rules/too_many_branches.rs:264
↓ 10 callers
Method
text_len
(&self)
crates/ruff_python_trivia/src/cursor.rs:72
↓ 10 callers
Method
token_range
(&self)
crates/ruff_python_parser/src/lexer.rs:1379
↓ 10 callers
Method
top_materialization
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:658
↓ 10 callers
Method
truncate
(&mut self, len: usize)
crates/ruff_python_ast/src/script.rs:191
↓ 10 callers
Method
try_register_static_roots
Registers file roots for all non-dynamically discovered search paths.
crates/ty_module_resolver/src/resolve.rs:928
↓ 10 callers
Function
tyRangeToMonacoRange
(range: TyRange)
playground/ty/src/Editor/Editor.tsx:1055
↓ 10 callers
Method
unparse_expr
(&mut self, ast: &Expr, level: u8)
crates/ruff_python_codegen/src/generator.rs:942
↓ 10 callers
Method
up_to
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:47
↓ 10 callers
Method
value
(self)
crates/ruff_python_formatter/src/comments/map.rs:554
↓ 10 callers
Method
virtual_file_path
Get the path for the document selected by this query, ignoring whether the file exists on disk. Returns the URI's path if this is an unsaved (untitle
crates/ruff_server/src/session/index.rs:642
↓ 10 callers
Method
visit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/checkers/ast/mod.rs:1781
↓ 10 callers
Function
walk_type_with_recursion_guard
( db: &'db dyn Db, ty: Type<'db>, visitor: &impl TypeVisitor<'db>, recursion_guard: &TypeColle
crates/ty_python_semantic/src/types/visitor.rs:358
↓ 10 callers
Method
when_constraint_set_assignable_to_owned
Returns an _owned_ (i.e. salsa-cached) constraint set that describes when `self` is constraint-set assignable to `target`. Recursive relations are ev
crates/ty_python_semantic/src/types/relation.rs:712
↓ 10 callers
Method
with_dangling_comments
Inserts any dangling comments that should be placed immediately after the open parenthesis. For example: ```python [ # comment 1, 2, 3, ] ```
crates/ruff_python_formatter/src/expression/parentheses.rs:144
↓ 10 callers
Method
write
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1498
↓ 10 callers
Method
write_source_file
(&self, path: &str, contents: &[u8])
crates/ruff/src/cache.rs:1042
↓ 9 callers
Method
after
Returns a slice of tokens after the given [`TextSize`] offset. If the given offset is between two tokens, the returned slice will start from the foll
crates/ruff_python_ast/src/token/tokens.rs:174
↓ 9 callers
Method
apply_type_mapping
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, type_mapping: &TypeMap
crates/ty_python_semantic/src/types.rs:9858
↓ 9 callers
Method
as_paramspec_with_prefix
Returns the prefix parameters and bound `ParamSpec` if this parameter list is either `P` or `Concatenate[<prefix-params>, P]`. For the narrower bare-
crates/ty_python_semantic/src/types/signatures.rs:5405
↓ 9 callers
Function
assert_uv_supports_script_metadata
()
crates/ty/tests/cli/scripts.rs:1652
↓ 9 callers
Function
attribute_scopes
Returns all attribute assignments as scope IDs for a specific class body scope. Only call this when doing type inference on the same file as `class_b
crates/ty_python_core/src/lib.rs:178
↓ 9 callers
Method
base
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/newtype.rs:49
↓ 9 callers
Function
before_main
()
crates/ty_wasm/src/lib.rs:45
↓ 9 callers
Function
bind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured/google.rs:339
↓ 9 callers
Method
bindings_at_use
(&self, use_id: ScopedUseId)
crates/ty_python_core/src/use_def.rs:1093
↓ 9 callers
Method
bump
Bumps the token source to the next non-trivia token. It pushes the given kind to the token vector with the current token range.
crates/ruff_python_parser/src/token_source.rs:165
↓ 9 callers
Function
check_path
( path: &Path, package: Option<PackageRoot<'_>>, locator: &Locator, stylist: &Stylist, ind
crates/ruff_linter/src/linter.rs:121
↓ 9 callers
Function
check_types
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/types.rs:201
↓ 9 callers
Method
class_definition_of_method
Return the [`Definition`] of the class enclosing this method, given the method's body scope, or `None` if it is not a method.
crates/ty_python_core/src/lib.rs:559
↓ 9 callers
Method
clear
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:3512
↓ 9 callers
Method
client_capabilities
(&self)
crates/ty_server/src/session.rs:1477
↓ 9 callers
Method
cmp
(&self, other: &Self)
crates/ruff_python_ast/src/node_index.rs:207
↓ 9 callers
Method
cmp
(&self, other: &Self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:63
↓ 9 callers
Function
comment_indentation_after
Determine the indentation level of an own-line comment, defined as the minimum indentation of all comments between the preceding node and the comment,
crates/ruff_python_ast/src/helpers.rs:1818
↓ 9 callers
Method
components
(&self)
crates/ruff_db/src/system/path.rs:253
↓ 9 callers
Method
constraint_data
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1472
↓ 9 callers
Method
contains_self
Returns `true` if this type contains a `Self` type variable.
crates/ty_python_semantic/src/types.rs:2580
↓ 9 callers
Method
current_scope_info_mut
(&mut self)
crates/ty_python_core/src/builder.rs:388
↓ 9 callers
Method
cycle_recovery
(mut self, val: bool)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:737
↓ 9 callers
Function
default_aliases
(preview: PreviewMode)
crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs:75
↓ 9 callers
Method
default_string_flags
Return the default string flags a generated `StringLiteral` node should use, given where we are in the AST.
crates/ruff_linter/src/checkers/ast/mod.rs:392
↓ 9 callers
Method
elements_slice
(&self)
crates/ty_python_semantic/src/types/tuple.rs:987
↓ 9 callers
Method
enabled
(&self, rule: Rule)
crates/ruff_linter/src/settings/rule_table.rs:27
↓ 9 callers
Method
enum_complement
Return the compact enum-complement view of this intersection, if it has one.
crates/ty_python_semantic/src/types/set_theoretic.rs:1047
↓ 9 callers
Method
env_var
(&self, name: &str)
crates/ty_server/src/system.rs:292
↓ 9 callers
Method
extend
(&mut self, other: Self)
crates/ty_site_packages/src/lib.rs:106
↓ 9 callers
Function
extract_class_literal
Extract a `ClassLiteral` from a `Type`, handling various type forms.
crates/ty_python_semantic/src/types/ide_support.rs:2049
↓ 9 callers
Function
extract_directives
( tokens: &Tokens, flags: Flags, locator: &Locator, indexer: &Indexer, )
crates/ruff_linter/src/directives.rs:55
↓ 9 callers
Function
f
()
crates/ruff_python_parser/resources/valid/other/decorator.py:12
↓ 9 callers
Function
file_time_now
()
crates/ruff_db/src/system.rs:372
↓ 9 callers
Method
files
(&self)
crates/ty_module_resolver/src/db.rs:109
↓ 9 callers
Function
filter
()
docs/js/rule-filters.js:149
↓ 9 callers
Function
find_binding_value
(binding: &Binding, semantic: &'a SemanticModel)
crates/ruff_python_semantic/src/analyze/typing.rs:1244
↓ 9 callers
Method
finish
(mut self)
crates/ty_python_semantic/src/types/constraints/solutions.rs:1844
↓ 9 callers
Method
fmt_detailed
(&self, writer: &mut TypeWriter<'_, '_, 'db>)
crates/ty_python_semantic/src/types/display.rs:471
↓ 9 callers
Method
function_type
(&self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer.rs:1933
↓ 9 callers
Method
get
(&self)
crates/ruff_linter/src/line_width.rs:182
↓ 9 callers
Method
goto_declaration
Apply the "goto declaration" interpretation to these definitions.
crates/ty_ide/src/goto.rs:287
↓ 9 callers
Method
has_comments
Returns `true` if a statement or expression includes at least one comment.
crates/ruff_python_trivia/src/comment_ranges.rs:109
↓ 9 callers
Method
has_explicit_bases
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:222
↓ 9 callers
Method
has_typevar
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:61
↓ 9 callers
Function
hash
FNV
crates/ruff_unicode_names2_generator/src/phf.rs:11
↓ 9 callers
Method
hash
(&self, state: &mut H)
crates/ruff_cache/tests/cache_key.rs:55
↓ 9 callers
Method
headline_message
Returns the headline message for this diagnostic. A diagnostic always has a message, but it may be empty.
crates/ruff_db/src/diagnostic/mod.rs:230
↓ 9 callers
Method
import
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, graph: RecursiveTypeG
crates/ty_python_semantic/src/types/recursive.rs:231
↓ 9 callers
Method
in_async_context
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:919
↓ 9 callers
Method
in_string_type_definition
Return `true` if the model is visiting a "string type definition" that was previously deferred when initially traversing the AST
crates/ruff_python_semantic/src/model.rs:2125
↓ 9 callers
Method
indentation
(&self)
crates/ruff_python_codegen/src/stylist.rs:19
↓ 9 callers
Method
index
(&self)
crates/ruff_source_file/src/lib.rs:169
↓ 9 callers
Function
infer_deferred_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:425
↓ 9 callers
Method
infer_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6800
↓ 9 callers
Method
intersect_types
(&self, left: Type<'db>, right: Type<'db>)
crates/ty_python_semantic/src/types/narrow.rs:3493
↓ 9 callers
Method
into_absolute
Anchors pattern at `cwd`. `is_exclude` indicates whether this is a pattern in an exclude filter. This method similar to [`SystemPath::absolute`] but
crates/ty_project/src/glob/portable.rs:137
↓ 9 callers
Method
into_enum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:325
↓ 9 callers
Method
into_inner
(self)
crates/ruff_ranged_value/src/lib.rs:217
↓ 9 callers
Method
into_inner
(self)
crates/ty_python_semantic/src/types.rs:2325
↓ 9 callers
Method
into_iter
(self)
crates/ruff_python_semantic/src/definition.rs:306
← previous
next →
1,601–1,700 of 31,562, ranked by callers