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
↓ 11 callers
Method
with_quote_style
(mut self, quote_style: Quote)
crates/ruff_python_ast/src/nodes.rs:1127
↓ 11 callers
Method
with_real_uv
(mut self, use_uv: UseUv)
crates/ty_server/tests/e2e/main.rs:1361
↓ 11 callers
Method
with_watched_file_support
Enable dynamic file watching, optionally with relative patterns.
crates/ty_server/tests/e2e/main.rs:1508
↓ 11 callers
Method
write_file
( &self, relative_path: impl AsRef<SystemPath>, content: &str, )
crates/ty/tests/file_watching.rs:397
↓ 10 callers
Method
absolute
Resolves the absolute path for `self` based on its origin.
crates/ty_project/src/metadata/value.rs:65
↓ 10 callers
Method
add
(&mut self, line_range: TextRange)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:564
↓ 10 callers
Method
add_declaration_with_binding
( &mut self, node: AnyNodeRef, definition: Definition<'db>, declared_and_infer
crates/ty_python_semantic/src/types/infer/builder.rs:1906
↓ 10 callers
Method
add_substitution
( &mut self, substituted: AtomicConstraint<'db>, ante: AtomicConstraint<'db>,
crates/ty_python_semantic/src/types/constraints/sequents.rs:351
↓ 10 callers
Method
alias
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/recursive.rs:505
↓ 10 callers
Method
as_notebook
(&self)
crates/ty_server/src/session/index.rs:268
↓ 10 callers
Method
as_str
Returns the string representation of the quote style.
crates/ruff_python_formatter/src/options.rs:278
↓ 10 callers
Method
as_union_like
Returns `Some(UnionType)` if this type behaves like a union. Apart from explicit unions, this returns `Some` for `TypeAlias`es of unions and `NewType`
crates/ty_python_semantic/src/types.rs:3146
↓ 10 callers
Function
assert_function_query_was_not_run_by_name
( db: &Db, query_name: &str, input: Option<salsa::Id>, events: &[salsa::Event], )
crates/ruff_db/src/testing.rs:53
↓ 10 callers
Function
assert_notebook_path
( path: impl AsRef<Path>, expected: impl AsRef<Path>, settings: &LinterSettings, )
crates/ruff_linter/src/test.rs:186
↓ 10 callers
Method
assignability_error_context
Re-run the assignability check with error context collection enabled. This should normally be called when `is_assignable_to` has returned `false` and
crates/ty_python_semantic/src/types/relation.rs:505
↓ 10 callers
Function
before_main
()
crates/ruff_wasm/src/lib.rs:206
↓ 10 callers
Method
bind_self_typevars
Bind `Self` type variables in this type to a concrete self type. Uses MRO-based matching: a `Self` typevar is only bound if its owner class is in the
crates/ty_python_semantic/src/types.rs:2613
↓ 10 callers
Method
cache_key
(&self, state: &mut CacheKeyHasher)
crates/ruff_cache/src/globset.rs:6
↓ 10 callers
Method
calculate_source_orders
( &self, source_order: Option<SourceOrderId>, )
crates/ty_python_semantic/src/types/constraints.rs:1576
↓ 10 callers
Method
cell_index
Attach a Jupyter notebook cell index.
crates/ruff_annotate_snippets/src/snippet.rs:301
↓ 10 callers
Method
chars
(&self)
crates/ruff_python_trivia/src/cursor.rs:33
↓ 10 callers
Method
check
Checks all open files
crates/ty_wasm/src/lib.rs:281
↓ 10 callers
Method
class_member_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, po
crates/ty_python_semantic/src/types.rs:4487
↓ 10 callers
Method
closer_len
The total length of the string's closer. This is always equal to `self.quote_len()`, except when the string is unclosed, in which case the length is z
crates/ruff_python_ast/src/nodes.rs:1021
↓ 10 callers
Method
command
(&self)
crates/ty/tests/common/mod.rs:149
↓ 10 callers
Method
completions
Returns the underlying completions if the convenience assertions aren't sufficiently expressive.
crates/ty_ide/src/completion.rs:11794
↓ 10 callers
Function
compute
()
crates/ty_python_semantic/resources/corpus/match_guard_type_alias_cycle_seed_77.py:16
↓ 10 callers
Function
create_typevars
( db: &'db TestDb, names: [&'static str; N], )
crates/ty_python_semantic/src/types/generics.rs:5113
↓ 10 callers
Method
current_statement_parent_id
Return the [`NodeId`] of the current [`Stmt`] parent, if any.
crates/ruff_python_semantic/src/model.rs:1525
↓ 10 callers
Method
debug
Parse all suppressions and errors in a module for testing
crates/ruff_linter/src/suppression.rs:2974
↓ 10 callers
Method
defining_class
( db: &'db dyn Db, callable_type: Type<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:9887
↓ 10 callers
Method
definitions
Returns the definitions found for the name.
crates/ty_python_semantic/src/place/definitions.rs:161
↓ 10 callers
Method
domain
(self)
crates/ty_python_semantic/src/types/equality/enums.rs:974
↓ 10 callers
Method
end
(&self)
crates/ruff_source_file/src/newlines.rs:223
↓ 10 callers
Method
entries
Iterates over entries in a system or vendored directory.
crates/ty_module_resolver/src/path.rs:326
↓ 10 callers
Function
exception
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET504.py:175
↓ 10 callers
Method
expression_value
Return the value expression after peeling off any nested named expressions. For example, this returns the `x` expression for both `x` and `(y := x)`.
crates/ruff_python_ast/src/nodes.rs:91
↓ 10 callers
Method
fallback
Returns the descriptor's declared return type and kind despite the invalid call.
crates/ty_python_semantic/src/types.rs:875
↓ 10 callers
Method
file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:339
↓ 10 callers
Method
find_argument
Return the argument with the given name or at the given position, or `None` if no such argument exists. Used to retrieve arguments that can be provide
crates/ruff_python_ast/src/nodes.rs:3776
↓ 10 callers
Method
finite_alternative_union
Return the exact finite alternative union represented by this intersection, if available.
crates/ty_python_semantic/src/types/set_theoretic.rs:1066
↓ 10 callers
Method
flags
(self)
crates/ty_python_semantic/src/types/literal.rs:107
↓ 10 callers
Function
full_range
(input: &str)
crates/ty_server/tests/e2e/code_actions.rs:35
↓ 10 callers
Function
fun
(n)
crates/ty_python_semantic/resources/corpus/55_list_comp_nested.py:1
↓ 10 callers
Method
get
Returns the value as a primitive type.
crates/ruff_source_file/src/line_index.rs:599
↓ 10 callers
Method
get_message
Returns the message attached to this annotation, if one exists.
crates/ruff_db/src/diagnostic/mod.rs:877
↓ 10 callers
Function
group
(content: &impl Format<Context>)
crates/ruff_formatter/src/builders.rs:1407
↓ 10 callers
Method
has
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:280
↓ 10 callers
Method
has_dataclass_param
Checks if the given dataclass parameter flag is set for this class. This checks both the `dataclass_params` and `transformer_params`.
crates/ty_python_semantic/src/types/class/static_literal.rs:1240
↓ 10 callers
Method
has_trailing_own_line
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:345
↓ 10 callers
Function
has_unknown_keywords_or_starred_expr
( arguments: &Arguments, allowed: &[&str], )
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:199
↓ 10 callers
Function
import_from
()
crates/ty_python_core/src/lib.rs:1371
↓ 10 callers
Method
in_type_definition
Return `true` if the model is in a type definition.
crates/ruff_python_semantic/src/model.rs:2119
↓ 10 callers
Method
inference_lower
Returns lower-bound inference evidence without supplying a default for a missing bound.
crates/ty_python_semantic/src/types/constraints.rs:3445
↓ 10 callers
Method
info
Adds an "info" sub-diagnostic with the given message. If callers want to add an "info" sub-diagnostic with annotations, then create a [`SubDiagnostic
crates/ruff_db/src/diagnostic/mod.rs:174
↓ 10 callers
Method
into_callable_type
Converts the wrapped value into a single callable with its receiver bound and `typing.Self` substituted. Returns `None` if the wrapped value cannot b
crates/ty_python_semantic/src/types/method.rs:302
↓ 10 callers
Method
into_generic_alias
(self)
crates/ty_python_semantic/src/types/class.rs:1196
↓ 10 callers
Method
into_owned
Creates an [`OwnedConstraintSet`], consuming this builder in the process. You provide a callback that constructs a [`ConstraintSet`]. We then package
crates/ty_python_semantic/src/types/constraints.rs:1222
↓ 10 callers
Method
into_suite
Consumes the [`Parsed`] output and returns the module body as a [`Suite`].
crates/ruff_python_parser/src/lib.rs:541
↓ 10 callers
Function
is_abstract
Returns `true` if a function definition is an abstract method based on its decorators.
crates/ruff_python_semantic/src/analyze/visibility.rs:44
↓ 10 callers
Method
is_assignability
(self)
crates/ty_python_semantic/src/types/relation.rs:175
↓ 10 callers
Method
is_covariant
(self)
crates/ty_python_semantic/src/types/variance.rs:184
↓ 10 callers
Method
is_empty
(&self)
crates/ty/src/args.rs:344
↓ 10 callers
Method
is_empty
(&self)
crates/ruff_linter/src/settings/types.rs:822
↓ 10 callers
Function
is_human_readable_names_enabled
https://github.com/astral-sh/ruff/pull/25614 TODO(brent) Remove ecosystem selector normalization when stabilizing human-readable rule names: https://g
crates/ruff_linter/src/preview.rs:345
↓ 10 callers
Method
is_in_type_checking_block
(&self, scope: ScopeId<'db>, node: impl Ranged)
crates/ty_python_semantic/src/types/infer/builder.rs:954
↓ 10 callers
Method
is_local
Is the symbol defined in this scope, vs referring to some enclosing scope? There are three common cases where a name refers to an enclosing scope: 1
crates/ty_python_core/src/symbol.rs:123
↓ 10 callers
Method
is_paramspec_value
(&self)
crates/ty_python_semantic/src/types/signatures.rs:992
↓ 10 callers
Method
is_required
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:3257
↓ 10 callers
Method
is_staticmethod
Returns true if this overload is decorated with `@staticmethod`, or if it is implicitly a staticmethod.
crates/ty_python_semantic/src/types/function.rs:363
↓ 10 callers
Method
is_structural
(self)
crates/ty_python_semantic/src/types/match_pattern.rs:38
↓ 10 callers
Method
is_subscript_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2577
↓ 10 callers
Function
is_type_checking_block
Return `true` if [`ast::StmtIf`] is a guard for a type-checking block.
crates/ruff_python_semantic/src/analyze/typing.rs:438
↓ 10 callers
Method
iter_keys
Returns an `Iterator` over the AST nodes representing the dictionary's keys.
crates/ruff_python_ast/src/nodes.rs:240
↓ 10 callers
Method
iterate
Returns a tuple spec describing the elements that are produced when iterating over `self`. This method should only be used outside of type checking b
crates/ty_python_semantic/src/types/iteration.rs:214
↓ 10 callers
Method
join_root_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:383
↓ 10 callers
Method
kind
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:323
↓ 10 callers
Method
kind
The `kind` of the section, e.g. [`SectionKind::Args`] or [`SectionKind::Returns`].
crates/ruff_linter/src/docstrings/sections.rs:330
↓ 10 callers
Method
known_class
Returns the [`KnownClass`] that this is a nominal instance of, or `None` if it is not an instance of a known class.
crates/ty_python_semantic/src/types/instance.rs:263
↓ 10 callers
Function
leading_indentation
Extract the leading indentation from a line.
crates/ruff_python_trivia/src/whitespace.rs:93
↓ 10 callers
Method
len
(&self)
crates/ruff_source_file/src/newlines.rs:326
↓ 10 callers
Method
len
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/generics.rs:920
↓ 10 callers
Method
make_key
Retrieve the original key that describes this document query.
crates/ruff_server/src/session/index.rs:546
↓ 10 callers
Method
materialize
Applies both constraint kinds between the place's last materialized nodes and `target`. The place's node must be an ancestor of `target`. After mater
crates/ty_python_core/src/use_def.rs:1819
↓ 10 callers
Method
may_be_true
(self)
crates/ty_python_core/src/lib.rs:1005
↓ 10 callers
Method
member_lookup_with_policy_and_receiver
Perform member lookup while optionally binding descriptors and `Self` to a more precise receiver than the type whose members are being searched. Inte
crates/ty_python_semantic/src/types.rs:5997
↓ 10 callers
Method
metadata
(&self, path: impl AsRef<VendoredPath>)
crates/ruff_db/src/vendored.rs:74
↓ 10 callers
Method
next
(&mut self)
crates/ruff_python_trivia/src/tokenizer.rs:801
↓ 10 callers
Method
next_index
(&self)
crates/ruff_index/src/vec.rs:69
↓ 10 callers
Method
no_name
Do not show the [`Level`]s name Useful for: - Another layer of the application will include the level (e.g. when rendering errors) - [`Message`]s tha
crates/ruff_annotate_snippets/src/level.rs:211
↓ 10 callers
Function
normalized
(raw: &str)
crates/ty_ide/src/docstring/document/numpy.rs:1379
↓ 10 callers
Method
opposite
(self)
crates/ruff_linter/src/rules/flake8_quotes/settings.rs:67
↓ 10 callers
Method
parse_body
Parses the body of the given [`Clause`]. This could either be a single statement that's on the same line as the clause header or an indented block.
crates/ruff_python_parser/src/parser/statement.rs:3108
↓ 10 callers
Method
parse_identifier
Parses an identifier. For an invalid identifier, the `id` field will be an empty string. See: <https://docs.python.org/3/reference/expressions.html#
crates/ruff_python_parser/src/parser/expression.rs:501
↓ 10 callers
Method
parts
Returns an iterator over the [`StringLikePart`] contained in this string-like expression.
crates/ruff_python_ast/src/expression.rs:98
↓ 10 callers
Method
path
(&self, relative_path: &str)
crates/ruff_db/src/system/os/ignore.rs:58
↓ 10 callers
Function
pending_place_state_mut
( place: ScopedPlaceId, symbol_states: &'a mut IndexVec<ScopedSymbolId, PendingPlaceState>, member
crates/ty_python_core/src/use_def.rs:2018
↓ 10 callers
Method
position_encoding
(&self)
crates/ty_server/src/session.rs:1485
↓ 10 callers
Function
public_test
(code: &str)
crates/ty_ide/src/symbols.rs:3277
↓ 10 callers
Method
push_trailing
Pushes a *trailing* part for `key`.
crates/ruff_python_formatter/src/comments/map.rs:146
← previous
next →
1,501–1,600 of 31,562, ranked by callers