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
↓ 3 callers
Method
with_source_map_generation
(mut self, source_map: SourceMapGeneration)
crates/ruff_python_formatter/src/options.rs:229
↓ 3 callers
Method
with_source_sub
( mut self, db: &dyn Db, value: &RangedValue<T>, value_label: &str, op
crates/ty_project/src/metadata/options.rs:2662
↓ 3 callers
Method
with_target_version
(mut self, target_version: PythonVersion)
crates/ruff_python_parser/src/parser/options.rs:33
↓ 3 callers
Method
with_trailing_slash
(self)
crates/ruff_db/src/vendored.rs:404
↓ 3 callers
Method
with_type
Convenience for `with_detail(TypeDetail::Type(ty))`
crates/ty_python_semantic/src/types/display.rs:416
↓ 3 callers
Method
with_unclosed
(mut self, unclosed: bool)
crates/ruff_python_ast/src/nodes.rs:1158
↓ 3 callers
Function
wobble_index
Optionally applies a transformation to the orderings that we use to compare builder-local typevar and constraint IDs, and to canonicalize [`TypeVarEqu
crates/ty_python_semantic/src/types/constraints.rs:1752
↓ 3 callers
Method
write_body
(&self, formatter: &mut impl std::fmt::Write)
crates/ruff_python_literal/src/escape.rs:25
↓ 3 callers
Method
write_debugs
(&mut self, name: &str, ty: &str, elements: &[T])
crates/ruff_unicode_names2_generator/src/formatting.rs:37
↓ 3 callers
Method
write_file
Writes the content of the given file and notifies the Db about the change.
crates/ruff_db/src/system/test.rs:262
↓ 3 callers
Function
write_rustdoc
(out: list[str], doc: str)
crates/ruff_python_ast/generate.py:78
↓ 3 callers
Function
x
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:245
↓ 3 callers
Function
x_rhs_expression
(db: &TestDb)
crates/ty_python_semantic/src/types/infer/tests.rs:1880
↓ 3 callers
Function
xml_string
Preserve quick-junit's string sanitization. Filenames and diagnostic messages can contain terminal escapes; XML 1.0 forbids ESC, and removing the enti
crates/ruff_db/src/diagnostic/render/junit.rs:178
↓ 3 callers
Function
y
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:246
↓ 2 callers
Function
_
()
crates/ruff_python_parser/resources/inline/ok/nonlocal_stmt.py:1
↓ 2 callers
Method
__add__
(self: S, other: S)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI019_0.py:69
↓ 2 callers
Method
__contains__
(self, other)
crates/ruff_linter/resources/test/fixtures/refurb/FURB132.py:74
↓ 2 callers
Method
__new__
(cls)
crates/ruff_linter/resources/test/fixtures/flake8_self/SLF001_1.py:76
↓ 2 callers
Method
__setattr__
(self, /, name)
crates/ruff_linter/resources/test/fixtures/pylint/unexpected_special_method_signature.py:107
↓ 2 callers
Method
_display
(self)
crates/ruff_benchmark/resources/pydantic/types.py:490
↓ 2 callers
Function
_flags_fromnum
(num)
crates/ruff_benchmark/resources/numpy/ctypeslib.py:174
↓ 2 callers
Method
_get_head_commit
Return the commit sha for the repository in the checkout directory.
python/ruff-ecosystem/ruff_ecosystem/projects.py:506
↓ 2 callers
Method
_handle_hidden_tables
Return list of tables, potentially removing hidden elements Parameters ---------- tbl_list : list of node-like
crates/ruff_server/resources/test/fixtures/pandas_html.py:553
↓ 2 callers
Method
_parse_td
Return the td elements from a row element. Parameters ---------- obj : node-like A DOM <tr> node.
crates/ruff_server/resources/test/fixtures/pandas_html.py:305
↓ 2 callers
Method
_run_mdtest
( self, arguments: list[str] | None = None, *, capture_output: bool = False )
crates/ty_python_semantic/mdtest.py:135
↓ 2 callers
Method
_settings
(self, project: Project, venv: Venv)
scripts/ty_benchmark/src/benchmark/tool.py:336
↓ 2 callers
Function
a
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:253
↓ 2 callers
Function
a
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/slice.py:67
↓ 2 callers
Function
a
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF100_7.py:5
↓ 2 callers
Function
a
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:546
↓ 2 callers
Method
a
(self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/trivia.py:11
↓ 2 callers
Function
abc
()
crates/ruff_linter/resources/test/fixtures/flake8_commas/COM81.py:240
↓ 2 callers
Method
absolute_file_path
(self, file_path: str)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:195
↓ 2 callers
Function
abstract_method_span
( db: &'db dyn Db, function: FunctionType<'db>, policy: AbstractMethodAnnotationPolicy, )
crates/ty_python_semantic/src/types/diagnostic.rs:4238
↓ 2 callers
Method
abstract_methods
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/abstract_methods.rs:256
↓ 2 callers
Method
accepts_arguments
(&self, specialization: Specialization<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:6870
↓ 2 callers
Method
accepts_candidate
Checks whether a given candidate solution satisfies this path.
crates/ty_python_semantic/src/types/constraints.rs:3478
↓ 2 callers
Method
accepts_type_context
Returns `true` if this scope may require type context from its parent scope.
crates/ty_python_core/src/scope.rs:47
↓ 2 callers
Method
acknowledge_unregistration
(&mut self)
crates/ty_server/tests/e2e/main.rs:643
↓ 2 callers
Method
add
(mut self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/walk_directory.rs:45
↓ 2 callers
Method
add
(&mut self, decision: EditDecision)
crates/ty_ide/src/will_rename.rs:1113
↓ 2 callers
Method
add
(self, delta: u32)
crates/ty_python_semantic/src/types/typevar.rs:917
↓ 2 callers
Method
add
Adds a tuple to this homogeneous union group.
crates/ty_python_semantic/src/types/tuple/promotion.rs:247
↓ 2 callers
Method
add_all_names
Add valid names from `__all__` to the set of existing `__all__` names. Returns `false` if any of the names are invalid.
crates/ty_ide/src/symbols.rs:1183
↓ 2 callers
Method
add_assignment
Adds a symbol introduced via an assignment.
crates/ty_ide/src/symbols.rs:896
↓ 2 callers
Function
add_async_generator_stub_help
Points to a coroutine declaration that may have been intended to describe an async generator.
crates/ty_python_semantic/src/types/iteration.rs:28
↓ 2 callers
Method
add_at_start
(&self, text: &str)
crates/ruff_linter/src/importer/mod.rs:99
↓ 2 callers
Method
add_bindings
( &mut self, db: &'db dyn Db, mut bindings: BindingWithConstraintsIterator<'db, 'db>,
crates/ty_python_semantic/src/place/definitions.rs:108
↓ 2 callers
Method
add_constraint
( &mut self, db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, constr
crates/ty_python_semantic/src/types/constraints.rs:3123
↓ 2 callers
Method
add_context
(&self, db: &dyn Db, env: &ProgramEnvironment<'_>, diag: &mut Diagnostic)
crates/ty_python_semantic/src/types/call/bind.rs:11418
↓ 2 callers
Function
add_diagnostic
Add diagnostic for C416 based on the expression node id.
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension.rs:82
↓ 2 callers
Method
add_directory
(&mut self, path: impl AsRef<VendoredPath>)
crates/ruff_db/src/vendored.rs:498
↓ 2 callers
Method
add_distinct_block_ranges
Adds the full range if present, and also adds the body range if both present and distinct from the full range.
crates/ty_ide/src/folding_range.rs:491
↓ 2 callers
Function
add_end_of_line_suppression
(source: &str, codes: &[LintName], line_end: TextSize)
crates/ty_python_semantic/src/suppression/add_ignore.rs:235
↓ 2 callers
Method
add_entry_for_definition_key
(&mut self, key: DefinitionNodeKey)
crates/ty_python_core/src/builder.rs:1509
↓ 2 callers
Function
add_import_completions_impl
( db: &'db dyn Db, completions: &mut Completions<'db>, semantic_completions: impl IntoIterator<Ite
crates/ty_ide/src/completion.rs:3194
↓ 2 callers
Function
add_invariant_generic_hints
Add a diagnostic hint for cases like an invalid `list[bool]` to `list[int]` assignment, that fails due to invariance.
crates/ty_python_semantic/src/types/diagnostic.rs:1929
↓ 2 callers
Function
add_liskov_substitution_principle_help
( diagnostic: &mut Diagnostic, function_name: &str, decorator_list: &[ast::Decorator], checker
crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs:173
↓ 2 callers
Method
add_local_reference
Add a reference to the given [`BindingId`] in the local scope.
crates/ruff_python_semantic/src/model.rs:2015
↓ 2 callers
Method
add_name_symbol
Adds a symbol for a name definition.
crates/ty_ide/src/symbols.rs:864
↓ 2 callers
Method
add_names
Add valid names to the set. Returns `false` if any of the names are invalid.
crates/ty_python_semantic/src/dunder_all.rs:204
↓ 2 callers
Method
add_node
Interns a projected node, collapsing nodes with identical branches.
crates/ty_python_semantic/src/reachability.rs:1315
↓ 2 callers
Function
add_non_runtime_checkable_protocol_context
( db: &'db dyn Db, diagnostic: &mut LintDiagnosticGuard<'db, '_>, protocol: ProtocolClass, )
crates/ty_python_semantic/src/types/diagnostic.rs:4128
↓ 2 callers
Method
add_predicate_expression
Record a predicate in the context in which Python tests it.
crates/ty_python_core/src/builder.rs:2916
↓ 2 callers
Method
add_primary_tag
Adds a tag on the primary annotation for this diagnostic. This tag is associated with the primary annotation created for every `Diagnostic` that uses
crates/ty_python_semantic/src/types/context.rs:560
↓ 2 callers
Method
add_python_cell_with_version
( &mut self, content: &str, version: i32, )
crates/ty_server/tests/e2e/notebook.rs:813
↓ 2 callers
Method
add_to
(self, builder: &mut GlobSetBuilder)
crates/ruff_linter/src/settings/types.rs:205
↓ 2 callers
Function
add_to_dunder_all
Fix to add the specified imports to the `__all__` export list.
crates/ruff_linter/src/fix/edits.rs:149
↓ 2 callers
Function
add_to_existing_suppression
(existing: ExistingSuppression, codes: &[LintName])
crates/ty_python_semantic/src/suppression/add_ignore.rs:295
↓ 2 callers
Method
add_to_union
(&mut self, element: Type<'db>)
crates/ty_python_semantic/src/place.rs:2073
↓ 2 callers
Function
add_undeclared_protocol_member_context
( diagnostic: &mut Diagnostic, db: &dyn Db, protocol_class: ProtocolClass, symbol_name: &str,
crates/ty_python_semantic/src/types/diagnostic.rs:4387
↓ 2 callers
Function
add_unimported_completions
Adds completions not in scope. `scoped` should be information about the identified scope in which the cursor is currently placed. The completions re
crates/ty_ide/src/completion.rs:2397
↓ 2 callers
Method
add_unpackable_assignment
Add an unpackable assignment for the given [`Unpackable`]. This method handles assignments that can contain unpacking like assignment statements, for
crates/ty_python_core/src/builder.rs:3334
↓ 2 callers
Method
add_width
(mut self, width: usize)
crates/ruff_linter/src/line_width.rs:235
↓ 2 callers
Method
added_name
Returns the dotted name of `benchmark_added`, a sibling of the final leaf module.
crates/ruff_benchmark/benches/ty_ide.rs:253
↓ 2 callers
Method
added_path
Returns the path of `benchmark_added.py`, beside the final leaf module.
crates/ruff_benchmark/benches/ty_ide.rs:259
↓ 2 callers
Function
affix_matches_slice_bound
Tests whether the slice of the given string actually removes the detected affix. For example, in the situation ```python text[:bound] if text.endswi
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:334
↓ 2 callers
Function
affix_removal_data
Suppose given a statement of the form: ```python if test: else_or_target_name = value[slice] ``` or an expression of the form: ```python value[slice]
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:254
↓ 2 callers
Method
after_stdlib
Returns indexed paths that follow stdlib in normal typing resolution.
crates/ty_module_resolver/src/resolve.rs:589
↓ 2 callers
Method
alias_target
Returns the target of a registered alias.
crates/ty_python_semantic/src/lint.rs:468
↓ 2 callers
Method
aliases
Returns an iterator over all known aliases and to their target lints. This iterator includes aliases that point to removed lints.
crates/ty_python_semantic/src/lint.rs:478
↓ 2 callers
Method
align
Returns the number of trailing align spaces or 0 if none
crates/ruff_formatter/src/printer/mod.rs:976
↓ 2 callers
Method
all
Returns all the commands that the server currently supports.
crates/ty_server/src/capabilities.rs:69
↓ 2 callers
Method
all
Returns all indexed paths in normal typing-resolution order.
crates/ty_module_resolver/src/resolve.rs:553
↓ 2 callers
Function
all_reachable_members
Iterate over all declarations and bindings that are reachable anywhere in the given scope.
crates/ty_python_semantic/src/types/list_members.rs:90
↓ 2 callers
Method
all_submodules
Returns resolved immediate submodules, including portions of namespace packages. Names are discovered only in directories whose path below their sear
crates/ty_module_resolver/src/module.rs:162
↓ 2 callers
Method
allow_invalid_settings
(&mut self)
crates/ty/tests/file_watching.rs:420
↓ 2 callers
Function
already_inherited
Whether a parent already contains the same incompatible attribute contract. Inspect every parent hierarchy, since the conflicting parent need not be
crates/ty_python_semantic/src/types/overrides/attributes.rs:890
↓ 2 callers
Function
ambiguous_pytest_fixture_cursor_test
( first_fixture: &str, ambiguous_test: &str, )
crates/ty_ide/src/find_references.rs:3409
↓ 2 callers
Function
ambiguous_unicode_character
( text: &str, range: TextRange, context: Context, lint_context: &LintContext, )
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:226
↓ 2 callers
Method
analysis
(&'db self, db: &'db Db)
crates/ty_test/src/db.rs:254
↓ 2 callers
Function
analyze_escape_chars
Traverses string, collects invalid escape characters, and flags if a valid escape character is found.
crates/ruff_linter/src/rules/pycodestyle/rules/invalid_escape_sequence.rs:117
↓ 2 callers
Function
analyze_non_terminal_call_range
( db: &'db dyn Db, scope: ScopeId<'db>, level: u32, index: usize, )
crates/ty_python_semantic/src/reachability.rs:723
↓ 2 callers
Function
analyze_non_terminal_calls_up_to_predicate
Infers complete blocks of call predicates at or before the given predicate, in source order. Predicate IDs are assigned in source order, but the deci
crates/ty_python_semantic/src/reachability.rs:634
↓ 2 callers
Function
analyze_single
Evaluate a predicate, returning `Uninhabited` when it cannot produce a boolean outcome. Unlike ambiguous truthiness, an uninhabited condition does no
crates/ty_python_semantic/src/reachability.rs:2028
↓ 2 callers
Method
and
(self, other: Self)
crates/ty_python_core/src/lib.rs:1055
↓ 2 callers
Method
annotate_diagnostic
Annotate a diagnostic with the unimplemented methods and their declarations.
crates/ty_python_semantic/src/types/abstract_methods.rs:42
↓ 2 callers
Method
annotate_final_declaration
Point to the `Final` declaration when its location is known.
crates/ty_python_semantic/src/types/infer/builder/final_attribute.rs:23
↓ 2 callers
Function
annotate_unpacked_assignment_target
( context: &InferContext, diagnostic: &mut LintDiagnosticGuard, target: AnyNodeRef, definition
crates/ty_python_semantic/src/types/diagnostic.rs:2265
← previous
next →
4,901–5,000 of 31,766, ranked by callers