MCPcopy Create free account

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

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

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:1792
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:1673
Functionbenchmark_lexer
(criterion: &mut Criterion<WallTime>)
crates/ruff_benchmark/benches/lexer.rs:39
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:2081
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:2025
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:2055
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:2299
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:306
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:668
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:234
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:440
Functionbenchmark_mixed_many_invariant_typevars
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:706
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:367
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:2410
Functionbenchmark_nested_class_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive class patterns.
crates/ruff_benchmark/benches/ty.rs:2455
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_mapping_pattern_exhaustiveness
Regression benchmark for exhaustiveness checks on recursive mapping patterns.
crates/ruff_benchmark/benches/ty.rs:2487
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:338
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:1499
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:750
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:1342
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:1380
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:1416
Functionbenchmark_recursive_typed_dict_union_contextual_inference
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:486
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:2694
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:2544
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:2644
Functionbenchmark_sequence_literal_union_access
(criterion: &mut Criterion)
crates/ruff_benchmark/benches/ty_constraint_set.rs:591
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:799
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:2343
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:1571
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:2530
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:1608
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:1536
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:6059
Functionbetwixt_attribute_access2
()
crates/ty_ide/src/completion.rs:6084
Functionbetwixt_attribute_access3
()
crates/ty_ide/src/completion.rs:6109
Functionbetwixt_attribute_access4
()
crates/ty_ide/src/completion.rs:6130
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:8051
Methodbind_self
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Option<Typ
crates/ty_python_semantic/src/types/signatures.rs:1522
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:156
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
Functionblank_lines_notebook
(rule_code: Rule)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:354
Functionblank_lines_top_level_isort_compatibility
( lines_after_imports: isize, lines_between_types: usize, )
crates/ruff_linter/src/rules/pycodestyle/mod.rs:277
Functionblank_lines_typing_stub
(rule_code: Rule)
crates/ruff_linter/src/rules/pycodestyle/mod.rs:338
Functionblank_lines_typing_stub_isort
()
crates/ruff_linter/src/rules/pycodestyle/mod.rs:365
Functionblock_comments_indented_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:20
Functionblock_comments_lines_in_triple_quotes_not_a_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:76
Functionblock_comments_lines_with_code_not_a_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:48
Functionblock_comments_sequential_lines_not_in_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:62
Functionblock_comments_single_line_is_not_a_block
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:34
Functionblock_comments_stress_test
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:95
Functionblock_comments_two_line_block_at_start
()
crates/ruff_python_trivia_integration_tests/tests/block_comments.rs:6
Functionblock_indent
(content: &impl Format<Context>)
crates/ruff_formatter/src/builders.rs:1045
Functionbloom_filter_false_positive
()
crates/ruff_python_formatter/src/comments/mod.rs:584
← previousnext →16,301–16,400 of 31,562, ranked by callers