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
args_section
(context: &SectionContext)
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:1980
↓ 1 callers
Function
args_to_fstring_expr
Converts the `sep` and `args` arguments to a [`Expr::FString`]. This function will only return [`None`] if there are no arguments at all. ## Note Th
crates/ruff_linter/src/rules/ruff/rules/assert_with_print_message.rs:231
↓ 1 callers
Function
args_to_string_literal_expr
Converts the `sep` and `args` arguments to a [`Expr::StringLiteral`]. This function will return [`None`] if any of the arguments are not string liter
crates/ruff_linter/src/rules/ruff/rules/assert_with_print_message.rs:172
↓ 1 callers
Function
argument_form_from_binding
Returns the form for a single argument from a binding.
crates/ty_python_semantic/src/types/ide_support.rs:1294
↓ 1 callers
Method
argument_matches_keyword_variadic
(&self, argument_index: usize)
crates/ty_python_semantic/src/types/call/bind.rs:3848
↓ 1 callers
Function
argument_simple_defaults
PYI014
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:539
↓ 1 callers
Method
argument_type_context
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Constra
crates/ty_python_semantic/src/types/call/bind.rs:8899
↓ 1 callers
Method
arguments_for_parameter
( &'a self, call_arguments: &'a CallArguments<'a, 'db>, parameter_index: usize, )
crates/ty_python_semantic/src/types/call/bind.rs:9609
↓ 1 callers
Method
as_any
(&self)
crates/ty_test/src/db.rs:602
↓ 1 callers
Method
as_any
(&self)
crates/ty_server/src/system.rs:284
↓ 1 callers
Method
as_any
(&self)
crates/ruff_db/src/system/test.rs:190
↓ 1 callers
Method
as_any_node_ref
Returns the expression as an [`AnyNodeRef`].
crates/ty_python_core/src/unpack.rs:109
↓ 1 callers
Method
as_attempt_to_delete_property_with_no_deleter
Returns `Some(property)` if the call error was caused by an attempt to delete a property that has no deleter, and `None` otherwise.
crates/ty_python_semantic/src/types/call.rs:420
↓ 1 callers
Method
as_attempt_to_get_property_with_no_getter
Returns `Some(property)` if the call error was caused by an attempt to read a property that has no getter, and `None` otherwise.
crates/ty_python_semantic/src/types/call.rs:384
↓ 1 callers
Method
as_attempt_to_set_property_with_no_setter
Returns `Some(property)` if the call error was caused by an attempt to set a property that has no setter, and `None` otherwise.
crates/ty_python_semantic/src/types/call.rs:402
↓ 1 callers
Method
as_augmented_assign_operator
(self)
crates/ruff_python_ast/src/token.rs:576
↓ 1 callers
Method
as_bool_literal
(self)
crates/ty_python_semantic/src/types.rs:3343
↓ 1 callers
Method
as_bool_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1644
↓ 1 callers
Method
as_bool_operator
(self)
crates/ruff_python_ast/src/token.rs:540
↓ 1 callers
Method
as_byte
(self)
crates/ruff_python_ast/src/str.rs:45
↓ 1 callers
Method
as_bytes_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2384
↓ 1 callers
Method
as_class_def
Return the [`ast::StmtClassDef`] of the definition, if it's a class definition.
crates/ruff_python_semantic/src/definition.rs:188
↓ 1 callers
Method
as_clause
(self)
crates/ruff_python_parser/src/parser/statement.rs:4184
↓ 1 callers
Function
as_ctypes_type
r""" Convert a dtype into a ctypes type. Parameters ---------- dtype : dtype The dtype to convert
crates/ruff_benchmark/resources/numpy/ctypeslib.py:467
↓ 1 callers
Method
as_current_assignment
( &self, unpack: Option<Unpack<'db>>, )
crates/ty_python_core/src/builder.rs:6149
↓ 1 callers
Method
as_disjoint_base
Returns whether this class is a disjoint base. A class is considered a disjoint base if: - It has the `@disjoint_base` decorator (static classes only
crates/ty_python_semantic/src/types/class.rs:1008
↓ 1 callers
Method
as_divergent
(self)
crates/ty_python_semantic/src/types.rs:2494
↓ 1 callers
Method
as_end
(&self)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:639
↓ 1 callers
Method
as_exact
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/constraints.rs:3428
↓ 1 callers
Method
as_flag
Returns the semantic model flag that represents the current docstring state.
crates/ruff_linter/src/checkers/ast/mod.rs:188
↓ 1 callers
Method
as_for_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:695
↓ 1 callers
Method
as_i16
Return the [`Int`] as an i16, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:117
↓ 1 callers
Method
as_import_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:991
↓ 1 callers
Method
as_in_memory
Returns the `InMemorySystem` or `None` if the underlying test system isn't the [`InMemorySystem`].
crates/ruff_db/src/system/test.rs:86
↓ 1 callers
Method
as_lambda_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1792
↓ 1 callers
Method
as_line
(&self)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:655
↓ 1 callers
Method
as_list_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2717
↓ 1 callers
Function
as_literal
If an [`Expr`] is a literal (or unary operation on a literal), return the [`LiteralExpressionRef`] and its unary operator, if any.
crates/ruff_linter/src/rules/pylint/rules/magic_value_comparison.rs:73
↓ 1 callers
Method
as_literal
(&self)
crates/ruff_python_ast/src/generated.rs:3007
↓ 1 callers
Method
as_match_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:843
↓ 1 callers
Method
as_match_value
(&self)
crates/ruff_python_ast/src/generated.rs:3139
↓ 1 callers
Method
as_mode
(&self)
crates/ruff_python_parser/src/lib.rs:616
↓ 1 callers
Method
as_module
(&self)
crates/ruff_python_ast/src/generated.rs:77
↓ 1 callers
Method
as_mut_slice
(&mut self)
crates/ruff_python_ast/src/name.rs:751
↓ 1 callers
Method
as_mut_slice
Returns a mutable slice of all the [`TString`]s contained in this value.
crates/ruff_python_ast/src/nodes.rs:895
↓ 1 callers
Method
as_mut_slice
(&mut self)
crates/ruff_index/src/frozen.rs:28
↓ 1 callers
Method
as_mut_vec
(&mut self)
crates/ruff_linter/src/checkers/ast/mod.rs:3748
↓ 1 callers
Function
as_nan_float_string_literal
Checks if `expr` is a string literal that represents NaN. E.g., `"NaN"`, `"-nAn"`, `"+nan"`, or even `" -NaN \n \t"` Returns `None` if it's not. Else
crates/ruff_linter/src/linter/float.rs:6
↓ 1 callers
Method
as_notebook_mut
(&mut self)
crates/ty_server/src/session/index.rs:261
↓ 1 callers
Method
as_notebook_mut
(&mut self)
crates/ruff_server/src/session/index.rs:515
↓ 1 callers
Method
as_pep_695_type_alias
(self)
crates/ty_python_semantic/src/types/type_alias.rs:746
↓ 1 callers
Method
as_print_options
(&self)
crates/ruff_formatter/src/lib.rs:272
↓ 1 callers
Method
as_single_bound
Returns an existing upper-bound clause if every other clause is redundant with it. This preserves constrained type variables without distributing uni
crates/ty_python_semantic/src/types/constraints.rs:2002
↓ 1 callers
Method
as_slice
(&self)
crates/ruff_index/src/frozen.rs:23
↓ 1 callers
Method
as_starred_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2643
↓ 1 callers
Method
as_start
(&self)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:623
↓ 1 callers
Method
as_str
(self)
crates/ty_project/src/metadata/python_version.rs:54
↓ 1 callers
Method
as_str
Return a `str` representation of the prefix
crates/ruff_python_ast/src/str_prefix.rs:30
↓ 1 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/refurb/rules/if_expr_min_max.rs:172
↓ 1 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_literal_within_dict_call.rs:104
↓ 1 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_call_around_sorted.rs:119
↓ 1 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_literal_dict.rs:95
↓ 1 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_collection_call.rs:143
↓ 1 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/ruff/rules/explicit_f_string_type_conversion.rs:245
↓ 1 callers
Method
as_str
(&self)
crates/ruff_linter/src/rules/ruff/rules/invalid_rule_code.rs:22
↓ 1 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/ruff/rules/decimal_from_float_literal.rs:83
↓ 1 callers
Method
as_text
(&self)
crates/ruff_server/src/session/index.rs:529
↓ 1 callers
Method
as_text_mut
(&mut self)
crates/ruff_server/src/session/index.rs:536
↓ 1 callers
Method
as_token_kind
(self)
crates/ruff_python_parser/src/parser/statement.rs:4177
↓ 1 callers
Method
as_type_alias
(&self)
crates/ty_python_core/src/scope.rs:437
↓ 1 callers
Method
as_type_var
(&self)
crates/ruff_python_ast/src/generated.rs:3485
↓ 1 callers
Method
as_type_var_tuple
(&self)
crates/ruff_python_ast/src/generated.rs:3522
↓ 1 callers
Method
as_u32
Return the [`Int`] as an u32, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:85
↓ 1 callers
Method
as_u32
(self)
crates/ruff_python_parser/src/lexer.rs:1498
↓ 1 callers
Method
as_unary_arithmetic_operator
(self)
crates/ruff_python_ast/src/token.rs:512
↓ 1 callers
Method
as_usize
Return the [`Int`] as an usize, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:101
↓ 1 callers
Method
as_variadic
(self)
crates/ruff_python_ast/src/nodes.rs:3703
↓ 1 callers
Method
as_vendored_path
(&self)
crates/ruff_db/src/files/path.rs:64
↓ 1 callers
Method
as_zero_value_expr
(self, checker: &Checker)
crates/ruff_linter/src/rules/pyupgrade/rules/native_literals.rs:40
↓ 1 callers
Function
assert
(expr: &Expr, msg: Option<&Expr>)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:164
↓ 1 callers
Function
assert_diagnostic_messages
(diagnostics: &[Diagnostic], expected: &[&str])
crates/ty_python_semantic/src/types/infer/tests.rs:64
↓ 1 callers
Function
assert_effective_variance
( db: &'db TestDb, type_alias: PEP695TypeAliasType<'db>, expected: TypeVarVariance,
crates/ty_python_semantic/src/types/tests.rs:906
↓ 1 callers
Method
assert_end_boundary
Check that the node's end doesn't fall within a token. Called in `leave_node` after visiting children, so all tokens within the node have been consume
crates/ruff_python_parser/tests/fixtures.rs:485
↓ 1 callers
Function
assert_false
B011
crates/ruff_linter/src/rules/flake8_bugbear/rules/assert_false.rs:83
↓ 1 callers
Function
assert_falsy
PT015
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:606
↓ 1 callers
Function
assert_hashable_equal
(left: &str, right: &str)
crates/ruff_python_ast_integration_tests/tests/comparable.rs:37
↓ 1 callers
Function
assert_in_exception_handler
PT017
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:614
↓ 1 callers
Method
assert_is_used_on_current_thread
(self)
crates/ty_server/src/server/schedule/thread/priority.rs:30
↓ 1 callers
Method
assert_is_used_on_current_thread
(self)
crates/ruff_server/src/server/schedule/thread/priority.rs:30
↓ 1 callers
Function
assert_match_directory
(filter: &IncludeFilter, path: &str)
crates/ty_project/src/glob/include.rs:350
↓ 1 callers
Method
assert_never_argument
Find a variable tested directly, by a comparison, or by a narrowing function. More complex conditions cannot provide an argument without repeating the
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1486
↓ 1 callers
Function
assert_no_ipython_escape_command
(tokens: &[Token])
crates/ruff_python_parser/src/lexer.rs:1956
↓ 1 callers
Method
assert_no_pending_messages
(&self)
crates/ruff_server/tests/e2e/main.rs:282
↓ 1 callers
Function
assert_normalized_path
(db: &TestDb, path: &str, canonical: File)
crates/ruff_db/src/files.rs:766
↓ 1 callers
Function
assert_not_match_directory
(filter: &IncludeFilter, path: &str)
crates/ty_project/src/glob/include.rs:355
↓ 1 callers
Function
assert_on_string_literal
PLW0129
crates/ruff_linter/src/rules/pylint/rules/assert_on_string_literal.rs:51
↓ 1 callers
Method
assert_output
(self, verbose=False)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:261
↓ 1 callers
Function
assert_override
( rule_selections: Vec<RuleSelection>, should_be_overridden: bool, )
crates/ruff_workspace/src/configuration.rs:2218
↓ 1 callers
Function
assert_params_have_definitions
(signature: &Signature<'_>)
crates/ty_python_semantic/src/types/signatures.rs:6783
↓ 1 callers
Function
assert_preview_all_options
(all_options: &AllOptions, preview: bool)
crates/ruff_server/src/session/options.rs:946
← previous
next →
7,801–7,900 of 31,562, ranked by callers