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
Function
benchmark_large_isinstance_narrowing
Benchmark for narrowing through a long `isinstance` elif chain. This pattern is common in visitor-style dispatch code (e.g. koda-validate's `generate
crates/ruff_benchmark/benches/ty.rs:1792
Function
benchmark_large_union_narrowing
Benchmark for narrowing a large union type through multiple match statements. This is extracted from egglog-python's `pretty.py`, where a ~30-class u
crates/ruff_benchmark/benches/ty.rs:1673
Function
benchmark_lexer
(criterion: &mut Criterion<WallTime>)
crates/ruff_benchmark/benches/lexer.rs:39
Function
benchmark_literal_equality_fallthrough_guarded_any
Benchmarks guarded fallthrough through many equality checks. This generates a large version of this Python shape: ```python def check(value: Value |
crates/ruff_benchmark/benches/ty.rs:2081
Function
benchmark_literal_match_fallthrough
Benchmarks `match` fallthrough over a finite `Literal` subject. This generates a large version of this Python shape: ```python def check(value: Value
crates/ruff_benchmark/benches/ty.rs:2025
Function
benchmark_literal_match_fallthrough_guarded_any
Benchmarks guarded `match` fallthrough over a gradual literal subject. This generates a large version of this Python shape: ```python def keep_value(
crates/ruff_benchmark/benches/ty.rs:2055
Function
benchmark_literal_or_pattern_reachability
Regression benchmark for <https://github.com/astral-sh/ty/issues/3880>. Reachability analysis for a large literal OR pattern on `Any` used to rebuild
crates/ruff_benchmark/benches/ty.rs:2299
Function
benchmark_long_valid_bound_prefix
A long conjunction with only two solutions fits within the traversal budget.
crates/ruff_benchmark/benches/ty_constraint_set.rs:306
Function
benchmark_many_enum_members
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:505
Function
benchmark_many_enum_members_2
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:985
Function
benchmark_many_invariant_typevars
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:668
Function
benchmark_many_protocol_members_mismatch
Regression benchmark for protocol-to-protocol non-assignability when the target protocol has one more member than the source protocol. Without the me
crates/ruff_benchmark/benches/ty.rs:1036
Function
benchmark_many_string_assignments
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:275
Function
benchmark_many_tuple_assignments
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:314
Function
benchmark_many_upper_bound_callbacks
Guards against quadratic pruning when contravariant callbacks contribute many upper-only bounds.
crates/ruff_benchmark/benches/ty_constraint_set.rs:234
Function
benchmark_materialized_recursive_protocol_overload
Regression benchmark for ty#4269: materialized recursive protocol comparisons. Comparing the tuple-specific receiver with the gradual overload can re
crates/ruff_benchmark/benches/ty.rs:1241
Function
benchmark_materialized_recursive_protocol_subtyping
Regression benchmark for subtyping between materialized recursive protocols. Subtyping checks between materialized specializations of a recursive pro
crates/ruff_benchmark/benches/ty.rs:1271
Function
benchmark_missing_key_typed_dict_union_copy
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:440
Function
benchmark_mixed_many_invariant_typevars
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:706
Function
benchmark_mixed_str_enum_comparison
Ensure comparisons of unions spanning several scalar enum classes avoid member-pair expansion.
crates/ruff_benchmark/benches/ty.rs:816
Function
benchmark_mixed_typed_dict_union_copy
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:367
Function
benchmark_mutually_recursive_aliases
Shared recursive references should reuse constructor bodies when aliases are unfolded.
crates/ruff_benchmark/benches/ty.rs:228
Function
benchmark_narrowed_str_enum_comparison
Regression benchmark for <https://github.com/astral-sh/ty/issues/3830>.
crates/ruff_benchmark/benches/ty.rs:590
Function
benchmark_nested_class_pattern_capture
Regression benchmark for <https://github.com/astral-sh/ty/issues/4596>.
crates/ruff_benchmark/benches/ty.rs:2410
Function
benchmark_nested_class_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive class patterns.
crates/ruff_benchmark/benches/ty.rs:2455
Function
benchmark_nested_generic_constructor_arguments
Regression benchmark for <https://github.com/astral-sh/ty/issues/4961>. The inner constructor call matches both arms of `V | Declaration[K, V]`. Even
crates/ruff_benchmark/benches/ty.rs:1175
Function
benchmark_nested_mapping_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive mapping patterns.
crates/ruff_benchmark/benches/ty.rs:2487
Function
benchmark_nested_recursive_protocol_receiver
Regression benchmark for ty#4269: inherited receiver binding with nested type variables. The nominal relation constrains `T` inside the source's unio
crates/ruff_benchmark/benches/ty.rs:1207
Function
benchmark_nested_tuple_comparison
Regression benchmark for <https://github.com/astral-sh/ty/issues/4883>. Each tuple contains two elements of the same type. Comparing both pairs indepe
crates/ruff_benchmark/benches/ty.rs:969
Function
benchmark_optional_str_enum_comparison
Regression benchmark for <https://github.com/astral-sh/ty/issues/4069>. Compare a large enum with optional enum fields in a chain of conditions.
crates/ruff_benchmark/benches/ty.rs:622
Function
benchmark_pandas_tdd
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:338
Function
benchmark_paramspec_bounded_overloads
Regression benchmark for <https://github.com/astral-sh/ty/issues/4796>. Capturing independently bounded generic overloads must not enumerate every co
crates/ruff_benchmark/benches/ty.rs:1499
Function
benchmark_parser
(criterion: &mut Criterion<WallTime>)
crates/ruff_benchmark/benches/parser.rs:38
Function
benchmark_preview_rules
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/linter.rs:139
Function
benchmark_pydantic_core_schema_dict
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:750
Function
benchmark_recursive_callable_materialization
Materializing nested callables reuses shared parameter and return types. A recursive leaf permits reuse after its cycle closes; a cycle through the wh
crates/ruff_benchmark/benches/ty.rs:1342
Function
benchmark_recursive_collection_use_constraints
Regression benchmark for <https://github.com/astral-sh/ty/issues/4466>. Uses of empty dictionaries in a nested conditional constrain their initialize
crates/ruff_benchmark/benches/ty.rs:371
Function
benchmark_recursive_protocol_growing_specialization
Comparing a recursive protocol whose specializations grow should not repeatedly expand its members.
crates/ruff_benchmark/benches/ty.rs:1380
Function
benchmark_recursive_protocol_materialization_scaling
Regression benchmark for <https://github.com/astral-sh/ty/issues/4629>. Comparing a materialized recursive protocol to its original type can repeated
crates/ruff_benchmark/benches/ty.rs:1303
Function
benchmark_recursive_protocol_specialized_receiver
Regression benchmark for a recursive protocol with a specialized receiver. Comparing these types can repeatedly bind `read` to deeper specializations
crates/ruff_benchmark/benches/ty.rs:1416
Function
benchmark_recursive_typed_dict_union_contextual_inference
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:486
Function
benchmark_repeated_narrowed_assignments
Exercises overlapping narrowing histories for repeated conditional assignments. Every `isinstance` check narrows the same place, while each condition
crates/ruff_benchmark/benches/ty.rs:2694
Function
benchmark_repeated_statement_calls
Regression benchmark for <https://github.com/astral-sh/ty/issues/3986>. Non-terminal-call predicates must gate later narrowing. Keeping these scope-w
crates/ruff_benchmark/benches/ty.rs:2544
Function
benchmark_repeated_str_enum_comparisons
Ensure the comparison profile is reused instead of scanning every member per expression.
crates/ruff_benchmark/benches/ty.rs:735
Function
benchmark_repeated_suppressing_context_managers
Exercises repeated control-flow gates with and without interleaved statement-call predicates. Each suppressing context manager merges the old binding
crates/ruff_benchmark/benches/ty.rs:2644
Function
benchmark_sequence_literal_union_access
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:591
Function
benchmark_shared_source_order_compaction
Repeated unions share source-order subtrees even after the TDD stops growing. Persisting each result must not expand those shared subtrees into expone
crates/ruff_benchmark/benches/ty_constraint_set.rs:799
Function
benchmark_string_literal_union_comparison
Regression benchmark for <https://github.com/astral-sh/ty/issues/4924>.
crates/ruff_benchmark/benches/ty.rs:867
Function
benchmark_tuple_class_pattern_captures
Regression benchmark for <https://github.com/astral-sh/ty/issues/4676>. Each case matches a pair of class patterns and captures their attributes. Pre
crates/ruff_benchmark/benches/ty.rs:2343
Function
benchmark_tuple_implicit_instance_attributes
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:346
Function
benchmark_typed_dict_get_large_literal_union
Regression benchmark for contextual inference of `TypedDict.get` with a large literal union. Passing the result to a typed function should not retry
crates/ruff_benchmark/benches/ty.rs:1571
Function
benchmark_typeis_narrowing
Regression benchmark for <https://github.com/astral-sh/ty/issues/3120>. Sequential (`TypeIs`) narrowing on a large `Literal` union, combined with `ma
crates/ruff_benchmark/benches/ty.rs:2530
Function
benchmark_typevar_mapping_large_accumulation
Regression benchmark for many precise arguments constraining the same type variable. The parameters are distinct to avoid exercising the `*args` para
crates/ruff_benchmark/benches/ty_constraint_set.rs:38
Function
benchmark_typevar_mapping_small_accumulations
Benchmark for many small type-variable accumulations. This guards the common case where each type variable only receives a few constraints. Optimizin
crates/ruff_benchmark/benches/ty_constraint_set.rs:72
Function
benchmark_union_construction
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:1608
Function
benchmark_vararg_parameter_type_accumulation
Regression benchmark for many precise arguments flowing into one variadic parameter. The declared type is intentionally non-gradual, so argument chec
crates/ruff_benchmark/benches/ty.rs:1536
Function
benchmark_very_large_tuple
Micro-benchmark that tests our performance when slicing and unpacking a very large tuple that has many varied literal strings inside it. Adapted from
crates/ruff_benchmark/benches/ty.rs:930
Function
best_fitting_variants_print_as_lists
()
crates/ruff_formatter/src/macros.rs:387
Function
betwixt_attribute_access1
()
crates/ty_ide/src/completion.rs:6059
Function
betwixt_attribute_access2
()
crates/ty_ide/src/completion.rs:6084
Function
betwixt_attribute_access3
()
crates/ty_ide/src/completion.rs:6109
Function
betwixt_attribute_access4
()
crates/ty_ide/src/completion.rs:6130
Method
big
Create an [`Int`] to represent a value that cannot be represented as an `i64`.
crates/ruff_python_ast/src/int.rs:40
Method
bin
(self)
scripts/ty_benchmark/src/benchmark/venv.py:46
Method
bin_op_expr
(self)
crates/ruff_python_ast/src/generated.rs:1694
Function
bin_op_fields
(node: &ast::ExprBinOp)
crates/ruff_python_ast/src/comparable.rs:1055
Function
binary_expression_left_operand_comment
()
crates/ruff_python_formatter/src/comments/mod.rs:1022
Function
binary_expression_left_operand_trailing_end_of_line_comment
()
crates/ruff_python_formatter/src/comments/mod.rs:1040
Function
binary_op_not_allowed_issue_125631
()
crates/ruff_annotate_snippets/tests/rustc_tests.rs:3904
Function
binary_paren_interplay_grows_stack
()
crates/ruff_python_parser/src/parser/tests.rs:462
Method
bind_constructor_new
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, bindings: Bindings<'db>,
crates/ty_python_semantic/src/types.rs:8051
Method
bind_self
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Option<Typ
crates/ty_python_semantic/src/types/signatures.rs:1522
Method
bind_unused_self
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Type<'
crates/ty_python_semantic/src/types/call/bind/constructor.rs:24
Function
bit_box_size
(bits: &BitBox)
crates/ty_project/src/glob/include.rs:50
Function
bit_box_size
(bits: &RankBitBoxStorage)
crates/ty_python_core/src/rank.rs:36
Function
bitey
b" not a docstring
crates/ruff_python_formatter/resources/test/fixtures/black/cases/bytes_docstring.py:1
Function
bitey2
b' also not a docstring
crates/ruff_python_formatter/resources/test/fixtures/black/cases/bytes_docstring.py:4
Method
bitor
(self, rhs: Self)
crates/ruff_linter/src/rules/pylint/rules/eq_without_hash.rs:167
Method
bitor_assign
(&mut self, rhs: &Self)
crates/ty_python_semantic/src/types/constraints/support.rs:156
Method
bits_with_capacity
(cap: usize)
crates/ty_python_core/src/rank.rs:49
Function
bizz
()
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI010.py:17
Function
black_compatibility
(input_path: &Utf8Path, content: String)
crates/ruff_python_formatter/tests/fixtures.rs:40
Function
blah
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E40.py:71
Function
blank_line_before_underline
Toggle the gizmo. Returns ------- A value of some sort.
crates/ruff_linter/resources/test/fixtures/pydocstyle/sections.py:93
Method
blank_line_continues_field_list
Returns whether a blank line keeps the current field list open. A blank line before an indented continuation stays in the current field list: ```rst
crates/ty_ide/src/docstring/document/rst.rs:253
Function
blank_lines
(rule_code: Rule, path: &Path)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:262
Function
blank_lines_first_line
(rule_code: Rule, path: &Path)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:238
Function
blank_lines_notebook
(rule_code: Rule)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:354
Function
blank_lines_top_level_isort_compatibility
( lines_after_imports: isize, lines_between_types: usize, )
crates/ruff_linter/src/rules/pycodestyle/mod.rs:277
Function
blank_lines_typing_stub
(rule_code: Rule)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:338
Function
blank_lines_typing_stub_isort
()
crates/ruff_linter/src/rules/pycodestyle/mod.rs:365
Function
block_comments_indented_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:20
Function
block_comments_lines_in_triple_quotes_not_a_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:76
Function
block_comments_lines_with_code_not_a_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:48
Function
block_comments_sequential_lines_not_in_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:62
Function
block_comments_single_line_is_not_a_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:34
Function
block_comments_stress_test
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:95
Function
block_comments_two_line_block_at_start
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:6
Function
block_indent
(content: &impl Format<Context>)
crates/ruff_formatter/src/builders.rs:1045
Function
bloom_filter_false_positive
()
crates/ruff_python_formatter/src/comments/mod.rs:584
← previous
next →
16,301–16,400 of 31,562, ranked by callers