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
as_bool_literal
(self)
crates/ty_python_semantic/src/types.rs:3342
↓ 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:1027
↓ 1 callers
Method
as_divergent
(self)
crates/ty_python_semantic/src/types.rs:2493
↓ 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:3389
↓ 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:908
↓ 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:3767
↓ 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:259
↓ 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:749
↓ 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:1931
↓ 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:3716
↓ 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:1485
↓ 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:2176
↓ 1 callers
Function
assert_params_have_definitions
(signature: &Signature<'_>)
crates/ty_python_semantic/src/types/signatures.rs:6686
↓ 1 callers
Function
assert_preview_all_options
(all_options: &AllOptions, preview: bool)
crates/ruff_server/src/session/options.rs:946
↓ 1 callers
Function
assert_preview_client_options
(options: &ClientOptions, preview: bool)
crates/ruff_server/src/session/options.rs:941
↓ 1 callers
Function
assert_raises_exception
B017
crates/ruff_linter/src/rules/flake8_bugbear/rules/assert_raises_exception.rs:107
↓ 1 callers
Function
assert_raises_exception_call
B017 (call form)
crates/ruff_linter/src/rules/flake8_bugbear/rules/assert_raises_exception.rs:132
↓ 1 callers
Function
assert_shared
(expected: &CharStr, actual: &CharStr)
crates/ty_project/src/uv/metadata.rs:368
↓ 1 callers
Method
assert_start_boundary
Check that the node's start doesn't fall within a token. Called in `enter_node` before visiting children.
crates/ruff_python_parser/tests/fixtures.rs:460
↓ 1 callers
Method
assert_system_environment
( &self, env: &SystemEnvironment, expected_env_path: &SystemPathBuf,
crates/ty_site_packages/src/lib.rs:2684
↓ 1 callers
Function
assert_tuple
F631
crates/ruff_linter/src/rules/pyflakes/rules/assert_tuple.rs:43
↓ 1 callers
Function
assert_used
S101
crates/ruff_linter/src/rules/flake8_bandit/rules/assert_used.rs:51
↓ 1 callers
Function
assert_valid_char_boundaries
(range: TextRange, source: &str)
crates/ruff_python_formatter/src/range.rs:624
↓ 1 callers
Method
assert_virtual_environment
( &self, venv: &VirtualEnvironment, expected_env_path: &SystemPathBuf,
crates/ty_site_packages/src/lib.rs:2598
↓ 1 callers
Function
assert_with_print_message
RUF030 Checks if the `msg` argument to an `assert` statement is a `print` call, and if so, replace the message with the arguments to the `print` call
crates/ruff_linter/src/rules/ruff/rules/assert_with_print_message.rs:60
↓ 1 callers
Function
assertion_error
(msg: Option<&Expr>)
crates/ruff_linter/src/rules/flake8_bugbear/rules/assert_false.rs:54
↓ 1 callers
Function
assign_comment_in_slice
Assigns a comment to lower/upper/step in `[lower:upper:step]`. ```python "sliceable"[ # lower comment : # upper comment : # step comment ] ```
crates/ruff_python_formatter/src/expression/expr_slice.rs:226
↓ 1 callers
Function
assign_hardcoded_password_string
S105
crates/ruff_linter/src/rules/flake8_bandit/rules/hardcoded_password_string.rs:94
↓ 1 callers
Function
assign_reviewer
( pull_request: int, head_sha: str, pools: list[Pool], state: State, *, dry_run: bool
scripts/pull_request_reviewers.py:128
↓ 1 callers
Function
assignment
(obj: &Expr, name: &str, value: &Expr, generator: Generator)
crates/ruff_linter/src/rules/flake8_bugbear/rules/setattr_with_constant.rs:78
← previous
next →
7,901–8,000 of 31,766, ranked by callers