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
↓ 8 callers
Method
as_assign_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:584
↓ 8 callers
Method
as_enum_literal
(self)
crates/ty_python_semantic/src/types.rs:3354
↓ 8 callers
Method
as_int_literal
(self)
crates/ty_python_semantic/src/types.rs:3328
↓ 8 callers
Method
as_ipy_notebook
(&self)
crates/ruff_linter/src/source_kind.rs:34
↓ 8 callers
Method
as_protocol_instance
(self)
crates/ty_python_semantic/src/types.rs:3193
↓ 8 callers
Method
as_str
(&self)
crates/ruff_python_ast/src/name.rs:96
↓ 8 callers
Method
as_str
(self)
crates/ty_python_semantic/src/types/diagnostic.rs:2559
↓ 8 callers
Method
as_string
(self)
crates/ty_python_semantic/src/types/literal.rs:205
↓ 8 callers
Function
assert_revealed_type
(db: &TestDb, filename: &str, expected: &str)
crates/ty_python_semantic/src/types/infer/tests.rs:81
↓ 8 callers
Function
assert_workspace_diagnostics_suspends_for_long_polling
( server: &mut TestServer, request_id: &lsp_server::RequestId, )
crates/ty_server/tests/e2e/pull_diagnostics.rs:1579
↓ 8 callers
Method
at_offset
Searches the token(s) at `offset`. Returns [`TokenAt::Between`] if `offset` points directly inbetween two tokens (the left token ends at `offset` and
crates/ruff_python_ast/src/token/tokens.rs:92
↓ 8 callers
Method
at_top_level
Return `true` if the model is at the top level of the module (i.e., in the module scope, and not nested within any statements).
crates/ruff_python_semantic/src/model.rs:1809
↓ 8 callers
Function
bind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured.rs:1100
↓ 8 callers
Method
bind_self_with_receiver
Binds the receiver using its runtime type while using `typing_self_type` to replace occurrences of `typing.Self`. These differ for class methods: the
crates/ty_python_semantic/src/types/signatures.rs:501
↓ 8 callers
Method
binding_type
Return the inferred binding type. A missing entry is `Never` when the whole pattern cannot match. Otherwise, it is `Unknown` as defensive recovery fo
crates/ty_python_semantic/src/types/narrow.rs:233
↓ 8 callers
Method
bindings
Returns a tuple of the name and ID of all bindings defined in this scope.
crates/ruff_python_semantic/src/scope.rs:103
↓ 8 callers
Method
bindings_iterator
( &'map self, bindings: &'map [LiveBinding], boundness_analysis: BoundnessAnalysis,
crates/ty_python_core/src/use_def.rs:1465
↓ 8 callers
Method
block_comments
Given a [`CommentRanges`], determine which comments are grouped together in "comment blocks". A "comment block" is a sequence of consecutive own-line
crates/ruff_python_trivia/src/comment_ranges.rs:157
↓ 8 callers
Method
build
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:3335
↓ 8 callers
Method
callable
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:81
↓ 8 callers
Method
callable_type_kind
Return the kind for this function when it is converted into a [`CallableType`].
crates/ty_python_semantic/src/types/function.rs:2060
↓ 8 callers
Function
check_display_graph
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, set: ConstraintSet<'db, 'c>
crates/ty_python_semantic/src/types/constraints.rs:6657
↓ 8 callers
Method
check_types
Check types for all bindings in this constructor. If `CheckTypesMode::Finalize` is provided, inactive downstream constructors will be discarded. Othe
crates/ty_python_semantic/src/types/call/bind/constructor.rs:223
↓ 8 callers
Method
class_literal
Returns the class literal for this instance.
crates/ty_python_semantic/src/types/instance.rs:253
↓ 8 callers
Method
class_member
Look up a class-level member by iterating through the MRO.
crates/ty_python_semantic/src/types/class.rs:738
↓ 8 callers
Method
class_member
Look up a class-level member by name (including superclasses).
crates/ty_python_semantic/src/types/class/typed_dict.rs:1021
↓ 8 callers
Method
class_method
(cls)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N804.py:17
↓ 8 callers
Method
clear_salsa_events
Clears the salsa events.
crates/ty_module_resolver/src/db.rs:84
↓ 8 callers
Method
clone
(&self)
crates/ruff_unicode_names2/src/lib.rs:114
↓ 8 callers
Method
cmp
(&self, other: &Self)
crates/ruff_source_file/src/lib.rs:189
↓ 8 callers
Method
contains_inclusive
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:184
↓ 8 callers
Method
current_exception_context_stack
Retrieve the [`ExceptionContextStack`] that is relevant for the current scope.
crates/ty_python_core/src/builder/except_handlers.rs:221
↓ 8 callers
Method
current_place_table
(&self)
crates/ty_python_core/src/builder.rs:1068
↓ 8 callers
Method
current_statement_id
Return the [`NodeId`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1520
↓ 8 callers
Method
dataclass_params
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:218
↓ 8 callers
Method
deprecated_properties
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1137
↓ 8 callers
Function
deserialize
()
crates/ruff_workspace/src/pyproject.rs:288
↓ 8 callers
Function
deserialize_fixture
(content: &str)
crates/ruff_server/src/session/options.rs:520
↓ 8 callers
Method
document_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:791
↓ 8 callers
Function
document_symbols
Get all document symbols for a file with the given options.
crates/ty_ide/src/document_symbols.rs:6
↓ 8 callers
Method
domain
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1119
↓ 8 callers
Method
downstream_constructor
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:325
↓ 8 callers
Method
downstream_constructor_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:329
↓ 8 callers
Method
eat_char
(&mut self, c: char)
crates/ruff_python_parser/src/lexer/cursor.rs:104
↓ 8 callers
Function
empty_line
()
crates/ruff_formatter/src/builders.rs:133
↓ 8 callers
Method
enable_diagnostic_dynamic_registration
Enable or disable dynamic registration of diagnostics capability
crates/ty_server/tests/e2e/main.rs:1451
↓ 8 callers
Method
end_of_scope_bindings
( &self, place: ScopedPlaceId, )
crates/ty_python_core/src/use_def.rs:1212
↓ 8 callers
Method
enter
Returns the type bound from a context manager with type `self`. This method should only be used outside of type checking because it omits any errors.
crates/ty_python_semantic/src/types/context_manager.rs:156
↓ 8 callers
Method
enter_string_annotation
Given a string expression, determine if it's a string annotation, and if it is, yield the parsed sub-AST and a sub-model that knows it's analyzing a s
crates/ty_python_semantic/src/semantic_model.rs:592
↓ 8 callers
Method
environment
(&self)
crates/ty_project/src/uv/metadata.rs:41
↓ 8 callers
Method
error
()
crates/ruff_linter/resources/test/fixtures/flake8_raise/RSE102.py:58
↓ 8 callers
Method
evaluate
Evaluate a comparison recursively, treating `left` as the operand being constrained. For example, proving that every constraint of `EQUAL_VALUES` com
crates/ty_python_semantic/src/types/equality.rs:579
↓ 8 callers
Function
exactly_one_argument_with_matching_function
( name: &str, func: &Expr, args: &'a [Expr], keywords: &[Keyword], )
crates/ruff_linter/src/rules/flake8_comprehensions/helpers.rs:3
↓ 8 callers
Method
execution_context
Return the [`ExecutionContext`] of the current scope.
crates/ruff_python_semantic/src/model.rs:2081
↓ 8 callers
Method
expand_top_level_aliases
Resolve outermost aliases and expand aliases that expose top-level union elements. Aliases nested inside non-union types remain unexpanded.
crates/ty_python_semantic/src/types.rs:3120
↓ 8 callers
Method
expect_function
(&self)
crates/ty_python_core/src/scope.rs:433
↓ 8 callers
Method
extend_back
(&mut self, elements: &'a [FormatElement])
crates/ruff_formatter/src/printer/queue.rs:105
↓ 8 callers
Method
extra
(&self)
crates/ty_python_core/src/use_def.rs:1045
↓ 8 callers
Function
extract
(metadata: &Value)
crates/ty_project/src/uv/metadata/dependencies.rs:419
↓ 8 callers
Function
extract_fixed_length_iterable_element_types
Extract the element types from an expression with a statically known fixed-length iteration. List and tuple literals are expanded directly so we pres
crates/ty_python_semantic/src/types/iteration.rs:136
↓ 8 callers
Function
f
(*args, **kwargs)
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/call.py:4
↓ 8 callers
Method
file_range
(&self)
crates/ty_ide/src/lib.rs:96
↓ 8 callers
Method
file_stem
(&self)
crates/ruff_db/src/system/path.rs:304
↓ 8 callers
Method
file_type
(&self)
crates/ruff_db/src/system.rs:321
↓ 8 callers
Method
find_first
Finds the first node that fully covers the range and fulfills the given predicate. The "first" here means that the node closest to a leaf is returned
crates/ruff_python_ast/src/find_node.rs:90
↓ 8 callers
Method
find_legacy_typevars
Locates any legacy `TypeVar`s in this type, and adds them to a set. This is used to build up a generic context from any legacy `TypeVar`s that appear
crates/ty_python_semantic/src/types.rs:10351
↓ 8 callers
Function
find_newline
(text: &str)
crates/ruff_source_file/src/newlines.rs:58
↓ 8 callers
Method
finish
Finish the code example by generating any final actions if applicable. This typically adds an action when the end of a code example coincides with th
crates/ruff_python_formatter/src/string/docstring.rs:743
↓ 8 callers
Method
fix_applicability
The lowest fix applicability to show when rendering.
crates/ruff_db/src/diagnostic/render.rs:2577
↓ 8 callers
Method
flip
Flips the polarity of the variance. Covariant becomes contravariant, contravariant becomes covariant, others remain unchanged.
crates/ty_python_semantic/src/types/variance.rs:175
↓ 8 callers
Method
flush_pending_line
Flushes content buffered for the current line.
crates/ty_ide/src/docstring/markdown/general.rs:308
↓ 8 callers
Method
fmt
(&self, item: &Identifier, f: &mut PyFormatter)
crates/ruff_python_formatter/src/other/identifier.rs:11
↓ 8 callers
Function
format
( document: &TextDocument, source_type: SourceType, formatter_settings: &FormatterSettings, pa
crates/ruff_server/src/format.rs:47
↓ 8 callers
Method
format
(&self)
crates/ruff_python_formatter/src/statement/mod.rs:74
↓ 8 callers
Method
format
(&self, file_id: &FileHandle)
crates/ty_wasm/src/lib.rs:298
↓ 8 callers
Method
formatted
Converts every item to an object that knows how to format it.
crates/ruff_python_formatter/src/shared_traits.rs:70
↓ 8 callers
Method
full_end
(&self)
crates/ruff_source_file/src/newlines.rs:217
↓ 8 callers
Method
full_line_range
Computes the range of this `offset`s line. The range starts at the beginning of the line and goes up to, and including, the new line character at the
crates/ruff_source_file/src/line_ranges.rs:98
↓ 8 callers
Method
full_lines_range
Computes the range of all lines that this `range` covers. The range starts at the beginning of the line at `range.start()` and goes up to, and includ
crates/ruff_source_file/src/line_ranges.rs:193
↓ 8 callers
Function
function_known_decorators
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:322
↓ 8 callers
Method
function_like_kind
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:25
↓ 8 callers
Method
generate
(self)
crates/ruff_python_codegen/src/generator.rs:238
↓ 8 callers
Method
get
(&self, item: &T)
crates/ty_python_semantic/src/types/cyclic.rs:1153
↓ 8 callers
Function
get_function_f
(db: &'db TestDb, file: &'static str)
crates/ty_python_semantic/src/types/signatures.rs:6750
↓ 8 callers
Method
get_or_infer_expression
Return an already-inferred type for `expr`, or infer it with `tcx` if needed. This is used in places where an expression may already have been inferr
crates/ty_python_semantic/src/types/infer/builder.rs:1090
↓ 8 callers
Function
get_redirect_target
Returns the redirect target for a rule code, prefix, or name.
crates/ruff_linter/src/rule_redirects.rs:7
↓ 8 callers
Method
global_scope
Returns a reference to the global [`Scope`].
crates/ruff_python_semantic/src/model.rs:1530
↓ 8 callers
Method
has_default
Returns whether this parameter has a default without inferring its type.
crates/ty_python_semantic/src/types/signatures.rs:6477
↓ 8 callers
Method
has_valid_syntax
Returns `true` if the parsed source code is valid i.e., it has no [`ParseError`]s. Note that this does not include version-related [`UnsupportedSynta
crates/ruff_python_parser/src/lib.rs:438
↓ 8 callers
Method
id
(self)
crates/ruff_linter/resources/test/fixtures/flake8_builtins/A001.py:38
↓ 8 callers
Method
import
Create a new `ImportRequest` from a module and member. If not present in the scope, the symbol should be imported using the "import" statement.
crates/ruff_linter/src/importer/mod.rs:630
↓ 8 callers
Method
includes_member
(self, db: &'db dyn Db, name: &str)
crates/ty_python_semantic/src/types/protocol_class.rs:524
↓ 8 callers
Function
indentation
Calculates indentation width, advancing tabs to the next multiple of eight columns.
crates/ty_ide/src/docstring/document/syntax.rs:626
↓ 8 callers
Method
index
Returns a reference to the contained index. # Panics Panics if the index is `None`.
crates/ty_server/src/system.rs:119
↓ 8 callers
Method
infer_collection_literal
Infer the type of a collection literal expression.
crates/ty_python_semantic/src/types/infer/builder.rs:7895
↓ 8 callers
Method
intern_typevar
Interns a single typevar, giving it a stable order in this builder
crates/ty_python_semantic/src/types/constraints.rs:1285
↓ 8 callers
Method
into_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:709
↓ 8 callers
Method
is_
(self, key: Key, flag: int)
crates/ruff_benchmark/resources/tomllib/_parser.py:175
↓ 8 callers
Function
is_cased_uppercase
Return `true` if a string is _cased_ as uppercase. A string is cased as uppercase if it contains at least one uppercase character and no lowercase ch
crates/ruff_python_stdlib/src/str.rs:129
↓ 8 callers
Method
is_defined_and
(self, f: impl Fn(Definition<'db>) -> bool)
crates/ty_python_core/src/definition.rs:323
← previous
next →
1,801–1,900 of 31,562, ranked by callers