MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions31,766 in github.com/astral-sh/ruff

Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_incremental
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:130
Functionbenchmark_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
Functionbenchmark_invariant_generic_return_union
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:679
Functionbenchmark_invariant_generic_union_bound
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:765
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_lexer
(criterion: &mut Criterion<WallTime>)
crates/ruff_benchmark/benches/lexer.rs:39
Functionbenchmark_list_of_generic_callable
Regression benchmark for <https://github.com/astral-sh/ty/issues/4990>.
crates/ruff_benchmark/benches/ty.rs:1525
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_literal_union_aliases
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:1698
Functionbenchmark_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
Functionbenchmark_many_enum_members
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:505
Functionbenchmark_many_enum_members_2
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:985
Functionbenchmark_many_invariant_typevars
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:805
Functionbenchmark_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
Functionbenchmark_many_string_assignments
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:275
Functionbenchmark_many_tuple_assignments
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:314
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_missing_key_typed_dict_union_copy
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:577
Functionbenchmark_mixed_many_invariant_typevars
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:843
Functionbenchmark_mixed_str_enum_comparison
Ensure comparisons of unions spanning several scalar enum classes avoid member-pair expansion.
crates/ruff_benchmark/benches/ty.rs:816
Functionbenchmark_mixed_typed_dict_union_copy
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:504
Functionbenchmark_mutually_recursive_aliases
Shared recursive references should reuse constructor bodies when aliases are unfolded.
crates/ruff_benchmark/benches/ty.rs:228
Functionbenchmark_narrowed_str_enum_comparison
Regression benchmark for <https://github.com/astral-sh/ty/issues/3830>.
crates/ruff_benchmark/benches/ty.rs:590
Functionbenchmark_nested_class_pattern_capture
Regression benchmark for <https://github.com/astral-sh/ty/issues/4596>.
crates/ruff_benchmark/benches/ty.rs:2496
Functionbenchmark_nested_class_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive class patterns.
crates/ruff_benchmark/benches/ty.rs:2541
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_nested_mapping_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive mapping patterns.
crates/ruff_benchmark/benches/ty.rs:2573
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_pandas_tdd
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:475
Functionbenchmark_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
Functionbenchmark_parser
(criterion: &mut Criterion<WallTime>)
crates/ruff_benchmark/benches/parser.rs:38
Functionbenchmark_preview_rules
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/linter.rs:139
Functionbenchmark_pydantic_core_schema_dict
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:887
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_recursive_protocol_growing_specialization
Comparing a recursive protocol whose specializations grow should not repeatedly expand its members.
crates/ruff_benchmark/benches/ty.rs:1409
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_recursive_typed_dict_union_contextual_inference
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:623
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_repeated_str_enum_comparisons
Ensure the comparison profile is reused instead of scanning every member per expression.
crates/ruff_benchmark/benches/ty.rs:735
Functionbenchmark_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
Functionbenchmark_sequence_literal_union_access
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:728
Functionbenchmark_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
Functionbenchmark_string_literal_union_comparison
Regression benchmark for <https://github.com/astral-sh/ty/issues/4924>.
crates/ruff_benchmark/benches/ty.rs:867
Functionbenchmark_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
Functionbenchmark_tuple_implicit_instance_attributes
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:346
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_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
Functionbenchmark_union_construction
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty.rs:1656
Functionbenchmark_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
Functionbenchmark_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
Functionbest_fitting_variants_print_as_lists
()
crates/ruff_formatter/src/macros.rs:387
Functionbetwixt_attribute_access1
()
crates/ty_ide/src/completion.rs:6092
Functionbetwixt_attribute_access2
()
crates/ty_ide/src/completion.rs:6117
Functionbetwixt_attribute_access3
()
crates/ty_ide/src/completion.rs:6142
Functionbetwixt_attribute_access4
()
crates/ty_ide/src/completion.rs:6163
Methodbig
Create an [`Int`] to represent a value that cannot be represented as an `i64`.
crates/ruff_python_ast/src/int.rs:40
Methodbin
(self)
scripts/ty_benchmark/src/benchmark/venv.py:46
Methodbin_op_expr
(self)
crates/ruff_python_ast/src/generated.rs:1694
Functionbin_op_fields
(node: &ast::ExprBinOp)
crates/ruff_python_ast/src/comparable.rs:1055
Functionbinary_expression_left_operand_comment
()
crates/ruff_python_formatter/src/comments/mod.rs:1022
Functionbinary_expression_left_operand_trailing_end_of_line_comment
()
crates/ruff_python_formatter/src/comments/mod.rs:1040
Functionbinary_op_not_allowed_issue_125631
()
crates/ruff_annotate_snippets/tests/rustc_tests.rs:3904
Functionbinary_paren_interplay_grows_stack
()
crates/ruff_python_parser/src/parser/tests.rs:462
Methodbind_constructor_new
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, bindings: Bindings<'db>,
crates/ty_python_semantic/src/types.rs:8112
Methodbind_self
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Option<Typ
crates/ty_python_semantic/src/types/signatures.rs:1495
Methodbind_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
Functionbit_box_size
(bits: &BitBox)
crates/ty_project/src/glob/include.rs:50
Functionbit_box_size
(bits: &RankBitBoxStorage)
crates/ty_python_core/src/rank.rs:36
Functionbitey
b" not a docstring
crates/ruff_python_formatter/resources/test/fixtures/black/cases/bytes_docstring.py:1
Functionbitey2
b' also not a docstring
crates/ruff_python_formatter/resources/test/fixtures/black/cases/bytes_docstring.py:4
Methodbitor
(self, rhs: Self)
crates/ruff_linter/src/rules/pylint/rules/eq_without_hash.rs:167
Methodbitor_assign
(&mut self, rhs: &Self)
crates/ty_python_semantic/src/types/constraints/support.rs:155
Methodbits_with_capacity
(cap: usize)
crates/ty_python_core/src/rank.rs:49
Functionbizz
()
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI010.py:17
Functionblack_compatibility
(input_path: &Utf8Path, content: String)
crates/ruff_python_formatter/tests/fixtures.rs:40
Functionblah
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E40.py:71
Functionblank_line_before_underline
Toggle the gizmo. Returns ------- A value of some sort.
crates/ruff_linter/resources/test/fixtures/pydocstyle/sections.py:93
Methodblank_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
Functionblank_lines
(rule_code: Rule, path: &Path)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:262
Functionblank_lines_first_line
(rule_code: Rule, path: &Path)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:238
← previousnext →16,401–16,500 of 31,766, ranked by callers