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
render_issue_body
Render the daily fuzz issue with instructions for reproducing its failures.
python/py-fuzzer/fuzz.py:557
↓ 1 callers
Method
render_line_with_link_pending
( &mut self, output: &mut String, mut pending_link: PendingLink, mut line: Lin
crates/ty_ide/src/docstring/markdown/general/inline.rs:95
↓ 1 callers
Method
render_line_without_link_conversion
Renders a line without converting hyperlinks.
crates/ty_ide/src/docstring/markdown/general/inline.rs:73
↓ 1 callers
Method
render_markdown
(&self)
crates/ty_ide/src/docstring/markdown.rs:17
↓ 1 callers
Function
render_markdown_link
(output: &mut String, label: Option<&str>, uri: &str)
crates/ty_ide/src/docstring/markdown/general/inline.rs:513
↓ 1 callers
Function
render_markdown_section
( output: &mut String, heading: &str, fields: impl Iterator<Item = &'a SectionItem>, rendered_
crates/ty_ide/src/docstring/markdown/structured.rs:310
↓ 1 callers
Function
render_name_resolutions
( source: &str, path: &str, detail: Option<ResolutionDetail>, include_name: im
crates/ty_python_semantic/src/semantic_model.rs:1696
↓ 1 callers
Function
render_report
( report: str, contents: str, run: dict, artifact: dict, *, title: str = "", full_
scripts/publish_pr_report.py:232
↓ 1 callers
Function
render_short_message
(renderer: &Renderer, groups: &[Group<'_>])
crates/ruff_annotate_snippets/src/renderer/render.rs:238
↓ 1 callers
Function
render_snippet_annotations
( renderer: &Renderer, buffer: &mut StyledBuffer, max_line_num_len: usize, snippet: &Snippet<'
crates/ruff_annotate_snippets/src/renderer/render.rs:563
↓ 1 callers
Function
render_source_line
( renderer: &Renderer, line_info: &AnnotatedLineInfo<'_>, buffer: &mut StyledBuffer, width_off
crates/ruff_annotate_snippets/src/renderer/render.rs:904
↓ 1 callers
Function
render_summary
( test_cases: list[TestCase], file_stats: list[FileStats], *, force_summary_table: bool, )
scripts/conformance.py:893
↓ 1 callers
Function
render_test_cases
( test_cases: list[TestCase], *, format: Literal["diff", "github"] = "diff", )
scripts/conformance.py:705
↓ 1 callers
Method
render_tree
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, output_lines: &mut Ve
crates/ty_python_semantic/src/types/relation_error.rs:850
↓ 1 callers
Function
render_type_code_span_into
(output: &mut String, ty: &str)
crates/ty_ide/src/docstring/markdown/structured.rs:375
↓ 1 callers
Function
render_unreachable_diagnostics
(db: &TestDb, path: &str)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:149
↓ 1 callers
Function
repeated_append
FURB113
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:81
↓ 1 callers
Function
repeated_equality_comparison
PLR1714
crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs:90
↓ 1 callers
Function
repeated_global
FURB154
crates/ruff_linter/src/rules/refurb/rules/repeated_global.rs:61
↓ 1 callers
Function
repeated_keys
F601, F602
crates/ruff_linter/src/rules/pyflakes/rules/repeated_keys.rs:153
↓ 1 callers
Function
repeated_keyword_argument
PLE1132
crates/ruff_linter/src/rules/pylint/rules/repeated_keyword_argument.rs:41
↓ 1 callers
Method
replace_callable_type
(&mut self, before: Type<'db>, after: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:842
↓ 1 callers
Function
replace_custom_typevar_with_self
Add a "Replace with `Self`" fix that does the following: Import `Self` if necessary Remove the first parameter's annotation Replace other uses of the
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:342
↓ 1 callers
Function
replace_docs_section
Takes the existing file contents, inserts the section, returns the transformed content
crates/ruff_dev/src/generate_cli_help.rs:34
↓ 1 callers
Function
replace_flags
(elt: &str, flags: StringLiteralFlags)
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:143
↓ 1 callers
Function
replace_generated_section
(readme: str, generated_content: str)
scripts/generate-crate-readmes.py:87
↓ 1 callers
Method
replace_index_diagnostics
Replaces the diagnostics from indexing the project files with `diagnostics`. This is a no-op if the project files haven't been indexed yet.
crates/ty_project/src/lib.rs:769
↓ 1 callers
Method
replace_redundant_elif_with_assertion
Replaces an always-true final `elif` with an `else` branch and a defensive assertion. Preserves the original condition, comments, branch indentation,
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1573
↓ 1 callers
Function
replace_stdout_stderr
UP022
crates/ruff_linter/src/rules/pyupgrade/rules/replace_stdout_stderr.rs:64
↓ 1 callers
Function
replace_str_enum
UP042
crates/ruff_linter/src/rules/pyupgrade/rules/replace_str_enum.rs:105
↓ 1 callers
Function
replace_trailing_ellipsis_with_original_expr
( mut generated: String, lambda: &ExprLambda, stmt: &Stmt, checker: &Checker, )
crates/ruff_linter/src/rules/pycodestyle/rules/lambda_assignment.rs:272
↓ 1 callers
Function
replace_typevar_usages_with_self
Returns a series of [`Edit`]s that modify all references to the given `typevar`. Only references within `editable_range` will be modified. This ensur
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:405
↓ 1 callers
Function
replace_universal_newlines
UP021
crates/ruff_linter/src/rules/pyupgrade/rules/replace_universal_newlines.rs:54
↓ 1 callers
Function
replace_unprintable
Given some source code and annotation ranges, this routine replaces unprintable characters with printable representations of them. The source code an
crates/ruff_db/src/diagnostic/render.rs:912
↓ 1 callers
Function
replace_with_bytes_literal
Return a [`Fix`] replacing the call to encode with a byte string.
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs:128
↓ 1 callers
Function
replace_with_dict_pop_fix
(checker: &Checker, stmt: &StmtIf, dict: &Dict, key: &Key)
crates/ruff_linter/src/rules/ruff/rules/if_key_in_dict_del.rs:138
↓ 1 callers
Function
replace_with_map
Replace the `starmap` call with a call to the `map` builtin, if `map` has not been shadowed.
crates/ruff_linter/src/rules/ruff/rules/starmap_zip.rs:117
↓ 1 callers
Function
replace_with_self_fix
( semantic: &SemanticModel, importer: &TypingImporter, stmt: &ast::Stmt, returns: &ast::Expr,
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:253
↓ 1 callers
Function
replaceable_by_pathlib
( checker: &Checker, call: &ExprCall, qualified_name: &QualifiedName, )
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/replaceable_by_pathlib.rs:17
↓ 1 callers
Method
replacement
Get replacement for the call or parent expression. Examples: `re.search("abc", s) is None` => `"abc" not in s` `re.search("abc", s)` => `"abc" in s`
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:287
↓ 1 callers
Method
replacement_op
Returns the replacement comparison operator for this membership test.
crates/ruff_linter/src/rules/refurb/rules/single_item_membership_test.rs:163
↓ 1 callers
Function
report_attempted_instantiation_of_abstract_class
( context: &InferContext<'db, '_>, call: &ast::ExprCall, class: ClassType<'db>, abstract_metho
crates/ty_python_semantic/src/types/diagnostic.rs:4146
↓ 1 callers
Function
report_attempted_protocol_instantiation
( context: &InferContext, call: &ast::ExprCall, protocol: ProtocolClass, )
crates/ty_python_semantic/src/types/diagnostic.rs:4096
↓ 1 callers
Function
report_bad_argument_to_get_protocol_members
( context: &InferContext, call: &ast::ExprCall, class: ClassLiteral, )
crates/ty_python_semantic/src/types/diagnostic.rs:3789
↓ 1 callers
Function
report_bad_argument_to_protocol_interface
( context: &InferContext, call: &ast::ExprCall, param_type: Type, )
crates/ty_python_semantic/src/types/diagnostic.rs:3824
↓ 1 callers
Function
report_bad_attribute_access_call
Reports an invalid implicit `__getattr__` or `__getattribute__` call. ```python class C: def __getattr__(self) -> int: ... C().missing # Invalid: P
crates/ty_python_semantic/src/types/diagnostic.rs:2577
↓ 1 callers
Function
report_bad_dunder_delattr_call
( context: &InferContext<'_, '_>, attribute: &str, object_type: Type, target: &ast::ExprAttrib
crates/ty_python_semantic/src/types/diagnostic.rs:2727
↓ 1 callers
Function
report_bad_dunder_delete_call
( context: &InferContext<'db, '_>, dunder_delete_failure: &CallError<'db>, attribute: &str, ob
crates/ty_python_semantic/src/types/diagnostic.rs:2684
↓ 1 callers
Function
report_bad_dunder_get_call
Reports an invalid implicit call to a descriptor's `__get__` method.
crates/ty_python_semantic/src/types/diagnostic.rs:2494
↓ 1 callers
Function
report_bad_dunder_set_call
( context: &InferContext<'db, '_>, dunder_set_failure: &CallError<'db>, object_type: Type<'db>,
crates/ty_python_semantic/src/types/diagnostic.rs:2632
↓ 1 callers
Function
report_bad_frozen_dataclass_inheritance
( context: &InferContext<'db, '_>, class: StaticClassLiteral<'db>, class_node: &ast::StmtClassDef,
crates/ty_python_semantic/src/types/diagnostic.rs:5983
↓ 1 callers
Function
report_bad_import_call
Reports an import that fails while implicitly calling module-level `__getattr__`. ```python from package import missing # Calls package.__getattr__(
crates/ty_python_semantic/src/types/diagnostic.rs:2608
↓ 1 callers
Function
report_call_to_abstract_method
( context: &InferContext, call: &ast::ExprCall, function: FunctionType, method_kind: &str, )
crates/ty_python_semantic/src/types/diagnostic.rs:4121
↓ 1 callers
Function
report_cannot_delete_typed_dict_key
( context: &InferContext<'db, '_>, key_node: AnyNodeRef, typed_dict_ty: TypedDictType<'db>, fi
crates/ty_python_semantic/src/types/diagnostic.rs:4859
↓ 1 callers
Function
report_cannot_pop_required_field_on_typed_dict
( context: &InferContext<'db, '_>, key_node: AnyNodeRef, typed_dict_ty: Type<'db>, field_name:
crates/ty_python_semantic/src/types/diagnostic.rs:4830
↓ 1 callers
Method
report_checked_file
(&self, _db: &ProjectDatabase, _file: File, diagnostics: &[Diagnostic])
crates/ty_project/src/lib.rs:199
↓ 1 callers
Method
report_deprecated_call
Report deprecations selected by a call, excluding implementations already reported by explicit function references. Calls on other objects can invoke
crates/ty_python_semantic/src/types/infer/builder.rs:10824
↓ 1 callers
Method
report_diagnostic
( &self, context: &InferContext<'db, '_>, subscript: &ast::ExprSubscript, valu
crates/ty_python_semantic/src/types/subscript.rs:294
↓ 1 callers
Method
report_diagnostic_impl
(&self, context: &InferContext, condition: TextRange)
crates/ty_python_semantic/src/types/bool.rs:452
↓ 1 callers
Method
report_diagnostics
(&mut self, _db: &ProjectDatabase, diagnostics: Vec<Diagnostic>)
crates/ty_project/src/lib.rs:210
↓ 1 callers
Method
report_diagnostics
( &self, context: &InferContext<'db, '_>, subscript: &ast::ExprSubscript, )
crates/ty_python_semantic/src/types/subscript.rs:265
↓ 1 callers
Method
report_diagnostics_with_override
( &self, context: &InferContext<'db, '_>, node: ast::AnyNodeRef, overrides: &C
crates/ty_python_semantic/src/types/call/bind.rs:1560
↓ 1 callers
Function
report_discarded_extra_arguments
Report keyword arguments that the Pydantic model constructor silently discards.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1466
↓ 1 callers
Function
report_duplicate_bases
( context: &InferContext, class: StaticClassLiteral, duplicate_base_error: &DuplicateBaseError,
crates/ty_python_semantic/src/types/diagnostic.rs:4358
↓ 1 callers
Function
report_duplicate_typed_dict_constructor_key
( context: &InferContext<'db, 'ast>, typed_dict: TypedDictType<'db>, key: &str, duplicate_node
crates/ty_python_semantic/src/types/typed_dict.rs:2546
↓ 1 callers
Function
report_dynamic_function_decorator_return
( context: &InferContext<'db, '_>, decorator: &ast::Decorator, decorated_ty: Type<'db>, decora
crates/ty_python_semantic/src/types/diagnostic.rs:2756
↓ 1 callers
Method
report_element_diagnostics
Report diagnostics for a single union element. If the element is an intersection where all bindings failed, use priority hierarchy.
crates/ty_python_semantic/src/types/call/bind.rs:1630
↓ 1 callers
Function
report_error
(err: &anyhow::Error)
crates/ruff/src/main.rs:51
↓ 1 callers
Function
report_fix_syntax_error
( path: &Path, transformed: &str, error: &ParseError, rules: impl IntoIterator<Item = &'a str>
crates/ruff_linter/src/linter.rs:689
↓ 1 callers
Function
report_implicit_return_type
( context: &InferContext, range: impl Ranged, expected_ty: Type, has_empty_body: bool, enc
crates/ty_python_semantic/src/types/diagnostic.rs:3167
↓ 1 callers
Function
report_incompatible_base_method
Reports an incompatible pair of source-defined methods in a resolved MRO.
crates/ty_python_semantic/src/types/diagnostic.rs:5467
↓ 1 callers
Function
report_incompatible_method_override
( context: &InferContext<'db, '_>, violation: MethodOverrideViolation, member: &str, subclass:
crates/ty_python_semantic/src/types/diagnostic.rs:5265
↓ 1 callers
Function
report_index_out_of_bounds
Emit a diagnostic declaring that an index is out of bounds for a tuple.
crates/ty_python_semantic/src/types/diagnostic.rs:1755
↓ 1 callers
Function
report_invalid_argument_number_to_special_form
( context: &InferContext, subscript: &ast::ExprSubscript, special_form: impl Into<SpecialFormType>
crates/ty_python_semantic/src/types/diagnostic.rs:3747
↓ 1 callers
Function
report_invalid_arguments_to_annotated
( context: &InferContext, subscript: &ast::ExprSubscript, )
crates/ty_python_semantic/src/types/diagnostic.rs:3734
↓ 1 callers
Function
report_invalid_arguments_to_callable
( context: &InferContext, subscript: &ast::ExprSubscript, )
crates/ty_python_semantic/src/types/diagnostic.rs:3860
↓ 1 callers
Function
report_invalid_assignment
( context: &InferContext<'db, '_>, target_node: AnyNodeRef, definition: Definition<'db>, decla
crates/ty_python_semantic/src/types/diagnostic.rs:2260
↓ 1 callers
Function
report_invalid_attribute_override
Reports an invalid override between a class variable and an instance variable.
crates/ty_python_semantic/src/types/overrides.rs:1895
↓ 1 callers
Function
report_invalid_base
( context: &'env InferContext<'db, '_>, base_node: &ast::Expr, base_type: Type<'db>, class: St
crates/ty_python_semantic/src/types/diagnostic.rs:4551
↓ 1 callers
Function
report_invalid_class_match_pattern
( context: &InferContext, pattern_cls: T, cls_ty: Type, )
crates/ty_python_semantic/src/types/diagnostic.rs:3872
↓ 1 callers
Function
report_invalid_concatenate_last_arg
( context: &InferContext<'db, '_>, last_arg: &ast::Expr, last_arg_type: Type<'db>, )
crates/ty_python_semantic/src/types/diagnostic.rs:6228
↓ 1 callers
Method
report_invalid_enum_names_argument
( &mut self, names_arg: &ast::Expr, base_class: KnownClass, )
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:893
↓ 1 callers
Function
report_invalid_exception_caught
(context: &InferContext, node: &ast::Expr, ty: Type)
crates/ty_python_semantic/src/types/diagnostic.rs:3446
↓ 1 callers
Function
report_invalid_exception_cause
(context: &InferContext, node: &ast::Expr, ty: Type)
crates/ty_python_semantic/src/types/diagnostic.rs:3504
↓ 1 callers
Function
report_invalid_exception_raised
( context: &InferContext, raised_node: &ast::Expr, raise_type: Type, )
crates/ty_python_semantic/src/types/diagnostic.rs:3480
↓ 1 callers
Function
report_invalid_exception_tuple_caught
( context: &InferContext<'db, 'ast>, node: &'ast ast::ExprTuple, node_type: Type<'db>, invalid
crates/ty_python_semantic/src/types/diagnostic.rs:3409
↓ 1 callers
Function
report_invalid_explicit_override
( context: &InferContext<'db, '_>, member: &Member<'db>, class: ClassType<'db>, definition: Lo
crates/ty_python_semantic/src/types/overrides.rs:2072
↓ 1 callers
Function
report_invalid_explicit_return
( context: &InferContext, object_range: impl Ranged, return_type_range: impl Ranged, expected_
crates/ty_python_semantic/src/types/diagnostic.rs:2910
↓ 1 callers
Function
report_invalid_generator_function_return_type
( context: &InferContext, return_type_range: TextRange, inferred_return: KnownClass, expected_
crates/ty_python_semantic/src/types/diagnostic.rs:2991
↓ 1 callers
Function
report_invalid_match_args_type
( context: &InferContext, pattern: T, match_args_ty: Type, cls_ty: Type, )
crates/ty_python_semantic/src/types/diagnostic.rs:3905
↓ 1 callers
Function
report_invalid_named_tuple_field_qualifier
Report a `NamedTuple` field annotated with a type qualifier that `NamedTuple` does not accept. The diagnostic is anchored to the annotated assignment
crates/ty_python_semantic/src/types/diagnostic.rs:4793
↓ 1 callers
Function
report_invalid_or_unsupported_base
( context: &InferContext, base_node: &ast::Expr, base_type: Type, class: StaticClassLiteral, )
crates/ty_python_semantic/src/types/diagnostic.rs:4400
↓ 1 callers
Function
report_invalid_total_ordering
( context: &InferContext<'_, '_>, class: ClassLiteral<'_>, decorator: &ast::Decorator, )
crates/ty_python_semantic/src/types/diagnostic.rs:6070
↓ 1 callers
Function
report_invalid_total_ordering_call
Reports an invalid `total_ordering(cls)` function call where the class does not define any ordering method.
crates/ty_python_semantic/src/types/diagnostic.rs:6094
↓ 1 callers
Function
report_invalid_type_param_order
( context: &InferContext<'db, '_>, class: StaticClassLiteral<'db>, node: &ast::StmtClassDef, t
crates/ty_python_semantic/src/types/diagnostic.rs:4933
↓ 1 callers
Function
report_invalid_typed_dict_openness
( context: &InferContext<'_, '_>, class: StaticClassLiteral<'_>, message: impl std::fmt::Display,
crates/ty_python_semantic/src/types/infer/builder/post_inference/typed_dict.rs:332
↓ 1 callers
Function
report_invalid_typevar_default_reference
( context: &InferContext<'db, '_>, class: StaticClassLiteral<'db>, typevar_with_bad_default: TypeV
crates/ty_python_semantic/src/types/diagnostic.rs:5017
↓ 1 callers
Function
report_invalid_union_type_elements
Report an error if a `types.UnionType` instance passed to `isinstance()`/`issubclass()` contains elements that are not class objects.
crates/ty_python_semantic/src/types/infer/builder/function.rs:2488
↓ 1 callers
Function
report_issubclass_check_against_protocol_with_non_method_members
( context: &'db InferContext<'db, '_>, call: &ast::ExprCall, protocol: ProtocolClass<'db>, non
crates/ty_python_semantic/src/types/diagnostic.rs:3958
↓ 1 callers
Function
report_lazy_import_policy
( checker: &Checker, stmt: &Stmt, range: ruff_text_size::TextRange, name: Option<String>,
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/lazy_import_mismatch.rs:145
← previous
next →
12,701–12,800 of 31,562, ranked by callers