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
_register_notebook_structure_hooks
Register structure hooks for notebook document types to work around cattrs deserialization issues.
scripts/ty_benchmark/src/benchmark/lsp_client.py:15
↓ 1 callers
Function
_remove_whitespace
Replace extra whitespace inside of a string with a single space. Parameters ---------- s : str or unicode The string from wh
crates/ruff_server/resources/test/fixtures/pandas_html.py:78
↓ 1 callers
Function
_run
()
python/ruff/__main__.py:9
↓ 1 callers
Method
_run_cargo_test
(self, *, message_format: Literal["human", "json"])
crates/ty_python_semantic/mdtest.py:88
↓ 1 callers
Method
_run_mdtests_for_file
(self, test_function: str, markdown_file: Path)
crates/ty_python_semantic/mdtest.py:209
↓ 1 callers
Function
_rustfmt
(path: str | Path)
scripts/add_rule.py:210
↓ 1 callers
Method
_setup_build_doc
(self)
crates/ruff_server/resources/test/fixtures/pandas_html.py:651
↓ 1 callers
Method
_text_getter
Return the text of an individual DOM node. Parameters ---------- obj : node-like A DOM node. Re
crates/ruff_server/resources/test/fixtures/pandas_html.py:289
↓ 1 callers
Function
_user_scheme
()
python/ruff/_find_ruff.py:95
↓ 1 callers
Function
_valid_fun
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF052_0.py:18
↓ 1 callers
Function
_validate_flavor
(flavor)
crates/ruff_server/resources/test/fixtures/pandas_html.py:924
↓ 1 callers
Function
a
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/return_type_parameters.py:143
↓ 1 callers
Function
a
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/pep_572_remove_parens.py:43
↓ 1 callers
Function
a
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/remove_parens_from_lhs.py:4
↓ 1 callers
Function
a
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB187.py:4
↓ 1 callers
Function
a
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF100_7.py:5
↓ 1 callers
Function
a
()
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:63
↓ 1 callers
Function
a
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP036_5.py:5
↓ 1 callers
Function
absolute_desperate_search_paths
( db: &dyn Db, importing_file: ResolverFile<'_>, )
crates/ty_module_resolver/src/resolve.rs:581
↓ 1 callers
Function
abstract_base_class
B024 B027
crates/ruff_linter/src/rules/flake8_bugbear/rules/abstract_base_class.rs:153
↓ 1 callers
Method
abstract_inner
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Constrai
crates/ty_python_semantic/src/types/constraints.rs:4555
↓ 1 callers
Method
accepts_annotation
Accepts only `Self` for an instance receiver and `type[Self]` for a class receiver.
crates/ty_python_semantic/src/types/infer/builder/function.rs:137
↓ 1 callers
Method
accepts_extra
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:65
↓ 1 callers
Function
accepts_inplace_argument
Returns `true` if the given method accepts an `inplace` argument when used on a Pandas `DataFrame`, `Series`, or `Index`. See: <https://pandas.pydata
crates/ruff_linter/src/rules/pandas_vet/rules/inplace_argument.rs:148
↓ 1 callers
Method
accepts_separate_type
(&self, name: &str)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:228
↓ 1 callers
Function
access_annotations_from_class_dict_by_key
RUF063
crates/ruff_linter/src/rules/ruff/rules/access_annotations_from_class_dict.rs:151
↓ 1 callers
Function
access_annotations_from_class_dict_with_get
RUF063
crates/ruff_linter/src/rules/ruff/rules/access_annotations_from_class_dict.rs:99
↓ 1 callers
Function
access_invalid_argument_task_out_of_dag
( execution_date, tomorrow_ds, logical_date, **context )
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:27
↓ 1 callers
Function
access_invalid_key_explicit_task
(execution_date)
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:92
↓ 1 callers
Function
access_invalid_key_task
(**context)
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:88
↓ 1 callers
Function
access_invalid_key_task_out_of_dag
(**context)
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:21
↓ 1 callers
Method
accessors_with_functions
Pairs retained accessor types with their source methods, independently of decorators.
crates/ty_python_semantic/src/types.rs:1776
↓ 1 callers
Function
accumulate_constraint
AND a new optional narrowing constraint with an accumulated one.
crates/ty_python_semantic/src/reachability.rs:582
↓ 1 callers
Method
add
(&mut self, path: &SystemPath)
crates/ty_project/src/watch/watcher.rs:169
↓ 1 callers
Method
add
Adds a glob pattern to the builder. Patterns starting with `!` are treated as negated patterns. # Errors Returns an error if the pattern is invalid
crates/ty_module_resolver/src/module_glob.rs:155
↓ 1 callers
Method
add
Attempt to add an original line from a docstring to this code example. Based on the line and the internal state of whether a code example is currentl
crates/ruff_python_formatter/src/string/docstring.rs:698
↓ 1 callers
Method
add
Adds the given symbol to this group. # Panics When this group is non-empty, it is the caller's responsibility to ensure that the symbol's base name
crates/ty_ide/src/all_symbols.rs:352
↓ 1 callers
Method
add
(&mut self, ty: SemanticTokenType)
crates/ty_ide/src/semantic_tokens.rs:600
↓ 1 callers
Method
add_alias_narrowed_places
Add narrowed places from aliased expressions to the possibly-narrowed set.
crates/ty_python_core/src/builder.rs:1313
↓ 1 callers
Method
add_all_assignment
Extracts `__all__` names from the given assignment. If the assignment isn't for `__all__`, then this is a no-op.
crates/ty_ide/src/symbols.rs:958
↓ 1 callers
Method
add_all_from_import
Adds `__all__` from the module imported by `import_from`. i.e., This implements `from module import __all__` semantics.
crates/ty_ide/src/symbols.rs:1147
↓ 1 callers
Method
add_alternative
(&mut self, elements: usize)
crates/ty_python_semantic/src/types/match_pattern.rs:1195
↓ 1 callers
Method
add_and_constraint
( &mut self, a: ScopedReachabilityConstraintId, b: ScopedReachabilityConstraintId,
crates/ty_python_core/src/reachability_constraints.rs:510
↓ 1 callers
Method
add_annotation_to_file
( &self, annotated_line_infos: &mut Vec<AnnotatedLineInfo<'a>>, line_index: usize,
crates/ruff_annotate_snippets/src/renderer/source_map.rs:357
↓ 1 callers
Function
add_argument_completions
Detect and add completions for unset arguments.
crates/ty_ide/src/completion.rs:2078
↓ 1 callers
Method
add_assert_never_else
Add an explicit exhaustiveness check after a redundant final `elif`. Only read a plain variable whose type is a union before the chain, and which nar
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1426
↓ 1 callers
Method
add_assignment
Adds a new assignment, along with any derived information that we can infer from the new assignment combined with the assignments we've already seen.
crates/ty_python_semantic/src/types/constraints/paths.rs:880
↓ 1 callers
Method
add_attribute_expression_range
( &mut self, attribute: &'a ExprAttribute, node: AnyNodeRef<'a>, )
crates/ty_ide/src/folding_range.rs:209
↓ 1 callers
Method
add_binding
(&mut self, place: ScopedPlaceId, binding: LiveBinding)
crates/ty_python_core/src/lib.rs:158
↓ 1 callers
Method
add_block_range
Adds a single folding range for a block.
crates/ty_ide/src/folding_range.rs:141
↓ 1 callers
Method
add_block_ranges
Adds folding ranges for a block.
crates/ty_ide/src/folding_range.rs:482
↓ 1 callers
Method
add_block_ranges_after_keyword
Searches for a given keyword and, if present, adds folds for the block it defines.
crates/ty_ide/src/folding_range.rs:562
↓ 1 callers
Method
add_call_argument_name
( &mut self, argument: &Expr, arguments: &Arguments, name: &str, navig
crates/ty_ide/src/inlay_hints.rs:483
↓ 1 callers
Method
add_call_expression_ranges
(&mut self, call: &'a ExprCall, node: AnyNodeRef<'a>)
crates/ty_ide/src/folding_range.rs:198
↓ 1 callers
Method
add_char
(self, c: char)
crates/ruff_linter/src/line_width.rs:225
↓ 1 callers
Function
add_check_for_node
(checker: &Checker, node: &T, preserves_laziness: bool)
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_c_element_tree.rs:45
↓ 1 callers
Function
add_class_arg_completions
Detect and add completions for unset class arguments. Some arguments we know are always valid and thus they are easy to provide. The `metaclass` keyw
crates/ty_ide/src/completion.rs:2127
↓ 1 callers
Method
add_code_line
Looks for a valid doctest PS2 prompt in the line given. If one is found, it is added to this code example and ownership of the example is returned to
crates/ruff_python_formatter/src/string/docstring.rs:908
↓ 1 callers
Function
add_color
()
crates/ruff_linter/resources/test/fixtures/pylint/modified_iterating_set.py:52
↓ 1 callers
Function
add_colors
()
crates/ruff_linter/resources/test/fixtures/pylint/modified_iterating_set.py:48
↓ 1 callers
Method
add_comment
(&mut self, comment: SuppressionComment, line_range: TextRange, tokens: &Tokens)
crates/ty_python_semantic/src/suppression.rs:670
↓ 1 callers
Method
add_comment
(self, comment: &str)
crates/ruff_linter/src/line_width.rs:257
↓ 1 callers
Method
add_comment_ranges
Compute folding ranges for consecutive comment lines.
crates/ty_ide/src/folding_range.rs:347
↓ 1 callers
Method
add_completions
Add completions, if any and if appropriate, based on the detected import statement.
crates/ty_ide/src/completion.rs:3091
↓ 1 callers
Method
add_conditional
Adds a constraint that selects between two formulas based on `predicate`.
crates/ty_python_core/src/narrowing_constraints.rs:272
↓ 1 callers
Method
add_constrained
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:2017
↓ 1 callers
Method
add_constraint_set
Adds a constraint set to the pending specialization and projects its valid solutions into the legacy type mappings.
crates/ty_python_semantic/src/types/generics.rs:2800
↓ 1 callers
Method
add_custom_region_ranges
Compute folding ranges for `# region` / `# endregion` comments.
crates/ty_ide/src/folding_range.rs:324
↓ 1 callers
Method
add_declaration
( &mut self, node: AnyNodeRef, declaration: Definition<'db>, ty: TypeAndQualif
crates/ty_python_semantic/src/types/infer/builder.rs:1847
↓ 1 callers
Function
add_definition_subdiagnostic
( db: &'db dyn Db, diagnostic: &mut Diagnostic, definition: Option<Definition<'db>>, message:
crates/ty_python_semantic/src/types/infer/builder/post_inference/typed_dict.rs:524
↓ 1 callers
Method
add_delayed_annotation
Add a [`BindingId`] to the list of delayed annotations for the given [`BindingId`].
crates/ruff_python_semantic/src/model.rs:2012
↓ 1 callers
Function
add_diagnostic
Add a diagnostic for the given statement.
crates/ruff_linter/src/rules/flake8_pie/rules/unnecessary_placeholder.rs:117
↓ 1 callers
Function
add_diagnostic
Add a diagnostic for the given method.
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:221
↓ 1 callers
Method
add_dict_key_assignment_definitions
Creates a definition for each key-value assignment in the dictionary. If there are multiple targets, no definitions will be created.
crates/ty_python_core/src/builder.rs:1741
↓ 1 callers
Method
add_dict_key_assignment_definitions_impl
( &mut self, target: &MemberExprBuilder, expr: ast::ExprRef<'ast>, assignment:
crates/ty_python_core/src/builder.rs:1759
↓ 1 callers
Method
add_docstring_range
Add a folding range for a docstring if present at the start of a body. Handles string literals, f-strings, and t-strings (but not bytes literals).
crates/ty_ide/src/folding_range.rs:403
↓ 1 callers
Method
add_dotted_name_tokens
(&mut self, name: &ast::Identifier, token_type: SemanticTokenType)
crates/ty_ide/src/semantic_tokens.rs:725
↓ 1 callers
Function
add_enum_literal
( db: &'db dyn Db, enum_class: &mut Option<EnumClassLiteral<'db>>, names: &mut FxHashS
crates/ty_python_semantic/src/reachability.rs:347
↓ 1 callers
Function
add_equal_enum_literals
Add finite enum members in `ty` that are known to compare equal to `right`.
crates/ty_python_semantic/src/types/equality.rs:1037
↓ 1 callers
Method
add_error
(&mut self, error: notify::Error)
crates/ty_project/src/watch/watcher.rs:206
↓ 1 callers
Method
add_event
(&mut self, event: notify::Event)
crates/ty_project/src/watch/watcher.rs:214
↓ 1 callers
Method
add_exported_from_wildcard
Adds all of the names exported from the module imported by `import_from`. i.e., This implements `from module import *` semantics.
crates/ty_ide/src/symbols.rs:1092
↓ 1 callers
Method
add_file
(self, db: &mut dyn Db, file: File, is_script: bool)
crates/ty_project/src/lib.rs:752
↓ 1 callers
Method
add_first_line
Looks for the first line in a literal or code block. If a first line is found, then this returns true. Otherwise, an empty line has been found and th
crates/ruff_python_formatter/src/string/docstring.rs:1198
↓ 1 callers
Function
add_function_arg_completions
Detect and add completions for unset function arguments. Suggestions are only provided if the cursor is currently inside a function call and the func
crates/ty_ide/src/completion.rs:2166
↓ 1 callers
Method
add_generator_expression_range
( &mut self, generator: &'a ExprGenerator, node: AnyNodeRef<'a>, )
crates/ty_ide/src/folding_range.rs:241
↓ 1 callers
Method
add_glob
(&mut self, glob: Glob)
crates/ty_project/src/glob/include.rs:256
↓ 1 callers
Method
add_global_reference
Add a reference to the given [`BindingId`] in the global scope.
crates/ruff_python_semantic/src/model.rs:1999
↓ 1 callers
Method
add_grouped_sequents
( &mut self, equivalence: TypeVarEquivalenceBound<'db>, mut f: impl FnMut(&mut Self, T
crates/ty_python_semantic/src/types/constraints/sequents.rs:274
↓ 1 callers
Method
add_implicit_self_annotation
Adds an implicit annotation to the first parameter of this signature, if that parameter is positional and does not already have an annotation. We do n
crates/ty_python_semantic/src/types/signatures.rs:1466
↓ 1 callers
Method
add_import
Track the imports from the given `import ...` statement.
crates/ty_ide/src/symbols.rs:546
↓ 1 callers
Method
add_import_alias
Adds a symbol introduced via an import `stmt`.
crates/ty_ide/src/symbols.rs:916
↓ 1 callers
Method
add_import_at_start
Add an existing import statement to the start of the file.
crates/ruff_linter/src/importer/mod.rs:90
↓ 1 callers
Function
add_import_completions
( db: &'db dyn Db, completions: &mut Completions<'db>, semantic_completions: impl IntoIterator<Ite
crates/ty_ide/src/completion.rs:3168
↓ 1 callers
Function
add_import_completions_with_module_dependency_kind
( db: &'db dyn Db, completions: &mut Completions<'db>, semantic_completions: impl IntoIterator<Ite
crates/ty_ide/src/completion.rs:3157
↓ 1 callers
Method
add_import_from
Track the imports from the given `from ... import ...` statement.
crates/ty_ide/src/symbols.rs:560
↓ 1 callers
Method
add_import_ranges
Compute folding ranges for consecutive import statements. Import blocks separated by blank lines are folded separately. TODO: It might be better to m
crates/ty_ide/src/folding_range.rs:265
↓ 1 callers
Method
add_imported_binding
Binds an imported value without declaring its type, while preserving inherited `Final` metadata. An import does not itself constrain later assignment
crates/ty_python_semantic/src/types/infer/builder/imports.rs:43
↓ 1 callers
Method
add_invalid_comment
(&mut self, kind: SuppressionKind, error: ParseError)
crates/ty_python_semantic/src/suppression.rs:751
↓ 1 callers
Method
add_iter
Print all of the lines in the given iterator to this printer's formatter. Note that callers may treat the first line specially, such that the iterato
crates/ruff_python_formatter/src/string/docstring.rs:272
← previous
next →
7,501–7,600 of 31,562, ranked by callers