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
Function
benchmark_gradual_intersection_negation
Regression benchmark for <https://github.com/astral-sh/ty/issues/4541>. Negating a compound gradual intersection can repeatedly introduce equivalent
crates/ruff_benchmark/benches/ty.rs:2359
Function
benchmark_gradual_intersection_union_equality
Regression benchmark for <https://github.com/astral-sh/ty/issues/4867>. Excluding a union of intersections during equality narrowing can expand expon
crates/ruff_benchmark/benches/ty.rs:2328
Function
benchmark_gradual_literal_union_equality
Regression benchmark for <https://github.com/astral-sh/ty/issues/4256>. Excluding rejected gradual string literals must not expand the complement of
crates/ruff_benchmark/benches/ty.rs:2295
Function
benchmark_gradual_vararg_call
Regression benchmark for large calls to a gradual variadic tail. Without the gradual-call shortcut, every positional argument type is folded into the
crates/ruff_benchmark/benches/ty.rs:1495
Function
benchmark_incompatible_lower_bound_alternatives
Matching a tuple against `T | tuple[T]` makes either the tuple or its element a lower bound for `T`. Both violate the declared bound, and each union m
crates/ruff_benchmark/benches/ty_constraint_set.rs:407
Function
benchmark_incremental
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:130
Function
benchmark_inherited_recursive_protocol
Regression benchmarks for ty#4269: recursive protocol inference and assignment diagnostics. Explicit receiver annotations can repeatedly expand inher
crates/ruff_benchmark/benches/ty.rs:1101
Function
benchmark_invariant_generic_return_union
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:679
Function
benchmark_invariant_generic_union_bound
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:765
Function
benchmark_large_enum_membership
Regression benchmark for membership narrowing over a large enum. The right-hand-side union should be evaluated one listed member at a time. Evaluatin
crates/ruff_benchmark/benches/ty.rs:552
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:1878
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:1759
Function
benchmark_lexer
(criterion: &mut Criterion<WallTime>)
crates/ruff_benchmark/benches/lexer.rs:39
Function
benchmark_list_of_generic_callable
Regression benchmark for <https://github.com/astral-sh/ty/issues/4990>.
crates/ruff_benchmark/benches/ty.rs:1525
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:2167
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:2111
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:2141
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:2385
Function
benchmark_literal_union_aliases
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:1698
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:443
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:805
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:371
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:577
Function
benchmark_mixed_many_invariant_typevars
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:843
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:504
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:2496
Function
benchmark_nested_class_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive class patterns.
crates/ruff_benchmark/benches/ty.rs:2541
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_generic_materialization
Regression benchmark for <https://github.com/astral-sh/ty/issues/5041>. Applying `Top` to a nested generic isolates the cost of materialization in ov
crates/ruff_benchmark/benches/ty.rs:1344
Function
benchmark_nested_mapping_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive mapping patterns.
crates/ruff_benchmark/benches/ty.rs:2573
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:475
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:1547
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:887
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:1371
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:1409
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:1445
Function
benchmark_recursive_typed_dict_union_contextual_inference
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:623
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:2780
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:2630
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:2730
Function
benchmark_sequence_literal_union_access
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:728
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:936
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:2429
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:1619
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:2616
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:1656
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:1584
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:6092
Function
betwixt_attribute_access2
()
crates/ty_ide/src/completion.rs:6117
Function
betwixt_attribute_access3
()
crates/ty_ide/src/completion.rs:6142
Function
betwixt_attribute_access4
()
crates/ty_ide/src/completion.rs:6163
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:8112
Method
bind_self
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Option<Typ
crates/ty_python_semantic/src/types/signatures.rs:1495
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:155
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
← previous
next →
16,401–16,500 of 31,766, ranked by callers