Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 14 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/semantic_model.rs:86
↓ 14 callers
Method
promote
Promote (possibly nested) literals to types that these literals are instances of. Note that this function tries to promote literals to a more user-fr
crates/ty_python_semantic/src/types.rs:3726
↓ 14 callers
Method
recursive_type_normalized
Normalize recursive types for cycle recovery when there's no previous value. See [`Type::recursive_type_normalized`] for more details.
crates/ty_python_semantic/src/types/typevar.rs:2484
↓ 14 callers
Method
require_bound_or_constraints
Returns the bounds or constraints of this typevar. If the typevar is unbounded, returns `object` as its upper bound.
crates/ty_python_semantic/src/types/typevar.rs:1159
↓ 14 callers
Function
resolve_rules
( selections: impl IntoIterator<Item = RuleSelection>, preview: Option<PreviewOptions>, )
crates/ruff_workspace/src/configuration.rs:1791
↓ 14 callers
Method
reverse
(self)
crates/ruff_linter/src/rules/refurb/rules/if_expr_min_max.rs:164
↓ 14 callers
Method
set_search_paths
(&mut self, search_paths: SearchPaths)
crates/ty_module_resolver/src/db.rs:64
↓ 14 callers
Method
snapshot
(&self)
crates/ty_ide/src/completion.rs:11800
↓ 14 callers
Function
symlink
()
crates/ty_module_resolver/src/list.rs:495
↓ 14 callers
Method
to_file_path
Returns the corresponding [`AnySystemPath`] for this document key. Note, calling this method on a `DocumentKey::Opaque` representing a cell document
crates/ty_server/src/document.rs:123
↓ 14 callers
Method
trim_whitespace_start
(&self)
crates/ruff_python_trivia/src/whitespace.rs:117
↓ 14 callers
Method
try_add_root
Adds a new root for `path` and returns the root. The root isn't added nor is the file root's kind updated if a root for `path` already exists.
crates/ruff_db/src/files.rs:260
↓ 14 callers
Method
try_bool
Resolves the boolean value of a type. This is used to determine the value that would be returned when `bool(x)` is called on an object `x`. Returns
crates/ty_python_semantic/src/types/bool.rs:41
↓ 14 callers
Method
try_iterate
Given the type of an object that is iterated over in some way, return a tuple spec describing the type of objects that are yielded by that iteration.
crates/ty_python_semantic/src/types/iteration.rs:232
↓ 14 callers
Method
tuple_spec
If this 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 tupl
crates/ty_python_semantic/src/types/instance.rs:330
↓ 14 callers
Method
unique
(targets: impl IntoIterator<Item = NavigationTarget>)
crates/ty_ide/src/lib.rs:239
↓ 14 callers
Method
upper_bound
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:344
↓ 14 callers
Method
value
Return the numeric value for this [`LineLength`]
crates/ruff_linter/src/line_width.rs:26
↓ 14 callers
Method
with_python_version
(&mut self, version: PythonVersion)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:122
↓ 14 callers
Method
with_signatures
Replace the signatures without losing binding behavior or deprecation metadata.
crates/ty_python_semantic/src/types/callable.rs:796
↓ 13 callers
Method
add_and_constraint
( &mut self, a: ScopedNarrowingConstraint, b: ScopedNarrowingConstraint, )
crates/ty_python_core/src/narrowing_constraints.rs:362
↓ 13 callers
Method
add_pair_implication
( &mut self, ante1: AtomicConstraint<'db>, ante2: AtomicConstraint<'db>, post:
crates/ty_python_semantic/src/types/constraints/sequents.rs:337
↓ 13 callers
Method
as_any_import
(&self)
crates/ruff_python_semantic/src/binding.rs:302
↓ 13 callers
Method
as_fixed_length
Returns the inner fixed-length tuple if this is a `Tuple::Fixed` variant.
crates/ty_python_semantic/src/types/tuple.rs:2528
↓ 13 callers
Method
as_ref
(&self)
crates/ruff_db/src/files/path.rs:106
↓ 13 callers
Method
as_typed_dict
(self)
crates/ty_python_semantic/src/types.rs:3232
↓ 13 callers
Method
assert_reverse_tokenization
(&self)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:15
↓ 13 callers
Method
at_expr
Returns `true` if the current token is the start of an expression.
crates/ruff_python_parser/src/parser/expression.rs:136
↓ 13 callers
Method
at_ts
Returns `true` if the current token is found in the given token set.
crates/ruff_python_parser/src/parser/mod.rs:673
↓ 13 callers
Method
binding
(&self)
crates/ty_python_core/src/use_def/place_state.rs:414
↓ 13 callers
Method
binding_ids
Returns the IDs of all bindings defined in this scope.
crates/ruff_python_semantic/src/scope.rs:98
↓ 13 callers
Function
class_member
Infer the public type of a class member/symbol (its type as seen from outside its scope) in the given `scope`.
crates/ty_python_semantic/src/types/member.rs:70
↓ 13 callers
Method
config
(mut self, config: &'a Path)
crates/ruff/tests/integration_test.rs:45
↓ 13 callers
Function
create_typevars
( db: &'db TestDb, names: [&'static str; N], )
crates/ty_python_semantic/src/types/generics.rs:5134
↓ 13 callers
Method
encoding
(&self)
crates/ruff_server/src/session.rs:200
↓ 13 callers
Method
entries
(&mut self, entries: I)
crates/ruff_python_formatter/src/builders.rs:190
↓ 13 callers
Method
enum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:760
↓ 13 callers
Method
enum_class_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/literal.rs:427
↓ 13 callers
Function
error
()
crates/ruff_linter/resources/test/fixtures/flake8_pytest_style/PT022.py:15
↓ 13 callers
Method
error
Return the underlying [`ParseError`].
crates/ruff_linter/src/logging.rs:232
↓ 13 callers
Method
expect_ty_file
Returns the [`File`] attached to this [`Span`]. Panics if the file is a [`UnifiedFile::Ruff`] instead of a [`UnifiedFile::Ty`].
crates/ruff_db/src/diagnostic/mod.rs:1244
↓ 13 callers
Method
explicit_bases
Return an iterator over the inferred types of this class's *explicit* bases. Note that any class (except for `object`) that has no explicit bases wil
crates/ty_python_semantic/src/types/class/static_literal.rs:708
↓ 13 callers
Method
file
The file to the source code that defines this module This is `None` for namespace packages.
crates/ty_module_resolver/src/module.rs:76
↓ 13 callers
Method
file
Returns the `UnifiedFile` attached to this `Span`.
crates/ruff_db/src/diagnostic/mod.rs:1218
↓ 13 callers
Method
filter_union
If the type is a union (or a type alias that resolves to a union), filters union elements based on the provided predicate. Aliases among the elements
crates/ty_python_semantic/src/types.rs:3653
↓ 13 callers
Function
foo
(a, b)
crates/ruff_linter/resources/test/fixtures/ruff/RUF069.py:18
↓ 13 callers
Method
get
Return parameter at given index, or `None` if index is out-of-range.
crates/ty_python_semantic/src/types/signatures.rs:5672
↓ 13 callers
Method
includes
Returns `true` if the string list of `codes` includes `code` (or an alias thereof).
crates/ruff_linter/src/noqa.rs:135
↓ 13 callers
Function
infer_complete_scope_types
Infer all types for a [`ScopeId`], including all definitions and expressions in that scope. Use when checking a scope, or needing to provide a type fo
crates/ty_python_semantic/src/types/infer.rs:498
↓ 13 callers
Method
inferable_typevars
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/generics.rs:547
↓ 13 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/signatures.rs:634
↓ 13 callers
Method
into_type_var
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:187
↓ 13 callers
Method
into_uri
Converts the key back into its original URI.
crates/ruff_server/src/edit.rs:55
↓ 13 callers
Function
into_vec
(assertions: InlineFileAssertions<'_>)
crates/mdtest/src/assertion.rs:567
↓ 13 callers
Method
is_bound
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:12996
↓ 13 callers
Method
is_empty
(&self)
crates/ruff_linter/src/noqa.rs:341
↓ 13 callers
Method
is_instance_of
Return `true` if `self` is a nominal instance of the given known class.
crates/ty_python_semantic/src/types/instance.rs:149
↓ 13 callers
Method
is_keyword
(self)
crates/ruff_python_ast/src/token.rs:359
↓ 13 callers
Function
is_override
Returns `true` if a function definition is an `@override` (PEP 698).
crates/ruff_python_semantic/src/analyze/visibility.rs:37
↓ 13 callers
Method
is_required
(&self)
crates/ty_python_semantic/src/types/class.rs:2808
↓ 13 callers
Method
is_subtype_of_class_literal
Return `true` if this class is a subtype of (any specialization of) `class_literal`.
crates/ty_python_semantic/src/types/class.rs:1361
↓ 13 callers
Method
is_type_var
(self)
crates/ty_python_semantic/src/types/typevar.rs:44
↓ 13 callers
Method
is_union
(self)
crates/ty_python_semantic/src/types.rs:3266
↓ 13 callers
Method
item
Returns the field exposed by a literal key. Undeclared keys synthesize a field only for explicit extra items. Hidden items on an implicitly open `Typ
crates/ty_python_semantic/src/types/typed_dict.rs:415
↓ 13 callers
Method
iter_prefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1229
↓ 13 callers
Method
len
(&self)
crates/ty_python_semantic/src/types/signatures.rs:5635
↓ 13 callers
Method
line_starts
Returns the [byte offsets](TextSize) for every line
crates/ruff_source_file/src/line_index.rs:533
↓ 13 callers
Method
lookup_symbol
Lookup a symbol in the current scope without materializing lazy builtins.
crates/ruff_python_semantic/src/model.rs:819
↓ 13 callers
Method
name
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:372
↓ 13 callers
Method
normalize_path
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:371
↓ 13 callers
Method
open_text_document
Send a `textDocument/didOpen` notification
crates/ruff_server/tests/e2e/main.rs:690
↓ 13 callers
Method
opener_len
The total length of the string's opener, i.e., the length of the prefixes plus the length of the quotes used to open the string.
crates/ruff_python_ast/src/nodes.rs:1027
↓ 13 callers
Function
parameter_documentation
Returns the parameter documentation recognized in a reST docstring. `normalized_source` must have already undergone PEP-257 trimming and universal ne
crates/ty_ide/src/docstring/document/rst.rs:38
↓ 13 callers
Method
parse_conditional_expression_or_higher
Parses every Python expression except unparenthesized tuple and named expressions. Matches the `expression` rule in the [Python grammar]. This uses
crates/ruff_python_parser/src/parser/expression.rs:204
↓ 13 callers
Method
pop
(&mut self)
crates/ruff_formatter/src/printer/stack.rs:14
↓ 13 callers
Method
primary_annotation
Returns a shared borrow of the "primary" annotation of this diagnostic if one exists. When there are multiple primary annotations, then the first one
crates/ruff_db/src/diagnostic/mod.rs:302
↓ 13 callers
Method
program_settings
(&self)
crates/ty_python_core/src/db.rs:124
↓ 13 callers
Method
push
(&mut self, line_number: OneIndexed, messages: Vec<Failure>)
crates/mdtest/src/matcher.rs:43
↓ 13 callers
Function
pytest_cursor_test_builder
()
crates/ty_ide/src/find_references.rs:3444
↓ 13 callers
Method
query
Loads this constraint set into a new builder, invokes a callback with that builder, and returns the result. This is more efficient than [`ConstraintS
crates/ty_python_semantic/src/types/constraints.rs:321
↓ 13 callers
Method
range
(&self)
crates/ruff_python_formatter/src/lib.rs:115
↓ 13 callers
Method
remove
Removes `rule` from the set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let mut set = RuleSet::from_rules(&[Rule::AmbiguousFun
crates/ruff_linter/src/registry/rule_set.rs:229
↓ 13 callers
Method
resolve_member
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:392
↓ 13 callers
Method
resolved_client_capabilities
Returns the resolved client capabilities that were captured during initialization.
crates/ty_server/src/session.rs:1576
↓ 13 callers
Method
return_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:11231
↓ 13 callers
Method
root
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:368
↓ 13 callers
Method
root
Returns the path to the test directory root.
crates/ruff/tests/cli/main.rs:179
↓ 13 callers
Method
run
(self)
crates/ty_site_packages/src/lib.rs:2571
↓ 13 callers
Method
secondary_code
Returns the secondary code for the diagnostic if it exists. The "primary" code for the diagnostic is its lint name. Diagnostics in ty don't have seco
crates/ruff_db/src/diagnostic/mod.rs:450
↓ 13 callers
Method
set
Sets the indexed files of a package to `files`.
crates/ty_project/src/files.rs:147
↓ 13 callers
Method
set
(&mut self, name: impl Into<String>, value: impl Into<String>)
crates/ruff_db/src/system/command.rs:131
↓ 13 callers
Method
skip_bytes
(&mut self, count: usize)
crates/ruff_python_trivia/src/cursor.rs:187
↓ 13 callers
Method
snapshot
Generate a [`Snapshot`] of the current semantic model.
crates/ruff_python_semantic/src/model.rs:2083
↓ 13 callers
Function
space
()
crates/ruff_formatter/src/builders.rs:664
↓ 13 callers
Method
speculate
Returns a fresh [`TypeInferenceBuilder`] for the current scope that can be used to speculatively infer expressions during multi-inference. The infere
crates/ty_python_semantic/src/types/infer/builder.rs:12794
↓ 13 callers
Function
suffixed_err
Return a `TOMLDecodeError` where error message is suffixed with coordinates in source.
crates/ruff_benchmark/resources/tomllib/_parser.py:652
↓ 13 callers
Method
to_zero_indexed
Return the zero-indexed primitive value for this [`OneIndexed`]
crates/ruff_source_file/src/line_index.rs:604
↓ 13 callers
Function
uv_sync_command
( case: &CliTest, virtual_env: Option<&Path>, )
crates/ty/tests/cli/uv_workspace.rs:70
↓ 13 callers
Function
walk_body
(visitor: &mut V, body: &'a [Stmt])
crates/ruff_python_ast/src/visitor.rs:119
↓ 13 callers
Method
with_expected_type
(self, expected_type: Option<Type<'db>>)
crates/ty_python_semantic/src/types/infer/type_context.rs:128
← previous
next →
1,201–1,300 of 31,766, ranked by callers