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
↓ 2 callers
Function
synthesize_typed_dict_no_argument_method
( db: &'db dyn Db, typed_dict: TypedDictType<'db>, return_ty: Type<'db>, )
crates/ty_python_semantic/src/types/class/typed_dict.rs:716
↓ 2 callers
Method
system_mut
Returns a mutable reference to the system. WARNING: Triggers a new revision, canceling other database handles. This can lead to deadlock.
crates/ty_project/src/db.rs:279
↓ 2 callers
Method
system_path
(&self)
crates/ty_project/src/watch.rs:106
↓ 2 callers
Function
tab_offset_u32
Returns the number of columns from `column` to the next tab stop using `u32` values.
crates/ruff_python_trivia/src/whitespace.rs:44
↓ 2 callers
Method
take_condition_flow_snapshots
Takes specialized truthy/falsy flow states for condition expressions whose evaluation can leave different bindings behind depending on the condition o
crates/ty_python_core/src/builder.rs:1335
↓ 2 callers
Method
take_exception_snapshots
Takes the current context's snapshots and updates the number of active handlers.
crates/ty_python_core/src/builder/except_handlers.rs:208
↓ 2 callers
Method
take_open_files
This takes the open files from the project and returns them.
crates/ty_project/src/lib.rs:677
↓ 2 callers
Function
target_length
(targets: &[ast::Expr])
crates/ty_python_semantic/src/types/unpacker.rs:546
↓ 2 callers
Method
target_mask
Returns the conservative bit used to skip subtrees without this target. Lints are hashed into 62 buckets, with one bucket reserved for blanket suppre
crates/ty_python_semantic/src/suppression.rs:610
↓ 2 callers
Method
target_scope
Returns the scope where the unpack target expression belongs to.
crates/ty_python_core/src/unpack.rs:74
↓ 2 callers
Method
target_version
(&self)
crates/ruff_python_parser/src/parser/options.rs:38
↓ 2 callers
Method
tearDown
(self)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N802.py:37
↓ 2 callers
Method
terminal
(&self)
crates/ty_project/src/metadata/settings.rs:59
↓ 2 callers
Method
terminal
Index of terminal block
crates/ruff_python_semantic/src/cfg/graph.rs:31
↓ 2 callers
Function
test_db
(files: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:1986
↓ 2 callers
Function
test_invalid_syntax
Assert that the parser generates at least one syntax error for the given input file. Snapshots the AST and the error messages.
crates/ruff_python_parser/tests/fixtures.rs:158
↓ 2 callers
Method
test_system
(&self)
crates/ty_project/src/db.rs:851
↓ 2 callers
Function
test_valid_syntax
Asserts that the parser generates no syntax errors for a valid program. Snapshots the AST.
crates/ruff_python_parser/tests/fixtures.rs:60
↓ 2 callers
Method
text
(&self)
crates/ty_ide/src/inlay_hints.rs:322
↓ 2 callers
Method
text_after
(&self, token: &'a LogicalLineToken)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:176
↓ 2 callers
Function
text_document_fixes
( query: &DocumentQuery, source: &str, modified: &str, encoding: PositionEncoding, )
crates/ruff_server/src/fix.rs:177
↓ 2 callers
Function
text_ends_at_quote
Returns `true` if the [`TextRange`] ends at a quote character.
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:250
↓ 2 callers
Function
text_size_to_lsp_position
( offset: TextSize, text: &str, index: &LineIndex, encoding: PositionEncoding, )
crates/ty_server/src/document/range.rs:250
↓ 2 callers
Function
thread_priority_to_qos_class
(priority: ThreadPriority)
crates/ty_server/src/server/schedule/thread/priority.rs:50
↓ 2 callers
Function
thread_priority_to_qos_class
(priority: ThreadPriority)
crates/ruff_server/src/server/schedule/thread/priority.rs:50
↓ 2 callers
Function
toDisplayDiagnosticDetail
(item: { message: string; severity?: string; location: DiagnosticLocation | null; })
playground/ty/src/Editor/Diagnostics.tsx:260
↓ 2 callers
Method
to_annotate
Convert this to an "annotate" snippet.
crates/ruff_db/src/diagnostic/render.rs:445
↓ 2 callers
Method
to_callable_type
Reifies captured parameter lists as callables for argument matching and checking.
crates/ty_python_semantic/src/types.rs:2238
↓ 2 callers
Method
to_diagnostic_message
(&self, path: Option<impl std::fmt::Display>)
crates/ruff_db/src/panic.rs:43
↓ 2 callers
Method
to_hierarchical
Turns this flat sequence of symbols into a hierarchy of symbols.
crates/ty_ide/src/symbols.rs:162
↓ 2 callers
Method
to_iter
(self)
crates/ruff_linter/src/rules/flake8_pyi/rules/bad_generator_return_type.rs:338
↓ 2 callers
Function
to_lsp_diagnostic
Generates an LSP diagnostic with an associated cell index for the diagnostic to go in. If the source kind is a text document, the cell index will alwa
crates/ruff_server/src/lint.rs:371
↓ 2 callers
Method
to_lsp_diagnostics
( &self, db: &ProjectDatabase, client_capabilities: ResolvedClientCapabilities, )
crates/ty_server/src/server/api/diagnostics.rs:108
↓ 2 callers
Method
to_lsp_position
( &self, db: &dyn Db, file: File, encoding: PositionEncoding, )
crates/ty_server/src/document/range.rs:205
↓ 2 callers
Method
to_module_name
(&self)
crates/ty_module_resolver/src/path.rs:169
↓ 2 callers
Function
to_module_path
Create a module path from a (package, path) pair. For example, if the package is `foo/bar` and the path is `foo/bar/baz.py`, the call path is `["baz"
crates/ruff_python_ast/src/helpers.rs:1003
↓ 2 callers
Method
to_partial
Returns a partial version of this `TypedDict` where all fields are optional. This is used to model non-mutating PEP 584 merge operands, accepting dict
crates/ty_python_semantic/src/types/typed_dict.rs:654
↓ 2 callers
Function
to_pep604_operator
Return the PEP 604 operator variant to which the given subscript [`Expr`] corresponds, if any.
crates/ruff_python_semantic/src/analyze/typing.rs:221
↓ 2 callers
Method
to_python_version
(self)
crates/ty_project/src/metadata/python_version.rs:68
↓ 2 callers
Method
to_settings
Lazily resolves the client options to the settings.
crates/ruff_server/src/session/settings.rs:55
↓ 2 callers
Method
to_settings_arc
Lazily resolves the client options to the settings.
crates/ruff_server/src/session/settings.rs:60
↓ 2 callers
Method
to_string
Construct the line from the components
python/ruff-ecosystem/ruff_ecosystem/check.py:389
↓ 2 callers
Method
to_text_range
( self, line_index: &LineIndex, source: &str, position_encoding: PositionEncod
crates/ty_wasm/src/lib.rs:1134
↓ 2 callers
Method
to_unpromotable
(self)
crates/ty_python_semantic/src/types/literal.rs:169
↓ 2 callers
Function
toggleTheme
(theme: Theme)
playground/shared/src/theme.ts:37
↓ 2 callers
Function
token_kind_to_cmp_op
Converts a [`TokenKind`] into its corresponding [`CmpOp`]. `next` is only needed to distinguish `is not` and `not in`.
crates/ruff_python_parser/src/parser/helpers.rs:36
↓ 2 callers
Method
token_range
(&self)
crates/ruff_linter/src/noqa.rs:690
↓ 2 callers
Function
tokenize_range
(source: &'static str, range: TextRange)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:35
↓ 2 callers
Method
tokens_trimmed
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:156
↓ 2 callers
Function
top_level_field_lists
Returns top-level field lists that begin at a reST block boundary. `source` must have already undergone PEP-257 trimming and universal newline normal
crates/ty_ide/src/docstring/document/rst.rs:25
↓ 2 callers
Method
total_ordering_root_method
Returns the type of the ordering method used by `@total_ordering`, if any. Following `functools.total_ordering` precedence, we prefer `__lt__` > `__l
crates/ty_python_semantic/src/types/class/static_literal.rs:332
↓ 2 callers
Method
trace_level
(self)
crates/ty_server/src/logging.rs:81
↓ 2 callers
Method
trace_level
(self)
crates/ruff_server/src/logging.rs:86
↓ 2 callers
Method
trailing
The text between the expression and the conversion, the `format_spec`, or the `}`.
crates/ruff_python_ast/src/nodes.rs:528
↓ 2 callers
Method
trailing_binary_comments
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:837
↓ 2 callers
Function
trailing_function_or_class_def
Find nested class or function definitions that need an empty line after them. ```python def f(): if True: def double(s): return s + s print("below
crates/ruff_python_formatter/src/statement/suite.rs:521
↓ 2 callers
Function
trailing_quote
Return the trailing quote string for a string, template, or bytes literal (e.g., `"""`).
crates/ruff_python_ast/src/str.rs:309
↓ 2 callers
Method
translate_line_column
Translates the given [`LineColumn`] based on the indexing table. This will translate the row/column in the concatenated source code to the row/column
crates/ruff_notebook/src/index.rs:51
↓ 2 callers
Function
transparent_callable_decorator_result
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, bindings: &Bindings<'db>, decorated_ty: Type
crates/ty_python_semantic/src/types/infer/builder.rs:433
↓ 2 callers
Method
traversal_budget
(&self)
crates/ty_python_semantic/src/types/constraints.rs:3786
↓ 2 callers
Function
traverse_union_options
( func: &mut F, semantic: &SemanticModel, expr: &'a Expr, options: UnionTraversalOptions, )
crates/ruff_python_semantic/src/analyze/typing.rs:512
↓ 2 callers
Method
trim_start_str
Trims at most `indent_len` indentation from the beginning of `line`. This is useful when one needs to trim some minimum level of indentation from a c
crates/ruff_python_formatter/src/string/docstring.rs:1819
↓ 2 callers
Method
truthiness
Return `Uninhabited` when evaluation cannot produce either boolean outcome.
crates/ty_python_semantic/src/types/infer/expression_truthiness.rs:66
↓ 2 callers
Method
try_add_project_root
(&self, db: &dyn Db)
crates/ty_project/src/metadata.rs:424
↓ 2 callers
Method
try_bool_impl
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, allow_short_circuit:
crates/ty_python_semantic/src/types/bool.rs:66
↓ 2 callers
Method
try_build
(self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1398
↓ 2 callers
Method
try_check_protocol_receiver_pair
Prove receiver compatibility without unfolding two instances of the same protocol. A target receiver restriction `P[B]` implies a source restriction
crates/ty_python_semantic/src/types/protocol_class.rs:2625
↓ 2 callers
Method
try_class_metadata_ancestors
Resolve ancestors in MRO order without specializing a synthetic tuple base with its fields.
crates/ty_python_semantic/src/types/class/static_literal.rs:912
↓ 2 callers
Method
try_expected_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:1160
↓ 2 callers
Method
try_expression_use_id
Returns the recorded use of an expression, if it loads a tracked place.
crates/ty_python_core/src/lib.rs:370
↓ 2 callers
Method
try_from_string
Parse the rule code from a diagnostic line string
python/ruff-ecosystem/ruff_ecosystem/check.py:416
↓ 2 callers
Method
try_get_for_declared_type
Returns the type of this argument when inferred against the provided declared type. If the type was not inferred against the declared type directly,
crates/ty_python_semantic/src/types/call/arguments.rs:478
↓ 2 callers
Method
try_map_impl
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mut transform_fn: impl
crates/ty_python_semantic/src/types/set_theoretic.rs:464
↓ 2 callers
Method
try_map_union
Limit intermediate unions as well as the final result: waiting until all operands have been expanded can first construct an exponentially large union
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:81
↓ 2 callers
Method
try_member_lookup
Performs member lookup while retaining errors from implicit attribute-access methods.
crates/ty_python_semantic/src/types.rs:5883
↓ 2 callers
Method
try_mro_ancestors
Return this class's ancestors in [method resolution order] ("MRO"), excluding the class itself. If the MRO is unresolvable, return an error indicating
crates/ty_python_semantic/src/types/class/static_literal.rs:896
↓ 2 callers
Function
try_pattern_binding_fallthrough_type
Compute binding fallthrough while charging every nested exact-tuple expansion to `budget`. An error means that the caller must discard the partially
crates/ty_python_semantic/src/types/match_pattern.rs:1040
↓ 2 callers
Method
try_solve_with
Checks each retained solution before collecting it or solving the next path.
crates/ty_python_semantic/src/types/constraints.rs:4110
↓ 2 callers
Method
try_take_watch_changes
( &self, mut matcher: M, timeout: Duration, )
crates/ty/tests/file_watching.rs:198
↓ 2 callers
Method
try_typed_dict_pep_584_dunder
( &mut self, update: &ast::Expr, update_context_typed_dict: TypedDictType<'db>,
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:318
↓ 2 callers
Method
try_use_id
(&self, key: impl Into<ExpressionNodeKey>)
crates/ty_python_core/src/ast_ids.rs:250
↓ 2 callers
Method
tuple_class_type
Returns the type used for the builtin tuple class's single generic parameter. Preserve the `TypeVarTuple` here so that variance inference and generic
crates/ty_python_semantic/src/types/tuple.rs:963
↓ 2 callers
Function
two_cell_notebook
()
crates/ruff_notebook/src/notebook.rs:822
↓ 2 callers
Method
ty
(&self)
crates/ty_project/src/metadata/pyproject.rs:24
↓ 2 callers
Method
type
(self)
crates/ruff_linter/resources/test/fixtures/pycodestyle/E721.py:112
↓ 2 callers
Method
type_at_nonnegative_index_unbounded
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, index: usize, )
crates/ty_python_semantic/src/types/tuple.rs:2037
↓ 2 callers
Method
type_check_only
Returns whether this class is type-check only.
crates/ty_python_semantic/src/types/class.rs:854
↓ 2 callers
Function
type_expr
Given a [`PythonType`], return an [`Expr`] that resolves to that type. If the [`Expr`] relies on importing any external symbols, those imports will b
crates/ruff_linter/src/rules/flake8_annotations/helpers.rs:246
↓ 2 callers
Method
type_for_argument
Returns the inferred type for the argument at the specified index.
crates/ty_python_semantic/src/types/call/bind.rs:1519
↓ 2 callers
Function
type_hierarchy_subtypes
Get the subtypes (derived classes) of a type hierarchy item. This scans all available modules and can be expensive in large projects.
crates/ty_ide/src/type_hierarchy.rs:66
↓ 2 callers
Function
type_hierarchy_supertypes
Get the supertypes (base classes) of a type hierarchy item.
crates/ty_ide/src/type_hierarchy.rs:48
↓ 2 callers
Function
type_narrowed_after_pattern
( db: &'db dyn Db, predicate: PatternPredicate<'db>, expansion: PatternSubjectExpansion, )
crates/ty_python_semantic/src/reachability.rs:292
↓ 2 callers
Function
type_narrowed_by_pattern
Narrow `subject_ty` by a match pattern. If the case has no guard, or its guard is always true, the result is the subject type remaining after the cas
crates/ty_python_semantic/src/reachability.rs:329
↓ 2 callers
Function
type_retains_original_class
Return true if a type still contains the original class object, even if it also carries extra intersection members.
crates/ty_python_semantic/src/types/infer/builder/class.rs:588
↓ 2 callers
Method
type_satisfies_protocol_member_access
Checks the read and write capabilities required through instance access or class access. Reads are checked covariantly and writes contravariantly. Fo
crates/ty_python_semantic/src/types/protocol_class.rs:2851
↓ 2 callers
Method
type_signatures
When set, type signatures of each completion item are included in the snapshot. This is useful when one wants to specifically test types, but it usual
crates/ty_ide/src/completion.rs:11667
↓ 2 callers
Method
type_was_already_seen
(&self, ty: Type<'db>)
crates/ty_python_semantic/src/types/visitor.rs:380
↓ 2 callers
Function
typed_dict_inherited_class_member
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, typed_dict: TypedDictType<'db>, module: Typi
crates/ty_python_semantic/src/types/class/typed_dict.rs:1122
↓ 2 callers
Function
typed_dict_pattern_domain_satisfies
Return whether every value in `ty` belongs to a `TypedDict` domain accepted by `predicate`.
crates/ty_python_semantic/src/types/match_pattern.rs:132
↓ 2 callers
Function
typed_dict_subscript_key_lint
Uses `non-literal-typed-dict-key` only when every alternative in the rejected key type is a string of unknown value. This keeps a misspelled literal o
crates/ty_python_semantic/src/types/diagnostic.rs:4574
← previous
next →
7,101–7,200 of 31,562, ranked by callers