MCPcopy Create free account

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

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

↓ 1 callersFunctionclass_pattern_positional_result
Validate positional subpatterns against a statically known `__match_args__` type.
crates/ty_python_semantic/src/types/match_pattern.rs:475
↓ 1 callersMethodclass_scope
(self)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:614
↓ 1 callersFunctionclass_visibility
Infer the [`Visibility`] of a class from its name.
crates/ruff_python_semantic/src/analyze/visibility.rs:224
↓ 1 callersFunctionclass_with_mixed_type_vars
RUF053
crates/ruff_linter/src/rules/ruff/rules/class_with_mixed_type_vars.rs:83
↓ 1 callersMethodclassify
(name: &str)
crates/ty_python_semantic/src/semantic_model.rs:951
↓ 1 callersFunctionclassify_decorator
(checker: &Checker, decorator: &Decorator)
crates/ruff_linter/src/rules/ruff/rules/incorrect_decorator_order.rs:115
↓ 1 callersMethodclassify_from_alias_type
( &self, ty: Type, local_name: &ast::Identifier, )
crates/ty_ide/src/semantic_tokens.rs:744
↓ 1 callersMethodclassify_from_definition
( &self, definition: Definition, name_str: &str, )
crates/ty_ide/src/semantic_tokens.rs:404
↓ 1 callersMethodclassify_from_type_for_attribute
( &self, ty: Type, attr_name: &ast::Identifier, )
crates/ty_ide/src/semantic_tokens.rs:586
↓ 1 callersMethodclassify_function_definition
(&self, func: &ast::StmtFunctionDef)
crates/ty_ide/src/semantic_tokens.rs:710
↓ 1 callersMethodclassify_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 callersMethodclassify_name
( &self, name: &ast::ExprName, )
crates/ty_ide/src/semantic_tokens.rs:380
↓ 1 callersMethodclassify_parameter
( &self, _param: &ast::Parameter, is_first: bool, func: &ast::StmtFunctionDef,
crates/ty_ide/src/semantic_tokens.rs:685
↓ 1 callersMethodclassify_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 callersMethodclassify_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 callersFunctionclause_body
( body: &'a Suite, kind: SuiteKind, trailing_comments: &'a [SourceComment], )
crates/ruff_python_formatter/src/statement/clause.rs:483
↓ 1 callersFunctionclause_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 callersFunctionclean
Clear any caches in the current directory or any subdirectories.
crates/ruff/src/commands/clean.rs:14
↓ 1 callersFunctionclean_file_content
Add missing title, fix the header depth, and remove trailing empty lines.
scripts/generate_mkdocs.py:117
↓ 1 callersFunctionclean_interned
Extracted to function to avoid monomorphization
crates/ruff_formatter/src/buffer.rs:381
↓ 1 callersMethodclean_interned
Removes the soft line breaks from an interned element.
crates/ruff_formatter/src/buffer.rs:375
↓ 1 callersFunctionclean_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 callersFunctionclean_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 callersFunctioncleanupClipboardText
(targetSelector)
docs/js/extra.js:1
↓ 1 callersFunctionclearFilters
()
docs/js/rule-filters.js:130
↓ 1 callersMethodclear_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 callersMethodclear_deferred_constructor_errors_for_partial_application
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1086
↓ 1 callersFunctionclear_diagnostics_for_document
( query: &DocumentQuery, client: &Client, )
crates/ruff_server/src/server/api/diagnostics.rs:47
↓ 1 callersMethodclear_pending_publish_diagnostics
(self)
scripts/ty_benchmark/src/benchmark/lsp_client.py:105
↓ 1 callersMethodclear_types
(&mut self, index: usize)
crates/ty_python_semantic/src/types/call/arguments.rs:724
↓ 1 callersFunctioncli_benchmark_environment
Use checker concurrency defaults independently of the LSP pool limits.
scripts/ty_benchmark/src/benchmark/__init__.py:49
↓ 1 callersMethodclient_settings
(&self)
crates/ruff_server/src/session.rs:245
↓ 1 callersMethodclone
Shallow clone this repository
python/ruff-ecosystem/ruff_ecosystem/projects.py:341
↓ 1 callersFunctionclone_and_compare
Check a specific repository against two versions of ruff.
python/ruff-ecosystem/ruff_ecosystem/main.py:110
↓ 1 callersFunctionclone_project
( location: str, target_dir: Path, revision: str | None, *, full_history: bool )
scripts/setup_primer_project.py:112
↓ 1 callersMethodcloseDocuments
(names: Iterable<string>)
playground/ty/src/Playground.tsx:724
↓ 1 callersMethodclose_document
(&mut self, key: &DocumentKey)
crates/ty_server/src/session/index.rs:212
↓ 1 callersMethodclose_system_file
Closes a system file and returns whether it was deleted from disk.
crates/ty_server/src/session.rs:2202
↓ 1 callersMethodclose_virtual_file
(&self, session: &mut Session, virtual_path: &SystemVirtualPath)
crates/ty_server/src/session.rs:2263
↓ 1 callersMethodclose_workspace_folder
(&mut self, workspace_uri: &Uri)
crates/ruff_server/src/session/index.rs:186
↓ 1 callersMethodclosed_body
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/recursive.rs:319
↓ 1 callersMethodclosing_parentheses
Returns the paired closing parentheses surrounding `range`, from innermost to outermost.
crates/ty_ide/src/completion.rs:1187
↓ 1 callersMethodclosing_token_for_multiline_definition
(self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:171
↓ 1 callersFunctioncmd_compare
Handle the 'compare' subcommand.
scripts/memory_report.py:375
↓ 1 callersFunctioncmd_run
Handle the 'run' subcommand.
scripts/memory_report.py:426
↓ 1 callersFunctioncmp
( db: &'a dyn Db, sym1: &'a AllSymbolInfo<'_>, sym2: &'a AllSymbolInfo<'_>, )
crates/ty_ide/src/all_symbols.rs:524
↓ 1 callersMethodcmp
(&self, rhs: &Member<'db>)
crates/ty_python_semantic/src/types/list_members.rs:864
↓ 1 callersMethodcmp
(&self, other: &Self)
crates/ruff_linter/src/rule_selector.rs:178
↓ 1 callersFunctioncmp_fix
Compare two fixes.
crates/ruff_linter/src/fix/mod.rs:131
↓ 1 callersFunctioncmp_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 callersMethodcode
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 callersMethodcode_action
(&self, workspace: &Workspace)
crates/ty_wasm/src/lib.rs:991
↓ 1 callersMethodcode_action
(&self)
crates/ruff_linter/src/rules/numpy/rules/numpy_2_0_deprecation.rs:131
↓ 1 callersMethodcodes
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:210
↓ 1 callersMethodcodes
(&self)
crates/ruff_linter/src/suppression.rs:135
↓ 1 callersMethodcoerce
(self, other: NumberLike)
crates/ruff_python_semantic/src/analyze/type_inference.rs:446
↓ 1 callersFunctioncollapse_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 callersFunctioncollapsible_else_if
PLR5501
crates/ruff_linter/src/rules/pylint/rules/collapsible_else_if.rs:72
↓ 1 callersMethodcollect
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>,
crates/ty_python_semantic/src/types/equality/enums.rs:706
↓ 1 callersFunctioncollect_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 callersFunctioncollect_comments
Collect all comments in an import block.
crates/ruff_linter/src/rules/isort/comments.rs:21
↓ 1 callersFunctioncollect_diagnostic_entries
Classify each changed test case and assign it to a titled section.
scripts/conformance.py:617
↓ 1 callersFunctioncollect_expected_diagnostics
(test_files: Sequence[Path])
scripts/conformance.py:474
↓ 1 callersMethodcollect_exposed_arguments
Follow only arguments exposed outside containers in the completed constructor summary.
crates/ty_python_semantic/src/types/type_alias.rs:130
↓ 1 callersMethodcollect_fields
(&self)
crates/ruff_options_metadata/src/lib.rs:323
↓ 1 callersFunctioncollect_file_stats
( test_cases: list[TestCase], test_files: Sequence[Path] )
scripts/conformance.py:762
↓ 1 callersMethodcollect_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 callersMethodcollect_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 callersFunctioncollect_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 callersFunctioncollect_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 callersFunctioncollect_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 callersFunctioncollect_metadata
( run: str, projects: Sequence[str], *, repo: str, analyzer_repo: str, attempt: int |
scripts/collect_ty_ecosystem_run_metadata.py:258
↓ 1 callersFunctioncollect_names
(expr: &'a Expr, names: &mut Vec<&'a ExprName>)
crates/ruff_linter/src/rules/refurb/rules/for_loop_writes.rs:119
↓ 1 callersFunctioncollect_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 callersFunctioncollect_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 callersFunctioncollect_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 callersFunctioncollect_per_file_ignores
Convert a list of `PatternPrefixPair` structs to `PerFileIgnore`.
crates/ruff/src/args.rs:1508
↓ 1 callersFunctioncollect_segments
(expr: &'a Expression, parts: &mut SmallVec<[&'a str; 8]>)
crates/ruff_linter/src/fix/codemods.rs:210
↓ 1 callersFunctioncollect_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 callersFunctioncollect_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 callersFunctioncollect_tests
Collect the tests from the given source text.
crates/ruff_python_parser/tests/generate_inline_tests.rs:211
↓ 1 callersFunctioncollect_ty_diagnostics
( ty_path: list[str], source: Source, test_files: Sequence[Path], python_version: str = "3.12"
scripts/conformance.py:513
↓ 1 callersMethodcollect_typevar
(&mut self, expression: &ast::Expr)
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:473
↓ 1 callersMethodcollect_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 callersFunctioncollect_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 callersFunctioncollect_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 callersFunctioncollected_tests
(db: &TestDb, path: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1282
↓ 1 callersMethodcollection_context
Returns a filtering context for use with a completion collector.
crates/ty_ide/src/completion.rs:831
↓ 1 callersFunctioncollection_literal_concatenation
RUF005
crates/ruff_linter/src/rules/ruff/rules/collection_literal_concatenation.rs:188
↓ 1 callersMethodcollection_use_constraints
(&self)
crates/ty_python_semantic/src/types/infer.rs:1585
↓ 1 callersFunctioncollections_named_tuple
PYI024
crates/ruff_linter/src/rules/flake8_pyi/rules/collections_named_tuple.rs:55
↓ 1 callersMethodcollects_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 callersFunctioncolon_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 callersMethodcolor_spec
(&self, level: &Level<'_>, stylesheet: &Stylesheet)
crates/ruff_annotate_snippets/src/renderer/render.rs:2657
↓ 1 callersMethodcombine
(self, _other: Self)
crates/ty_project/src/metadata/options.rs:1567
↓ 1 callersMethodcombine_with
(&mut self, _other: Self)
crates/ty_project/src/metadata/options.rs:1564
↓ 1 callersMethodcombine_with
(&mut self, other: Self)
crates/ty_combine/src/lib.rs:73
↓ 1 callersMethodcombine_with
(&mut self, other: Self)
crates/ruff_server/src/session/options.rs:185
↓ 1 callersMethodcommand
(self, project: Project, venv: Venv, single_threaded: bool)
scripts/ty_benchmark/src/benchmark/tool.py:123
↓ 1 callersMethodcommand_executor
Returns the system's command executor, if it supports running commands.
crates/ruff_db/src/system.rs:125
← previousnext →8,401–8,500 of 31,562, ranked by callers