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
↓ 1 callers
Method
restrict_for_equality
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, operator: ComparisonO
crates/ty_python_semantic/src/types/equality/enums.rs:853
↓ 1 callers
Method
restrict_gradual_solution
Restricts the range of a gradual solution by the upper bounds inferred for this constraint. Returns `None` if constructing an intersection exceeds the
crates/ty_python_semantic/src/types/constraints.rs:3567
↓ 1 callers
Method
result_id
Computes the result ID for the diagnostics. The result ID is `None` if there are no diagnostics or hints.
crates/ty_server/src/server/api/diagnostics.rs:95
↓ 1 callers
Method
resume_if_revision_changed
(self, current_revision: u64, client: &Client)
crates/ty_server/src/session.rs:1881
↓ 1 callers
Method
resume_unwind
(self)
crates/ruff_db/src/panic.rs:39
↓ 1 callers
Method
retain_place_state
( &mut self, bindings: &Bindings, declarations: Declarations, )
crates/ty_python_core/src/use_def.rs:463
↓ 1 callers
Function
retain_visible_diagnostics
(diagnostics: &mut Vec<Diagnostic>)
crates/ty/src/lib.rs:731
↓ 1 callers
Method
retry
Re-queues this request after a salsa cancellation for a retry. The main loop will skip the retry if the client cancelled the request in the meantime
crates/ty_server/src/session/client.rs:250
↓ 1 callers
Function
return_bytes
()
crates/ruff_linter/resources/test/fixtures/pylint/invalid_return_type_bytes.py:25
↓ 1 callers
Function
return_error
()
crates/ruff_linter/resources/test/fixtures/flake8_raise/RSE102.py:48
↓ 1 callers
Function
return_in_generator
B901
crates/ruff_linter/src/rules/flake8_bugbear/rules/return_in_generator.rs:95
↓ 1 callers
Function
return_in_init
PLE0101
crates/ruff_linter/src/rules/pylint/rules/return_in_init.rs:50
↓ 1 callers
Function
return_in_try_except_finally
SIM107
crates/ruff_linter/src/rules/flake8_simplify/rules/return_in_try_except_finally.rs:60
↓ 1 callers
Function
return_index
()
crates/ruff_linter/resources/test/fixtures/pylint/invalid_return_type_index.py:32
↓ 1 callers
Function
return_int
()
crates/ruff_linter/resources/test/fixtures/pylint/invalid_return_type_hash.py:25
↓ 1 callers
Function
return_int
()
crates/ruff_linter/resources/test/fixtures/pylint/invalid_return_type_length.py:30
↓ 1 callers
Function
return_int
()
crates/ruff_linter/resources/test/fixtures/pylint/invalid_return_type_bool.py:18
↓ 1 callers
Function
return_int
()
crates/ruff_linter/resources/test/fixtures/pylint/invalid_return_type_str.py:25
↓ 1 callers
Function
return_num
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB116.py:6
↓ 1 callers
Function
return_stmt
Generate a return statement for an `any` or `all` builtin comprehension.
crates/ruff_linter/src/rules/flake8_simplify/rules/reimplemented_builtin.rs:380
↓ 1 callers
Method
return_type
(&self)
crates/ty_python_semantic/src/types/infer.rs:1118
↓ 1 callers
Method
return_type
Compute the overall effective return type of this `ConstructorBinding`.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:358
↓ 1 callers
Function
returns_documented
( docstring: &Docstring, docstring_sections: &DocstringSections, convention: Option<Convention>, )
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1099
↓ 1 callers
Function
returns_list
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/pep_646.py:112
↓ 1 callers
Function
reuse_of_groupby_generator
B031
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:329
↓ 1 callers
Method
revealed_type_for_call
( &self, inference: &CallArgumentInference<'_, '_, 'db>, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:1513
↓ 1 callers
Function
reverse_comparison
Generate a fix to reverse a comparison.
crates/ruff_linter/src/rules/flake8_simplify/rules/yoda_conditions.rs:140
↓ 1 callers
Method
reversed
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:1675
↓ 1 callers
Method
revert
Revert `file` back to its original source text. ## Panics If `file` has no override.
crates/ty_python_semantic/src/fixes.rs:663
↓ 1 callers
Method
revert_all
Revert all files with a tracked override back to their original source text.
crates/ty_python_semantic/src/fixes.rs:649
↓ 1 callers
Method
rewind
Restore the lexer to the given checkpoint.
crates/ruff_python_parser/src/lexer.rs:1411
↓ 1 callers
Method
rewrap_for_import_module
Given the special form we resolved (`self`) and the module the user actually imported the symbol from (`import_module`), return the variant that match
crates/ty_python_semantic/src/types/special_form.rs:281
↓ 1 callers
Method
right
(&self, line_len: usize)
crates/ruff_annotate_snippets/src/renderer/margin.rs:105
↓ 1 callers
Method
right_operator
Returns the index of the operand's right operator. The method always returns an index even if the operand has no right operator. Use [`FlatBinaryExpre
crates/ruff_python_formatter/src/expression/binary_like.rs:1064
↓ 1 callers
Function
root_logger_call
LOG015
crates/ruff_linter/src/rules/flake8_logging/rules/root_logger_call.rs:51
↓ 1 callers
Method
root_may_have_unbounded_specialization
( &self, db: &'db dyn Db, root: RecursiveDefinition<'db>, )
crates/ty_python_semantic/src/types/cyclic.rs:409
↓ 1 callers
Function
root_model_input_type
Return the input type accepted for a Pydantic root model field. This builds a union of the root model instance and its transformed raw root type. For
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1266
↓ 1 callers
Function
round_applicability
Determines the [`Applicability`] for a `round(..)` call. The Applicability depends on the `ndigits` and the number argument.
crates/ruff_linter/src/rules/ruff/rules/unnecessary_cast_to_int.rs:175
↓ 1 callers
Function
round_trip
Run round-trip source code generation on a given Jupyter notebook file path.
crates/ruff_notebook/src/notebook.rs:23
↓ 1 callers
Method
rst_literal_indent
(&self)
crates/ty_ide/src/docstring/markdown/general.rs:499
↓ 1 callers
Function
ruff_check
Run the given ruff binary against the specified path.
python/ruff-ecosystem/ruff_ecosystem/check.py:551
↓ 1 callers
Function
ruff_check_paths
Find files that ruff would check so we can format them. Adapted from `ruff`.
crates/ruff_dev/src/format_dev.rs:65
↓ 1 callers
Function
ruff_cmd
()
crates/ruff/tests/integration_test.rs:29
↓ 1 callers
Function
ruff_enabled
Return `true` if a `pyproject.toml` contains a `[tool.ruff]` section.
crates/ruff_workspace/src/pyproject.rs:77
↓ 1 callers
Method
ruff_source_file
Returns the [`SourceFile`] which the message belongs to.
crates/ruff_db/src/diagnostic/mod.rs:491
↓ 1 callers
Function
rule
Explain a single rule.
crates/ty/src/rule.rs:52
↓ 1 callers
Method
rule
Return the [`Rule`] associated with this suppression.
crates/ruff_linter/src/suppression.rs:165
↓ 1 callers
Method
rule
(self)
crates/ruff_linter/src/rules/pep8_naming/rules/invalid_first_argument_name.rs:196
↓ 1 callers
Method
rule_code
(self)
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:282
↓ 1 callers
Method
rule_codes
(self)
python/ruff-ecosystem/ruff_ecosystem/check.py:297
↓ 1 callers
Function
rule_codes_in_selectors
RUF201
crates/ruff_linter/src/rules/ruff/rules/rule_codes_in_selectors.rs:61
↓ 1 callers
Function
rule_for
Return the [`Rule`] for the given import type.
crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs:544
↓ 1 callers
Function
rule_identifier_range_at_offset
Return the range of the rule identifier at `offset` within `comment_range`, if it exists and is part of a file-level or line-level `noqa` comment.
crates/ruff_linter/src/noqa.rs:364
↓ 1 callers
Function
rule_is_ignored
Returns `true` if the given [`Rule`] is ignored at the specified `lineno`.
crates/ruff_linter/src/noqa.rs:153
↓ 1 callers
Function
rule_metadata
()
crates/ruff_linter/src/message/mod.rs:170
↓ 1 callers
Method
rule_metadata
Returns the metadata used to render all registered, non-removed lints.
crates/ty_python_semantic/src/lint.rs:500
↓ 1 callers
Function
rules
Explain all rules.
crates/ty/src/rule.rs:69
↓ 1 callers
Function
rules
Explain all rules to the user.
crates/ruff/src/commands/rule.rs:116
↓ 1 callers
Method
rules
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:381
↓ 1 callers
Method
rules
(&self)
crates/ty_project/src/metadata/settings.rs:47
↓ 1 callers
Method
rules
(&'db self, db: &'db Db)
crates/ty_test/src/db.rs:247
↓ 1 callers
Function
rules_by_prefix
Group the rules by their common prefixes.
crates/ruff_macros/src/map_codes.rs:223
↓ 1 callers
Method
rules_to_be_ignored
(self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:28
↓ 1 callers
Function
run
(*args: str, cwd: Path | None = None)
scripts/setup_primer_project.py:108
↓ 1 callers
Function
run
(command: list[str])
scripts/generate_builtin_modules.py:49
↓ 1 callers
Function
run
()
crates/ty/src/lib.rs:44
↓ 1 callers
Function
run
( absolute_fixture_path: &Utf8Path, relative_fixture_path: &Utf8Path, source: &str, snapshot_p
crates/ruff_mdtest/src/lib.rs:26
↓ 1 callers
Function
run
()
crates/ruff_wasm/src/lib.rs:223
↓ 1 callers
Method
run
Run commands and snapshot their output.
scripts/ty_benchmark/src/benchmark/snapshot.py:60
↓ 1 callers
Method
run
(session: &mut Session, _client: &Client, _params: ())
crates/ruff_server/src/server/api/requests/shutdown.rs:12
↓ 1 callers
Function
runPython
(workspace: SerializedFiles)
playground/ty/src/Editor/runPython.ts:6
↓ 1 callers
Function
run_check
(args: CheckCommand)
crates/ty/src/lib.rs:95
↓ 1 callers
Function
run_fuzzer
(args: ResolvedCliArgs)
python/py-fuzzer/fuzz.py:719
↓ 1 callers
Function
run_fuzzer_concurrently
Process seeds concurrently, returning failures and unchecked seeds.
python/py-fuzzer/fuzz.py:483
↓ 1 callers
Function
run_fuzzer_sequentially
Process seeds sequentially, returning failures and unchecked seeds.
python/py-fuzzer/fuzz.py:522
↓ 1 callers
Function
run_git
(path: &Path, args: &[&str])
crates/ruff_benchmark/src/checkout.rs:33
↓ 1 callers
Function
run_git_with_retry
(command: list[str], *, environment: dict[str, str])
scripts/build_ruff_pgo.py:518
↓ 1 callers
Function
run_memory_tests
Run memory tests for all projects with both ty versions.
scripts/memory_report.py:341
↓ 1 callers
Function
run_module_resolution_consistency_test
Tests that "list modules" is consistent with "resolve module." This only checks that everything returned by `list_module` is the identical module we
crates/ty_test/src/lib.rs:498
↓ 1 callers
Function
run_ruff
(args: Args)
crates/ruff_benchmark/benches/ruff_walltime.rs:119
↓ 1 callers
Function
run_server
()
crates/ty_server/src/lib.rs:29
↓ 1 callers
Function
run_server
( preview: Option<bool>, workspace_trust: WorkspaceTrust, )
crates/ruff/src/commands/server.rs:5
↓ 1 callers
Function
run_test
( db: &mut Db, relative_fixture_path: &Utf8Path, snapshot_path: &Utf8Path, test: &parser::Mark
crates/ruff_mdtest/src/lib.rs:53
↓ 1 callers
Function
run_ty_memory_check
Run ty on a project and capture memory report to a file.
scripts/memory_report.py:312
↓ 1 callers
Function
runtime_cast_value
TC006
crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_cast_value.rs:62
↓ 1 callers
Method
runtime_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:881
↓ 1 callers
Method
runtime_import_edit
Move an existing import to the top-level, thereby making it available at runtime. If there are no existing imports, the new import will be added at t
crates/ruff_linter/src/importer/mod.rs:110
↓ 1 callers
Function
runtime_import_in_type_checking_block
TC004
crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs:102
↓ 1 callers
Function
runtime_string_union
TC010
crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_string_union.rs:68
↓ 1 callers
Function
rustc_host
()
scripts/build_ruff_pgo.py:356
↓ 1 callers
Function
rustfmt
(code: str)
crates/ruff_python_formatter/generate.py:14
↓ 1 callers
Function
rustfmt
(code: str)
crates/ruff_python_ast/generate.py:87
↓ 1 callers
Function
same_enum_member
Return whether two enum literals resolve to the same member, including aliases.
crates/ty_python_semantic/src/types/equality.rs:2241
↓ 1 callers
Method
same_marker
(self, other: Self)
crates/ty_python_semantic/src/types.rs:11911
↓ 1 callers
Function
same_member_implementation
Return whether two looked-up members originate from the same implementation.
crates/ty_python_semantic/src/types/equality.rs:2073
↓ 1 callers
Function
same_package
(package: Option<PackageRoot<'_>>, module_base: &str)
crates/ruff_linter/src/rules/isort/categorize.rs:154
↓ 1 callers
Method
same_scope
(&self)
crates/ruff_python_semantic/src/model.rs:2570
↓ 1 callers
Method
same_span
Compare two `MultilineAnnotation`s considering only the `Span` they cover.
crates/ruff_annotate_snippets/src/renderer/source_map.rs:619
↓ 1 callers
Method
same_value
Returns whether ty can treat the two unions as the same value in type relations. The comparison accounts for the order of distinct operands and the ty
crates/ty_python_semantic/src/types/union_type_instance.rs:164
↓ 1 callers
Method
satisfied_clauses
Returns clauses describing all of the variable assignments that cause this BDD to evaluate to `true`. (This translates the boolean function that this
crates/ty_python_semantic/src/types/constraints.rs:2940
← previous
next →
12,901–13,000 of 31,562, ranked by callers