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
↓ 5 callers
Method
remove_inferable_typevar_artifacts_from_solution
Remove inferable type variables introduced by transitivity within the target's binding context while preserving intentional relationships to other gen
crates/ty_python_semantic/src/types/generics.rs:3370
↓ 5 callers
Method
render
Render a diagnostic [`Report`]
crates/ruff_annotate_snippets/src/renderer/mod.rs:202
↓ 5 callers
Function
render_html
(result: Result, command: RuffCommand, title: str)
python/ruff-ecosystem/ruff_ecosystem/html.py:28
↓ 5 callers
Function
render_inline_text
Escapes underscores and HTML-sensitive characters in prose outside inline code spans. For example, `__init__` becomes `\_\_init\_\_`, while `` `__ini
crates/ty_ide/src/docstring/markdown/general/inline.rs:537
↓ 5 callers
Method
report_invalid
(&mut self, diagnostic: Diagnostic)
crates/ty_project/src/script.rs:384
↓ 5 callers
Method
required_applicability
(&self)
crates/ruff_linter/src/settings/types.rs:162
↓ 5 callers
Method
reserve_exact
Reserves capacity for at least `additional` more bindings.
crates/ruff_python_semantic/src/binding.rs:469
↓ 5 callers
Method
resize
(&mut self, new_len: usize, value: T)
crates/ruff_index/src/vec.rs:79
↓ 5 callers
Method
resolve
Resolve a set of globs, anchored at a given root.
crates/ruff/src/commands/analyze_graph.rs:246
↓ 5 callers
Method
resolve
(self, path: &Path)
crates/ruff_workspace/src/resolver.rs:87
↓ 5 callers
Function
resolve_imported_module_path
Given an imported module (based on its relative import level and module name), return the fully-qualified module path.
crates/ruff_python_ast/src/helpers.rs:1091
↓ 5 callers
Function
resolve_module_confident
( db: &'db ProjectDatabase, module_name: &ModuleName, )
crates/ty/tests/file_watching.rs:45
↓ 5 callers
Function
resolve_module_query
( db: &'db dyn Db, module_name: ModuleNameIngredient<'db>, )
crates/ty_module_resolver/src/resolve.rs:256
↓ 5 callers
Function
resolve_root_settings
Extract the [`Settings`] from a given `pyproject.toml` and process the configuration with the given [`ConfigurationTransformer`].
crates/ruff_workspace/src/resolver.rs:444
↓ 5 callers
Function
resolve_solution
Resolves only dependencies with selected, acyclic solutions. The result has the same order as `solution`; references outside `inferable` retain their
crates/ty_python_semantic/src/types/constraints/resolution.rs:34
↓ 5 callers
Method
retained_constraint_index
(&self, id: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:370
↓ 5 callers
Method
rule
(self)
crates/ty_python_semantic/src/types/overrides.rs:1570
↓ 5 callers
Function
run
( command: list[str], *, environment: dict[str, str], allowed_exit_codes: tuple[int, ...] = (0
scripts/build_ruff_pgo.py:567
↓ 5 callers
Function
run
(argv: Sequence[str])
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30_isort.py:51
↓ 5 callers
Function
run_corpus_tests
(pattern: &str)
crates/ty_python_semantic/tests/corpus.rs:76
↓ 5 callers
Function
run_uv
Runs uv in the test's project directory with its configured executable and environment.
crates/ty/tests/file_watching.rs:4401
↓ 5 callers
Method
same_divergent_marker
Returns `true` if both types reference the same recursive query, or both represent pending narrowing, regardless of materialization state.
crates/ty_python_semantic/src/types.rs:2503
↓ 5 callers
Method
saturating_add
(self, rhs: usize)
crates/ruff_source_file/src/line_index.rs:611
↓ 5 callers
Method
scope
Returns the scope in which this dynamic class was created.
crates/ty_python_semantic/src/types/class/named_tuple.rs:206
↓ 5 callers
Method
scope
Returns the scope in which this dynamic class was created.
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:177
↓ 5 callers
Method
scope_ids
(&self)
crates/ty_python_core/src/lib.rs:497
↓ 5 callers
Function
script
(db: &dyn Db, file: File)
crates/ty_project/src/script.rs:96
↓ 5 callers
Method
script_files
Returns all scripts in the project, including explicitly opened scripts. Scripts are identified solely by the presence of a PEP 723 script metadata b
crates/ty_project/src/lib.rs:822
↓ 5 callers
Method
secondary
Add a secondary annotation with a message. If the message is empty, then an annotation without any message be created. See the docs on `TestEnvironm
crates/ruff_db/src/diagnostic/render.rs:2802
↓ 5 callers
Method
serialize
(&self, serializer: S)
crates/ruff_linter/src/codes.rs:78
↓ 5 callers
Method
set
(self, key: Key, flag: int, *, recursive: bool)
crates/ruff_benchmark/resources/tomllib/_parser.py:164
↓ 5 callers
Method
set_check_mode
Set the check mode for the project.
crates/ty_project/src/db.rs:269
↓ 5 callers
Method
set_included_paths
(self, db: &mut dyn Db, paths: Vec<SystemPathBuf>)
crates/ty_project/src/lib.rs:611
↓ 5 callers
Method
set_invalid_type_annotation
(&mut self)
crates/ty_python_semantic/src/types/display.rs:420
↓ 5 callers
Method
set_return_type
(&mut self, return_ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:9419
↓ 5 callers
Function
settings_toml
Return the path to the `pyproject.toml` or `ruff.toml` file in a given directory.
crates/ruff_workspace/src/pyproject.rs:84
↓ 5 callers
Method
severity
(&self)
crates/ty_wasm/src/lib.rs:948
↓ 5 callers
Method
shadows_any
Returns `true` if `self` shadows any global, nonlocal, or local symbol, keyword, or builtin.
crates/ruff_linter/src/renamer.rs:434
↓ 5 callers
Function
shadows_builtin
( name: &str, source_type: PySourceType, ignorelist: &[String], python_version: PythonVersion,
crates/ruff_linter/src/rules/flake8_builtins/helpers.rs:5
↓ 5 callers
Method
shrink_to_fit
(&mut self, members: &IndexVec<ScopedMemberId, Member>)
crates/ty_python_core/src/member.rs:525
↓ 5 callers
Function
singleton_pattern_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, singleton: ast::Singleton, )
crates/ty_python_semantic/src/types/match_pattern.rs:66
↓ 5 callers
Method
source_overload_index
Returns the overload's source position in the defining function's overload list.
crates/ty_python_semantic/src/types/call/bind.rs:9259
↓ 5 callers
Method
specialization_of
If the type is a specialized instance of the given class, returns the specialization.
crates/ty_python_semantic/src/types.rs:2872
↓ 5 callers
Function
specialization_variance
( db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/generics.rs:2162
↓ 5 callers
Function
start_of_file
()
crates/ruff_python_importer/src/insertion.rs:404
↓ 5 callers
Method
statement
(self)
crates/ruff_python_formatter/src/statement/suite.rs:902
↓ 5 callers
Method
static_member
Access an attribute of this type without invoking the descriptor protocol. This method corresponds to `inspect.getattr_static(<object of type 'self'>,
crates/ty_python_semantic/src/types.rs:5032
↓ 5 callers
Method
store_type_expression_flags
Store metadata for a type expression.
crates/ty_python_semantic/src/types/infer/builder.rs:1103
↓ 5 callers
Method
sub
Adds a sub-diagnostic constructed with this diagnostic's environment.
crates/ruff_db/src/diagnostic/render.rs:2844
↓ 5 callers
Method
summary_line
Summary line without the trailing newline characters
crates/ruff_linter/src/docstrings/sections.rs:374
↓ 5 callers
Function
symbol_definition
Returns the definition to use as the secondary annotation for an overridden symbol.
crates/ty_python_semantic/src/types/overrides.rs:1878
↓ 5 callers
Method
system_virtual_path_to_document
( &self, path: &SystemVirtualPath, )
crates/ty_server/src/system.rs:158
↓ 5 callers
Method
target
(&self)
crates/ty_ide/src/inlay_hints.rs:330
↓ 5 callers
Method
target_range
Returns the [`TextRange`] of the definition target. A definition target would mainly be the node representing the place being defined i.e., [`ast::Ex
crates/ty_python_core/src/definition.rs:1032
↓ 5 callers
Function
this
r""" 'hey ho'
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:85
↓ 5 callers
Method
to_program_settings
( &self, system: &dyn System, vendored: &VendoredFileSystem, strategy: &Strate
crates/ty_project/src/metadata.rs:573
↓ 5 callers
Function
to_snake_case
Converts CamelCase to snake_case
crates/ruff_python_ast/generate.py:91
↓ 5 callers
Method
top
(&mut self)
crates/mdtest/src/parser.rs:482
↓ 5 callers
Method
touch
Sets the last modified timestamp of the file stored at `path` to now. Creates a new file if the file at `path` doesn't exist.
crates/ruff_db/src/system/memory_fs.rs:314
↓ 5 callers
Function
touch_directory
(paths: &mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, path: &Utf8Path)
crates/ruff_db/src/system/memory_fs.rs:507
↓ 5 callers
Function
transform_expression
Run a transformation function over an expression. Passing an expression to [`match_expression`] directly can lead to parse errors if the expression i
crates/ruff_linter/src/cst/matchers.rs:244
↓ 5 callers
Method
triple_quotes
Returns the triple quotes for the current f-string if it is a triple-quoted f-string, `None` otherwise.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:61
↓ 5 callers
Method
trivia
(&self)
crates/ruff_python_formatter/src/context.rs:81
↓ 5 callers
Method
try_expression
( &self, expression_key: impl Into<ExpressionNodeKey>, )
crates/ty_python_core/src/lib.rs:750
↓ 5 callers
Method
try_mro_ancestors
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/class.rs:540
↓ 5 callers
Method
try_node_scope
Returns the id of the scope that `node` creates, if it exists.
crates/ty_python_core/src/lib.rs:785
↓ 5 callers
Method
try_system
Tries to look up the file for the given system path, returns `None` if no such file exists yet
crates/ruff_db/src/files.rs:168
↓ 5 callers
Method
try_upcast_to_callable_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, policy: UpcastPolicy,
crates/ty_python_semantic/src/types/callable.rs:202
↓ 5 callers
Method
ty
(mut self, ty: impl Into<Option<Type<'db>>>)
crates/ty_ide/src/completion.rs:589
↓ 5 callers
Method
ty
Returns the semantic type of this base entry.
crates/ty_python_semantic/src/types/class/static_literal.rs:3490
↓ 5 callers
Method
typed_dict_module
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:1112
↓ 5 callers
Method
typing_self_type
Returns the type that replaces any `typing.Self` annotations in the bound method signature.
crates/ty_python_semantic/src/types/method.rs:220
↓ 5 callers
Method
union
A union can invoke either target, so either target can contribute a deprecation.
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:179
↓ 5 callers
Method
union
(mut self, other: &Self)
crates/ruff_linter/src/registry/rule_set.rs:84
↓ 5 callers
Method
union_expected_types
(&mut self, expected_types: &FxHashMap<ExpressionNodeKey, Type<'db>>)
crates/ty_python_semantic/src/types/infer/builder.rs:7247
↓ 5 callers
Method
unknown_specialization
Returns the unknown specialization of this class. For non-generic classes, the class is returned unchanged. For a non-specialized generic class, we re
crates/ty_python_semantic/src/types/class/static_literal.rs:683
↓ 5 callers
Function
unwrapped_call_argument
Returns source code that replaces a call with one of its arguments. Preserve the argument's optional parentheses, including any comments inside them.
crates/ruff_python_edits/src/call.rs:18
↓ 5 callers
Method
update_file_watcher
(&mut self, client: &Client)
crates/ty_server/src/session.rs:1166
↓ 5 callers
Method
updated_implementation_callables
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1312
↓ 5 callers
Method
uri_for_key
(&'a self, key: &'a DocumentKey)
crates/ruff_server/src/session/index.rs:357
↓ 5 callers
Method
use_uv
Returns which uv integrations are enabled for this project.
crates/ty_project/src/metadata.rs:393
↓ 5 callers
Method
uses_pep_484_positional_only_convention
Return `true` if the parameter name uses the pre-PEP-570 convention (specified in PEP 484) to indicate to a type checker that it should be treated as
crates/ruff_python_ast/src/nodes.rs:3644
↓ 5 callers
Method
value_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:236
↓ 5 callers
Method
vendored
(&self)
crates/ty_project/src/db.rs:676
↓ 5 callers
Method
visit
Visits the nodes in the case header.
crates/ruff_python_formatter/src/statement/clause.rs:108
↓ 5 callers
Method
visit_arguments
(&mut self, arguments: &'a Arguments)
crates/ruff_python_ast/src/visitor.rs:57
↓ 5 callers
Method
visit_boolean_test
Visit an [`Expr`], and treat it as a boolean test. This is useful for detecting whether an expressions return value is significant, or whether the cal
crates/ruff_linter/src/checkers/ast/mod.rs:2797
↓ 5 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints/resolution.rs:175
↓ 5 callers
Function
walk_decorator
(visitor: &mut V, decorator: &'a Decorator)
crates/ruff_python_ast/src/visitor.rs:358
↓ 5 callers
Function
walk_except_handler
( visitor: &mut V, except_handler: &'a ExceptHandler, )
crates/ruff_python_ast/src/visitor.rs:644
↓ 5 callers
Function
walk_f_string
(visitor: &mut V, f_string: &'a FString)
crates/ruff_python_ast/src/visitor.rs:810
↓ 5 callers
Function
walk_interpolated_string_element
( visitor: &mut V, interpolated_string_element: &'a InterpolatedStringElement, )
crates/ruff_python_ast/src/visitor.rs:816
↓ 5 callers
Function
walk_keyword
(visitor: &mut V, keyword: &'a Keyword)
crates/ruff_python_ast/src/visitor.rs:690
↓ 5 callers
Function
walk_non_atomic_type
( db: &'db dyn Db, non_atomic_type: NonAtomicType<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/visitor.rs:284
↓ 5 callers
Function
walk_parameters
(visitor: &mut V, parameters: &'a Parameters)
crates/ruff_python_ast/src/visitor.rs:670
↓ 5 callers
Method
when_constraint_set_assignable_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:758
↓ 5 callers
Method
which
(&self, name: &str)
crates/ty_test/src/db.rs:566
↓ 5 callers
Method
with_binding_context
( self, db: &'db dyn Db, binding_context: Definition<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:281
↓ 5 callers
Method
with_kind
(self, db: &'db dyn Db, kind: CallableTypeKind)
crates/ty_python_semantic/src/types/callable.rs:804
↓ 5 callers
Method
with_options
(mut self, options: Self::Options)
crates/ruff_python_formatter/src/statement/suite.rs:773
← previous
next →
2,901–3,000 of 31,562, ranked by callers