Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 1 callers
Method
function
(self)
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:293
↓ 1 callers
Function
function2
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:370
↓ 1 callers
Function
function_annotation_runtime_semantics
Returns the desired `RuntimeSemantics` for a function's annotations
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:133
↓ 1 callers
Function
function_call_in_argument_default
B008
crates/ruff_linter/src/rules/flake8_bugbear/rules/function_call_in_argument_default.rs:140
↓ 1 callers
Function
function_call_in_dataclass_default
RUF009
crates/ruff_linter/src/rules/ruff/rules/function_call_in_dataclass_default.rs:82
↓ 1 callers
Method
function_decorator_types
( &'a self, function: &'a ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder.rs:2216
↓ 1 callers
Function
function_def_visit_preorder_except_body
Very nearly `crate::node::StmtFunctionDef.visit_preorder`, except it is specialized and, crucially, doesn't traverse the body.
crates/ruff_linter/src/rules/ruff/rules/unused_async.rs:108
↓ 1 callers
Function
function_has_before_or_plain_field_validator
( db: &'db dyn Db, definition: Definition<'db>, field_name: &str, )
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1099
↓ 1 callers
Function
function_is_too_complex
C901
crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs:168
↓ 1 callers
Method
function_name
Returns the builtin function name for the base.
crates/ruff_linter/src/rules/refurb/rules/fstring_number_format.rs:228
↓ 1 callers
Function
function_returning_comprehension
(r)
crates/ruff_linter/resources/test/fixtures/pylint/len_as_condition.py:165
↓ 1 callers
Function
function_returning_function
(r)
crates/ruff_linter/resources/test/fixtures/pylint/len_as_condition.py:168
↓ 1 callers
Function
function_returning_int
(r)
crates/ruff_linter/resources/test/fixtures/pylint/len_as_condition.py:156
↓ 1 callers
Function
function_returning_list
(r)
crates/ruff_linter/resources/test/fixtures/pylint/len_as_condition.py:151
↓ 1 callers
Function
function_scope
()
crates/ty_completion_eval/truth/typing-only-auto-import-ranking/main.py:19
↓ 1 callers
Function
function_scope_is_overload_declaration
( db: &dyn Db, index: &SemanticIndex<'_>, file_scope_id: FileScopeId, )
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:77
↓ 1 callers
Function
function_visibility
Infer the [`Visibility`] of a function from its name.
crates/ruff_python_semantic/src/analyze/visibility.rs:190
↓ 1 callers
Method
functions
(self, db: &'db dyn Db, access: ast::ExprContext)
crates/ty_python_semantic/src/types.rs:1089
↓ 1 callers
Method
functools_partial_bound_arguments
Returns the `functools.partial(...)` bound-argument slice and whether it is concrete enough to synthesize a precise partial signature.
crates/ty_python_semantic/src/types/call/arguments.rs:822
↓ 1 callers
Method
functools_partial_callables
Returns the possible reduced callables for this item, one per distinct stored argument case.
crates/ty_python_semantic/src/types/call/bind.rs:448
↓ 1 callers
Method
functools_partial_return_type
Returns the reduced callable type exposed by this `functools.partial(...)` overload.
crates/ty_python_semantic/src/types/call/bind.rs:9626
↓ 1 callers
Method
functools_partial_type
Synthesizes the precise `functools.partial(...)` type for the already-matched bindings. Wrapped unions and intersections keep their original callable
crates/ty_python_semantic/src/types/call/bind.rs:1260
↓ 1 callers
Method
future_annotations_or_stub
(&self)
crates/ruff_python_parser/tests/fixtures.rs:618
↓ 1 callers
Function
future_required_type_annotation
FA102
crates/ruff_linter/src/rules/flake8_future_annotations/rules/future_required_type_annotation.rs:88
↓ 1 callers
Function
future_rewritable_type_annotation
FA100
crates/ruff_linter/src/rules/flake8_future_annotations/rules/future_rewritable_type_annotation.rs:90
↓ 1 callers
Function
fuzz_code
Process one seed, or return None if it was not checked.
python/py-fuzzer/fuzz.py:363
↓ 1 callers
Function
g
Statements that are only allowed in function bodies
crates/ruff_python_formatter/resources/test/fixtures/ruff/parentheses/opening_parentheses_comment_empty.py:26
↓ 1 callers
Function
g
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:603
↓ 1 callers
Function
g
()
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_6.py:11
↓ 1 callers
Function
g
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP036_0.py:107
↓ 1 callers
Function
g
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP028_1.py:57
↓ 1 callers
Method
gen
(self)
crates/ruff_linter/resources/test/fixtures/pylint/yield_in_init.py:16
↓ 1 callers
Function
generate
(unicode_data: &'static str, path: Option<&Path>, truncate: Option<usize>)
crates/ruff_unicode_names2_generator/src/lib.rs:429
↓ 1 callers
Function
generate
(ast: Ast)
crates/ruff_python_ast/generate.py:1173
↓ 1 callers
Function
generate
()
crates/ruff_dev/src/generate_ty_env_vars_reference.rs:89
↓ 1 callers
Function
generate
()
crates/ruff_dev/src/generate_ty_cli_reference.rs:71
↓ 1 callers
Function
generatePlaygroundMarkdown
( files: { [name: string]: string }, shareUrl: string, )
playground/ty/src/Editor/markdown.ts:36
↓ 1 callers
Function
generatePlaygroundMarkdownLink
(shareUrl: string)
playground/ty/src/Editor/markdown.ts:25
↓ 1 callers
Function
generate_aliases
(name_aliases: &'static str, path: &Path)
crates/ruff_unicode_names2_generator/src/lib.rs:442
↓ 1 callers
Function
generate_arguments
Return the corrected argument vector.
crates/ruff_linter/src/rules/pyupgrade/rules/format_literals.rs:178
↓ 1 callers
Method
generate_assert
(self, args: &[Expr], keywords: &[Keyword])
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:280
↓ 1 callers
Function
generate_assignment_with_removeaffix
Generates the source code string ```python text = text.removeprefix(prefix) ``` or ```python text = text.removesuffix(prefix) ``` as appropriate.
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:438
↓ 1 callers
Function
generate_call
Returns the corrected function call.
crates/ruff_linter/src/rules/pyupgrade/rules/format_literals.rs:212
↓ 1 callers
Function
generate_command
(output: &mut String, command: &'a Command, parents: &mut Vec<&'a Command>)
crates/ruff_dev/src/generate_ty_cli_reference.rs:94
↓ 1 callers
Function
generate_del_statement
(obj: &Expr, attr_name: &str, generator: Generator)
crates/ruff_linter/src/rules/flake8_bugbear/rules/delattr_with_constant.rs:116
↓ 1 callers
Function
generate_dict_comprehension
Format a code snippet to expression `{key: value for key in keys}`, where `keys` and `value` are the parameters of `dict.fromkeys`.
crates/ruff_linter/src/rules/ruff/rules/mutable_fromkeys_value.rs:101
↓ 1 callers
Function
generate_fix
( checker: &Checker, open: &FileOpen, with_stmt: &ast::StmtWith, call_expr: &Expr, suggest
crates/ruff_linter/src/rules/refurb/rules/write_whole_file.rs:204
↓ 1 callers
Function
generate_fix
( checker: &Checker, open: &FileOpen, expr: &Expr, with_stmt: &ast::StmtWith, suggestion:
crates/ruff_linter/src/rules/refurb/rules/read_whole_file.rs:193
↓ 1 callers
Function
generate_fix
(checker: &Checker, call: &ast::ExprCall, base: Base, arg: &Expr)
crates/ruff_linter/src/rules/refurb/rules/redundant_log_base.rs:149
↓ 1 callers
Function
generate_fix
(checker: &Checker, expr_bin_op: &ast::ExprBinOp)
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/explicit.rs:139
↓ 1 callers
Function
generate_fix
Generate the [`Fix`] for EM001, EM002, and EM003 violations. This assumes that the violation is fixable and that the patch should be generated. The e
crates/ruff_linter/src/rules/flake8_errmsg/rules/string_in_exception.rs:288
↓ 1 callers
Function
generate_fix
Generate a [`Fix`] to convert the return type annotation to `Iterator` or `AsyncIterator`.
crates/ruff_linter/src/rules/flake8_pyi/rules/bad_generator_return_type.rs:241
↓ 1 callers
Function
generate_fix
Generate a fix to convert a `Final[Literal[...]]` annotation to a `Final` annotation.
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_final_literal.rs:121
↓ 1 callers
Function
generate_fix
( generic_base: &ast::Expr, arguments: &ast::Arguments, checker: &Checker, )
crates/ruff_linter/src/rules/flake8_pyi/rules/generic_not_last_base_class.rs:157
↓ 1 callers
Function
generate_fix
Generate a [`Fix`] for the given [`Expr`] as per the [`ConversionType`].
crates/ruff_linter/src/rules/ruff/rules/implicit_optional.rs:140
↓ 1 callers
Function
generate_fix
( checker: &Checker, other_exprs: &[&Expr], none_exprs: &[&Expr], annotation: &Expr, is_pe
crates/ruff_linter/src/rules/ruff/rules/none_not_at_end_of_union.rs:152
↓ 1 callers
Function
generate_fix
Generate a [`Edit`] for a `stdout` and `stderr` [`Keyword`] pair.
crates/ruff_linter/src/rules/pyupgrade/rules/replace_stdout_stderr.rs:108
↓ 1 callers
Method
generate_impl
(&self, db: &'db dyn Db, classinfo: Type<'db>)
crates/ty_python_semantic/src/types/narrow.rs:568
↓ 1 callers
Function
generate_iter_impl
Implement `impl IntoIterator for &Linter` and `RuleCodePrefix::iter()`
crates/ruff_macros/src/map_codes.rs:361
↓ 1 callers
Function
generate_keyword_fix
Generate an [`Edit`] to set `encoding="utf-8"`.
crates/ruff_linter/src/rules/pylint/rules/unspecified_encoding.rs:180
↓ 1 callers
Function
generate_markdown
()
crates/ruff_dev/src/generate_ty_rules.rs:60
↓ 1 callers
Function
generate_module
()
scripts/generate_builtin_modules.py:66
↓ 1 callers
Function
generate_newtype_index
(item: ItemStruct)
crates/ruff_macros/src/newtype_index.rs:5
↓ 1 callers
Function
generate_pep604_fix
Generate a [`Fix`] for two or more type expressions, e.g. `int | float | complex`.
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_numeric_union.rs:335
↓ 1 callers
Function
generate_pep604_fix
Generate a [`Fix`] for two or more type expressions, e.g. `int | float | complex`.
crates/ruff_linter/src/rules/flake8_pyi/rules/duplicate_union_member.rs:168
↓ 1 callers
Function
generate_phf
( unicode_data: &'static str, path: Option<&Path>, truncate: Option<usize>, lambda: usize,
crates/ruff_unicode_names2_generator/src/lib.rs:407
↓ 1 callers
Function
generate_range_len_call
Format a code snippet to call `range(len(name))`, where `name` is the given sequence name.
crates/ruff_linter/src/rules/refurb/rules/unnecessary_enumerate.rs:231
↓ 1 callers
Function
generate_redundant_comparison
( compare: &ast::ExprCompare, tokens: &Tokens, source: &str, comparator: &Expr, kind: bool
crates/ruff_linter/src/rules/pycodestyle/rules/literal_comparisons.rs:180
↓ 1 callers
Function
generate_removeaffix_expr
Generates the source code string ```python text.removeprefix(prefix) ``` or ```python text.removesuffix(suffix) ``` as appropriate.
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:459
↓ 1 callers
Function
generate_rule_metadata
Add frontmatter metadata containing a rule's description and optional code. For example: ```yaml --- description: Checks for abstract
scripts/generate_mkdocs.py:125
↓ 1 callers
Function
generate_rule_to_code
Map from rule to codes that can be used to select it. This abstraction exists to support a one-to-many mapping, whereby a single rule could map to mul
crates/ruff_macros/src/map_codes.rs:253
↓ 1 callers
Function
generate_set
(output: &mut String, set: Set, parents: &mut Vec<Set>)
crates/ruff_dev/src/generate_ty_options.rs:66
↓ 1 callers
Function
generate_set
(output: &mut String, set: Set, parents: &mut Vec<Set>)
crates/ruff_dev/src/generate_options.rs:23
↓ 1 callers
Method
generate_sorted_source_code
( &self, elements: &[&str], checker: &Checker, )
crates/ruff_linter/src/rules/ruff/rules/sort_dunder_slots.rs:264
↓ 1 callers
Function
generate_table
( table_out: &mut String, rules: impl IntoIterator<Item = Rule>, default_rules: &RuleTable, )
crates/ruff_dev/src/generate_rules_table.rs:31
↓ 1 callers
Function
generate_with_statement
( context_type: PytestContextType, legacy_call: &ast::ExprCall, match_arg: Option<&Expr>, opti
crates/ruff_linter/src/rules/ruff/rules/legacy_form_pytest_raises.rs:239
↓ 1 callers
Method
generated_hash
( self, db: &'db dyn Db, class: StaticClassLiteral<'db>, specialization: Optio
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:94
↓ 1 callers
Method
generator_annotation_send_type
Extract explicit send constraints from a generator function's return annotation. An iterator annotation does not expose `send`, but its presence in a
crates/ty_python_semantic/src/types.rs:9010
↓ 1 callers
Method
generator_yield_type_context
Derive the type context for a generator expression's yielded element from the expected type of the generator expression itself. We model the generato
crates/ty_python_semantic/src/types/infer/builder.rs:8614
↓ 1 callers
Method
generators
Return the generator comprehensions for the candidate.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:225
↓ 1 callers
Function
generic_arguments_to_type_vars
Returns the type variables `exprs` represent. If at least one of them cannot be converted to [`TypeVar`], `None` is returned.
crates/ruff_linter/src/rules/ruff/rules/class_with_mixed_type_vars.rs:182
↓ 1 callers
Function
generic_contexts_mentioned_in_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:154
↓ 1 callers
Function
generic_gradual_intersection
Simplify same-class gradual intersections and intersections with top-materialized subclasses. For example, `list[int] & list[Any]` simplifies to `lis
crates/ty_python_semantic/src/types/set_theoretic/generic_gradual_intersections.rs:41
↓ 1 callers
Function
generic_not_last_base_class
PYI059
crates/ruff_linter/src/rules/flake8_pyi/rules/generic_not_last_base_class.rs:105
↓ 1 callers
Method
generic_origin
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:11117
↓ 1 callers
Function
getLanguageTag
* Get the appropriate markdown language tag for a file based on its extension.
playground/ty/src/Editor/markdown.ts:4
↓ 1 callers
Function
get_aliases
(name_aliases: &'static str)
crates/ruff_unicode_names2_generator/src/lib.rs:98
↓ 1 callers
Method
get_args
Returns the arguments passed to the executable.
crates/ruff_db/src/system/command.rs:96
↓ 1 callers
Function
get_argument_index
Determine which argument is associated with the specified offset. Returns zero if not within any argument.
crates/ty_ide/src/signature_help.rs:186
↓ 1 callers
Function
get_call_expr
Returns the innermost call expression that contains the specified offset and the index of the argument that the offset maps to.
crates/ty_ide/src/signature_help.rs:118
↓ 1 callers
Function
get_call_kind
Return the [`CallKind`] of the given function call.
crates/ruff_linter/src/rules/flake8_bandit/rules/shell_injection.rs:453
↓ 1 callers
Function
get_comparison_to_none
If the regex call is compared to `None`, return the comparison and its range. Example: `re.search("abc", s) is None`
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:441
↓ 1 callers
Function
get_completions
( db: &'db ProjectDatabase, path: &SystemPath, offset: ruff_text_size::TextSize, )
crates/ty_completion_bench/src/main.rs:133
↓ 1 callers
Function
get_complexity_number
(stmts: &[Stmt])
crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs:79
↓ 1 callers
Method
get_current_dir
Returns the command's working directory, if explicitly configured.
crates/ruff_db/src/system/command.rs:101
↓ 1 callers
Function
get_docs
Collect all doc comment attributes into a string
crates/ruff_macros/src/rust_doc.rs:22
↓ 1 callers
Function
get_docs
Collect all doc comment attributes into a string
crates/ruff_macros/src/violation_metadata.rs:63
↓ 1 callers
Function
get_element_type
(element: &Stmt, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_django/rules/unordered_body_content_in_model.rs:155
↓ 1 callers
Method
get_env_clear
(&self)
crates/ruff_db/src/system/command.rs:86
↓ 1 callers
Method
get_envs
(&self)
crates/ruff_db/src/system/command.rs:74
← previous
next →
9,801–9,900 of 31,766, ranked by callers