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
Function
class_pattern_positional_result
Validate positional subpatterns against a statically known `__match_args__` type.
crates/ty_python_semantic/src/types/match_pattern.rs:475
↓ 1 callers
Method
class_scope
(self)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:614
↓ 1 callers
Function
class_visibility
Infer the [`Visibility`] of a class from its name.
crates/ruff_python_semantic/src/analyze/visibility.rs:224
↓ 1 callers
Function
class_with_mixed_type_vars
RUF053
crates/ruff_linter/src/rules/ruff/rules/class_with_mixed_type_vars.rs:83
↓ 1 callers
Method
classify
(name: &str)
crates/ty_python_semantic/src/semantic_model.rs:951
↓ 1 callers
Function
classify_decorator
(checker: &Checker, decorator: &Decorator)
crates/ruff_linter/src/rules/ruff/rules/incorrect_decorator_order.rs:115
↓ 1 callers
Method
classify_from_alias_type
( &self, ty: Type, local_name: &ast::Identifier, )
crates/ty_ide/src/semantic_tokens.rs:744
↓ 1 callers
Method
classify_from_definition
( &self, definition: Definition, name_str: &str, )
crates/ty_ide/src/semantic_tokens.rs:404
↓ 1 callers
Method
classify_from_type_for_attribute
( &self, ty: Type, attr_name: &ast::Identifier, )
crates/ty_ide/src/semantic_tokens.rs:586
↓ 1 callers
Method
classify_function_definition
(&self, func: &ast::StmtFunctionDef)
crates/ty_ide/src/semantic_tokens.rs:710
↓ 1 callers
Method
classify_match_token
Classify the `match` soft keyword token. # Panics If the parser isn't positioned at a `match` token.
crates/ruff_python_parser/src/parser/statement.rs:3914
↓ 1 callers
Method
classify_name
( &self, name: &ast::ExprName, )
crates/ty_ide/src/semantic_tokens.rs:380
↓ 1 callers
Method
classify_parameter
( &self, _param: &ast::Parameter, is_first: bool, func: &ast::StmtFunctionDef,
crates/ty_ide/src/semantic_tokens.rs:685
↓ 1 callers
Method
classify_redundant_condition
Classify a condition using its inferred type and truthiness. We return `Some` if the condition is always truthy, always falsy, or otherwise suspiciou
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:689
↓ 1 callers
Method
classify_sequence_enum_member
Classifies one element from a sequence-form `names` argument. This distinguishes between known names, opaque names, known explicit pairs, opaque expl
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:874
↓ 1 callers
Function
clause_body
( body: &'a Suite, kind: SuiteKind, trailing_comments: &'a [SourceComment], )
crates/ruff_python_formatter/src/statement/clause.rs:483
↓ 1 callers
Function
clause_header
Formats a clause header, handling the case where the clause header is suppressed and should not be formatted. Calls the `formatter` to format the con
crates/ruff_python_formatter/src/statement/clause.rs:432
↓ 1 callers
Function
clean
Clear any caches in the current directory or any subdirectories.
crates/ruff/src/commands/clean.rs:14
↓ 1 callers
Function
clean_file_content
Add missing title, fix the header depth, and remove trailing empty lines.
scripts/generate_mkdocs.py:117
↓ 1 callers
Function
clean_interned
Extracted to function to avoid monomorphization
crates/ruff_formatter/src/buffer.rs:381
↓ 1 callers
Method
clean_interned
Removes the soft line breaks from an interned element.
crates/ruff_formatter/src/buffer.rs:375
↓ 1 callers
Function
clean_params_dictionary
Converts a dictionary to a function call while preserving as much styling as possible.
crates/ruff_linter/src/rules/pyupgrade/rules/printf_string_formatting.rs:233
↓ 1 callers
Function
clean_params_tuple
If a tuple has one argument, remove the comma; otherwise, return it as-is.
crates/ruff_linter/src/rules/pyupgrade/rules/printf_string_formatting.rs:211
↓ 1 callers
Function
cleanupClipboardText
(targetSelector)
docs/js/extra.js:1
↓ 1 callers
Function
clearFilters
()
docs/js/rule-filters.js:130
↓ 1 callers
Method
clear_concise_message
Remove the custom concise message, restoring the default behavior of generating a concise message from the headline message and the primary annotation
crates/ruff_db/src/diagnostic/mod.rs:278
↓ 1 callers
Method
clear_deferred_constructor_errors_for_partial_application
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1086
↓ 1 callers
Function
clear_diagnostics_for_document
( query: &DocumentQuery, client: &Client, )
crates/ruff_server/src/server/api/diagnostics.rs:47
↓ 1 callers
Method
clear_pending_publish_diagnostics
(self)
scripts/ty_benchmark/src/benchmark/lsp_client.py:105
↓ 1 callers
Method
clear_types
(&mut self, index: usize)
crates/ty_python_semantic/src/types/call/arguments.rs:724
↓ 1 callers
Function
cli_benchmark_environment
Use checker concurrency defaults independently of the LSP pool limits.
scripts/ty_benchmark/src/benchmark/__init__.py:49
↓ 1 callers
Method
client_settings
(&self)
crates/ruff_server/src/session.rs:245
↓ 1 callers
Method
clone
Shallow clone this repository
python/ruff-ecosystem/ruff_ecosystem/projects.py:341
↓ 1 callers
Function
clone_and_compare
Check a specific repository against two versions of ruff.
python/ruff-ecosystem/ruff_ecosystem/main.py:110
↓ 1 callers
Function
clone_project
( location: str, target_dir: Path, revision: str | None, *, full_history: bool )
scripts/setup_primer_project.py:112
↓ 1 callers
Method
closeDocuments
(names: Iterable<string>)
playground/ty/src/Playground.tsx:724
↓ 1 callers
Method
close_document
(&mut self, key: &DocumentKey)
crates/ty_server/src/session/index.rs:212
↓ 1 callers
Method
close_system_file
Closes a system file and returns whether it was deleted from disk.
crates/ty_server/src/session.rs:2202
↓ 1 callers
Method
close_virtual_file
(&self, session: &mut Session, virtual_path: &SystemVirtualPath)
crates/ty_server/src/session.rs:2263
↓ 1 callers
Method
close_workspace_folder
(&mut self, workspace_uri: &Uri)
crates/ruff_server/src/session/index.rs:186
↓ 1 callers
Method
closed_body
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/recursive.rs:319
↓ 1 callers
Method
closing_parentheses
Returns the paired closing parentheses surrounding `range`, from innermost to outermost.
crates/ty_ide/src/completion.rs:1187
↓ 1 callers
Method
closing_token_for_multiline_definition
(self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:171
↓ 1 callers
Function
cmd_compare
Handle the 'compare' subcommand.
scripts/memory_report.py:375
↓ 1 callers
Function
cmd_run
Handle the 'run' subcommand.
scripts/memory_report.py:426
↓ 1 callers
Function
cmp
( db: &'a dyn Db, sym1: &'a AllSymbolInfo<'_>, sym2: &'a AllSymbolInfo<'_>, )
crates/ty_ide/src/all_symbols.rs:524
↓ 1 callers
Method
cmp
(&self, rhs: &Member<'db>)
crates/ty_python_semantic/src/types/list_members.rs:864
↓ 1 callers
Method
cmp
(&self, other: &Self)
crates/ruff_linter/src/rule_selector.rs:178
↓ 1 callers
Function
cmp_fix
Compare two fixes.
crates/ruff_linter/src/fix/mod.rs:131
↓ 1 callers
Function
cmp_op
Return the name of the `operator` implemented by the given comparison expression.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:429
↓ 1 callers
Method
code
Return the lines of code collected so far for this example. This is borrowed mutably because it may need to mutate the code lines based on the state
crates/ruff_python_formatter/src/string/docstring.rs:809
↓ 1 callers
Method
code_action
(&self, workspace: &Workspace)
crates/ty_wasm/src/lib.rs:991
↓ 1 callers
Method
code_action
(&self)
crates/ruff_linter/src/rules/numpy/rules/numpy_2_0_deprecation.rs:131
↓ 1 callers
Method
codes
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:210
↓ 1 callers
Method
codes
(&self)
crates/ruff_linter/src/suppression.rs:135
↓ 1 callers
Method
coerce
(self, other: NumberLike)
crates/ruff_python_semantic/src/analyze/type_inference.rs:446
↓ 1 callers
Function
collapse_nested_if
Convert `if a: if b:` to `if a and b:`.
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:313
↓ 1 callers
Function
collapsible_else_if
PLR5501
crates/ruff_linter/src/rules/pylint/rules/collapsible_else_if.rs:72
↓ 1 callers
Method
collect
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>,
crates/ty_python_semantic/src/types/equality/enums.rs:706
↓ 1 callers
Function
collect_attribute_chain
Collects the chain of names from an attribute expression. For example, `A.B.C` returns `["A", "B", "C"]`.
crates/ruff_linter/src/rules/pyupgrade/rules/super_call_with_parameters.rs:273
↓ 1 callers
Function
collect_comments
Collect all comments in an import block.
crates/ruff_linter/src/rules/isort/comments.rs:21
↓ 1 callers
Function
collect_diagnostic_entries
Classify each changed test case and assign it to a titled section.
scripts/conformance.py:617
↓ 1 callers
Function
collect_expected_diagnostics
(test_files: Sequence[Path])
scripts/conformance.py:474
↓ 1 callers
Method
collect_exposed_arguments
Follow only arguments exposed outside containers in the completed constructor summary.
crates/ty_python_semantic/src/types/type_alias.rs:130
↓ 1 callers
Method
collect_fields
(&self)
crates/ruff_options_metadata/src/lib.rs:323
↓ 1 callers
Function
collect_file_stats
( test_cases: list[TestCase], test_files: Sequence[Path] )
scripts/conformance.py:762
↓ 1 callers
Method
collect_from_annotated
Collect Pydantic field metadata from the `Annotated` part of a field's annotation.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:246
↓ 1 callers
Method
collect_from_rhs_type
Collect Pydantic field metadata from the right-hand side of a field's assignment. For example, collect the default value and alias from the following
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:127
↓ 1 callers
Function
collect_guaranteed_keys_from_merged_unpacked_keyword
Collects keys guaranteed by one unpacked constructor argument.
crates/ty_python_semantic/src/types/typed_dict.rs:2246
↓ 1 callers
Function
collect_guaranteed_keyword_keys
Collects constructor keys that are guaranteed to be provided by keyword arguments. Explicit keyword arguments always provide their key. For `**kwargs
crates/ty_python_semantic/src/types/typed_dict.rs:2198
↓ 1 callers
Function
collect_implementation_root_classes
Normalizes a receiver type into the class roots used for implementation lookup.
crates/ty_python_semantic/src/types/ide_support.rs:723
↓ 1 callers
Function
collect_metadata
( run: str, projects: Sequence[str], *, repo: str, analyzer_repo: str, attempt: int |
scripts/collect_ty_ecosystem_run_metadata.py:258
↓ 1 callers
Function
collect_names
(expr: &'a Expr, names: &mut Vec<&'a ExprName>)
crates/ruff_linter/src/rules/refurb/rules/for_loop_writes.rs:119
↓ 1 callers
Function
collect_names
Collect all named variables in an expression consisting solely of tuples and names.
crates/ruff_linter/src/rules/pyupgrade/rules/yield_in_for_loop.rs:187
↓ 1 callers
Function
collect_nested_args
Collect a new set of arguments to by either accepting existing args as-is or collecting child arguments, if it's a call to the same function.
crates/ruff_linter/src/rules/pylint/rules/nested_min_max.rs:129
↓ 1 callers
Function
collect_non_none
Collect all non-`None` leaf elements of a chain of `BitOr` binary operations. For example, `a | None | b` is collected as `[a, b]`.
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs:374
↓ 1 callers
Function
collect_per_file_ignores
Convert a list of `PatternPrefixPair` structs to `PerFileIgnore`.
crates/ruff/src/args.rs:1508
↓ 1 callers
Function
collect_segments
(expr: &'a Expression, parts: &mut SmallVec<[&'a str; 8]>)
crates/ruff_linter/src/fix/codemods.rs:210
↓ 1 callers
Function
collect_string_sequence_items
Given data on each line in a multiline string sequence, group lines together into "items". Each item contains exactly one string element, but might c
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:742
↓ 1 callers
Function
collect_string_sequence_lines
Collect data on each line of a multiline string sequence. Return `None` if the sequence appears to be invalid, or if it's an edge case we don't suppor
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:556
↓ 1 callers
Function
collect_tests
Collect the tests from the given source text.
crates/ruff_python_parser/tests/generate_inline_tests.rs:211
↓ 1 callers
Function
collect_ty_diagnostics
( ty_path: list[str], source: Source, test_files: Sequence[Path], python_version: str = "3.12"
scripts/conformance.py:513
↓ 1 callers
Method
collect_typevar
(&mut self, expression: &ast::Expr)
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:473
↓ 1 callers
Method
collect_typevartuple_arguments
Collects arguments matched to a starred parameter into their complete tuple shape. Direct arguments and splatted values are collected in call order.
crates/ty_python_semantic/src/types/call/bind.rs:7487
↓ 1 callers
Function
collect_typing_references
Traverses the type expression and collects `[Expr::Name]` nodes that are not available at runtime and thus need to be quoted, unless they would become
crates/ruff_linter/src/rules/flake8_type_checking/rules/type_alias_quotes.rs:199
↓ 1 callers
Function
collect_unsupported_syntax_errors
Collects the unsupported syntax errors and assigns a unique hash to each error.
crates/ruff_python_formatter/tests/fixtures.rs:632
↓ 1 callers
Function
collected_tests
(db: &TestDb, path: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1282
↓ 1 callers
Method
collection_context
Returns a filtering context for use with a completion collector.
crates/ty_ide/src/completion.rs:831
↓ 1 callers
Function
collection_literal_concatenation
RUF005
crates/ruff_linter/src/rules/ruff/rules/collection_literal_concatenation.rs:188
↓ 1 callers
Method
collection_use_constraints
(&self)
crates/ty_python_semantic/src/types/infer.rs:1585
↓ 1 callers
Function
collections_named_tuple
PYI024
crates/ruff_linter/src/rules/flake8_pyi/rules/collections_named_tuple.rs:55
↓ 1 callers
Method
collects_expected_types
Whether this region's inference should record expected types for string-literal completions. They're only ever read for files open in the editor.
crates/ty_python_semantic/src/types/infer/builder.rs:7207
↓ 1 callers
Function
colon_range
Returns the range of the `:` ending the clause header or `Err` if the colon can't be found.
crates/ruff_python_formatter/src/statement/clause.rs:684
↓ 1 callers
Method
color_spec
(&self, level: &Level<'_>, stylesheet: &Stylesheet)
crates/ruff_annotate_snippets/src/renderer/render.rs:2657
↓ 1 callers
Method
combine
(self, _other: Self)
crates/ty_project/src/metadata/options.rs:1567
↓ 1 callers
Method
combine_with
(&mut self, _other: Self)
crates/ty_project/src/metadata/options.rs:1564
↓ 1 callers
Method
combine_with
(&mut self, other: Self)
crates/ty_combine/src/lib.rs:73
↓ 1 callers
Method
combine_with
(&mut self, other: Self)
crates/ruff_server/src/session/options.rs:185
↓ 1 callers
Method
command
(self, project: Project, venv: Venv, single_threaded: bool)
scripts/ty_benchmark/src/benchmark/tool.py:123
↓ 1 callers
Method
command_executor
Returns the system's command executor, if it supports running commands.
crates/ruff_db/src/system.rs:125
← previous
next →
8,401–8,500 of 31,562, ranked by callers