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
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:109
↓ 1 callers
Function
assert_raises_exception_call
B017 (call form)
crates/ruff_linter/src/rules/flake8_bugbear/rules/assert_raises_exception.rs:134
↓ 1 callers
Function
assert_shared
(expected: &CharStr, actual: &CharStr)
crates/ty_project/src/uv/metadata.rs:308
↓ 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:125
↓ 1 callers
Method
assignable_solutions_for_argument_context
Calculates the [`CandidateSolutions`] that represent the valid solutions for when `self` is constraint-set assignable to `target`. Unlike [`Self::ass
crates/ty_python_semantic/src/types/constraints.rs:3662
↓ 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
↓ 1 callers
Function
assignment_binary_and
(target_var: &Expr, left_value: &Expr, right_value: &Expr)
crates/ruff_linter/src/rules/flake8_simplify/rules/if_else_block_instead_of_if_exp.rs:287
↓ 1 callers
Function
assignment_binary_or
(target_var: &Expr, left_value: &Expr, right_value: &Expr)
crates/ruff_linter/src/rules/flake8_simplify/rules/if_else_block_instead_of_if_exp.rs:303
↓ 1 callers
Function
assignment_default_in_stub
PYI015
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:564
↓ 1 callers
Function
assignment_in_assert
RUF018
crates/ruff_linter/src/rules/ruff/rules/assignment_in_assert.rs:63
↓ 1 callers
Function
assignment_is_cast_expr
Checks whether the given assignment value is a `typing.cast` expression and that the target name is the same as the argument name. Example: ```python
crates/ruff_linter/src/rules/pylint/rules/redefined_loop_name.rs:260
↓ 1 callers
Function
assignment_targets_from_assign_targets
( targets: &'a [Expr], dummy_variable_rgx: &'a Regex, )
crates/ruff_linter/src/rules/pylint/rules/redefined_loop_name.rs:360
↓ 1 callers
Function
assignment_ternary
( target_var: &Expr, body_value: &Expr, test: &Expr, orelse_value: &Expr, )
crates/ruff_linter/src/rules/flake8_simplify/rules/if_else_block_instead_of_if_exp.rs:265
↓ 1 callers
Function
assignment_to_df
PD901
crates/ruff_linter/src/rules/pandas_vet/rules/assignment_to_df.rs:46
↓ 1 callers
Function
assignment_to_os_environ
B003
crates/ruff_linter/src/rules/flake8_bugbear/rules/assignment_to_os_environ.rs:55
↓ 1 callers
Method
ast
Returns a corresponding AST node for these tokens. `offset` should be the offset of the cursor. If no plausible AST node could be found, then `None`
crates/ty_ide/src/completion.rs:2542
↓ 1 callers
Function
ast_ids
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/ast_ids.rs:256
↓ 1 callers
Method
ast_ids
(&self)
crates/ty_python_core/src/lib.rs:423
↓ 1 callers
Function
async_busy_wait
ASYNC110
crates/ruff_linter/src/rules/flake8_async/rules/async_busy_wait.rs:65
↓ 1 callers
Function
async_context_manager_suppresses
(db: &'db dyn Db, expression: Expression<'db>)
crates/ty_python_semantic/src/reachability.rs:2006
↓ 1 callers
Function
async_func
()
crates/ruff_python_parser/resources/inline/err/lazy_import_invalid_context_py315.py:15
↓ 1 callers
Function
async_function_with_timeout
ASYNC109
crates/ruff_linter/src/rules/flake8_async/rules/async_function_with_timeout.rs:103
↓ 1 callers
Function
async_generator_stub_declaration
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/iteration.rs:61
↓ 1 callers
Function
async_zero_sleep
ASYNC115
crates/ruff_linter/src/rules/flake8_async/rules/async_zero_sleep.rs:72
↓ 1 callers
Function
asyncio_dangling_binding
RUF006
crates/ruff_linter/src/rules/ruff/rules/asyncio_dangling_task.rs:135
↓ 1 callers
Method
at
(self, db: &dyn Db, value: &RangedValue<T>, label: Option<&'static str>)
crates/ty_project/src/metadata/options.rs:2550
↓ 1 callers
Method
at
(offset: TextSize, len: TextSize)
crates/ruff_text_size/src/range.rs:70
↓ 1 callers
Method
at_identifier_or_keyword
Returns `true` if the parser is at an identifier or keyword (including soft keyword) token.
crates/ruff_python_parser/src/parser/expression.rs:121
↓ 1 callers
Method
at_mapping_pattern_start
Returns `true` if the current token is a valid start of a mapping pattern.
crates/ruff_python_parser/src/parser/pattern.rs:63
↓ 1 callers
Method
at_pattern_start
Returns `true` if the current token is a valid start of a pattern.
crates/ruff_python_parser/src/parser/pattern.rs:58
↓ 1 callers
Method
at_stmt
Returns `true` if the current token is the start of a simple, compound or expression statement.
crates/ruff_python_parser/src/parser/statement.rs:94
↓ 1 callers
Method
at_type_param
Checks if the parser is currently positioned at the start of a type parameter.
crates/ruff_python_parser/src/parser/statement.rs:99
↓ 1 callers
Function
attach_tracker
(tracker: StandardTracker, f: impl FnOnce() -> R)
crates/ruff_memory_usage/src/lib.rs:17
↓ 1 callers
Function
attr
PD011
crates/ruff_linter/src/rules/pandas_vet/rules/attr.rs:49
↓ 1 callers
Method
attribute_completions
Returns completions for symbols available in a `object.<CURSOR>` context.
crates/ty_python_semantic/src/semantic_model.rs:300
↓ 1 callers
Function
attribute_condition_definition_info
( db: &'db dyn Db, program: Program<'db>, receiver: Type<'db>, name: Name, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:656
↓ 1 callers
Function
attribute_declarations
Returns all attribute declarations (and their method scope IDs) with a symbol name matching the one given for a specific class body scope. Only call
crates/ty_python_semantic/src/lib.rs:204
↓ 1 callers
Function
attribute_docstring
Extract a docstring from an attribute. This is a non-standardized but popular-and-supported-by-sphinx kind of docstring where you just place the docs
crates/ty_python_core/src/definition.rs:250
↓ 1 callers
Function
attribute_is_callee_of_parent
Returns `true` when `attribute` is the immediate callee of an enclosing `ExprCall` or `Decorator`. The `ExprCall` / `Decorator` arms in `CallSitesFind
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:487
↓ 1 callers
Method
attribute_typevar_failures
Having already determined that a satisfiable path violates the declared upper bounds (TODO and constraints) of the relevant typevars, determines _whic
crates/ty_python_semantic/src/types/constraints/solutions.rs:1719
↓ 1 callers
Function
attributes_for_prefix
( codes: &BTreeSet<String>, attributes: &BTreeMap<String, &[Attribute]>, )
crates/ruff_macros/src/rule_code_prefix.rs:88
↓ 1 callers
Function
augmented_assignment
Generate a fix to convert an assignment statement to an augmented assignment. For example, given `x = x + 1`, the fix would be `x += 1`.
crates/ruff_linter/src/rules/pylint/rules/non_augmented_assignment.rs:158
↓ 1 callers
Function
auto_return_type
Given a function, guess its return type.
crates/ruff_linter/src/rules/flake8_annotations/helpers.rs:49
↓ 1 callers
Method
available_positional_parameter_count
Returns the number of positional parameters, starting at `next_positional`, that can still be filled positionally. This stops at the first parameter t
crates/ty_python_semantic/src/types/call/bind.rs:5129
↓ 1 callers
Method
avoid_conflicts
Attempts to change the import request style so that the chances of an import conflict are minimized (although not always reduced to zero).
crates/ty_python_semantic/src/importer.rs:851
↓ 1 callers
Function
avoidable_escaped_quote
Q003
crates/ruff_linter/src/rules/flake8_quotes/rules/avoidable_escaped_quote.rs:57
↓ 1 callers
Function
b
()
crates/ty_python_semantic/resources/corpus/16_for_break_invalid_in_func.py:3
↓ 1 callers
Function
b
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB187.py:9
↓ 1 callers
Function
b
()
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:64
↓ 1 callers
Function
b
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:549
↓ 1 callers
Function
backslashes
D301
crates/ruff_linter/src/rules/pydocstyle/rules/backslashes.rs:67
↓ 1 callers
Method
backtick_offsets
(&self)
crates/mdtest/src/parser.rs:447
↓ 1 callers
Method
backwards
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1312
↓ 1 callers
Function
bad_dunder_method_name
PLW3201
crates/ruff_linter/src/rules/pylint/rules/bad_dunder_method_name.rs:63
↓ 1 callers
Function
bad_exit_annotation
PYI036
crates/ruff_linter/src/rules/flake8_pyi/rules/exit_annotations.rs:135
↓ 1 callers
Function
bad_file_permissions
S103
crates/ruff_linter/src/rules/flake8_bandit/rules/bad_file_permissions.rs:73
↓ 1 callers
Function
bad_generator_return_type
PYI058
crates/ruff_linter/src/rules/flake8_pyi/rules/bad_generator_return_type.rs:93
↓ 1 callers
Function
bad_nested
Runs other things, nested
crates/ruff_linter/resources/test/fixtures/pydocstyle/D401.py:28
↓ 1 callers
Function
bad_open_mode
PLW1501
crates/ruff_linter/src/rules/pylint/rules/bad_open_mode.rs:55
↓ 1 callers
Function
bad_staticmethod_argument
PLW0211
crates/ruff_linter/src/rules/pylint/rules/bad_staticmethod_argument.rs:60
↓ 1 callers
Function
bad_str_strip_call
PLE1310
crates/ruff_linter/src/rules/pylint/rules/bad_str_strip_call.rs:171
↓ 1 callers
Function
bad_string_format_type
PLE1307
crates/ruff_linter/src/rules/pylint/rules/bad_string_format_type.rs:215
↓ 1 callers
Function
bad_version_info_comparison
( checker: &Checker, test: &Expr, has_else_clause:
crates/ruff_linter/src/checkers/ast/analyze/statement.rs:1108
↓ 1 callers
Function
banned_api
TID251
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_api.rs:45
↓ 1 callers
Function
banned_attribute_access
TID251
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_api.rs:61
↓ 1 callers
Function
banned_import_alias
ICN002
crates/ruff_linter/src/rules/flake8_import_conventions/rules/banned_import_alias.rs:53
↓ 1 callers
Function
banned_import_from
ICN003
crates/ruff_linter/src/rules/flake8_import_conventions/rules/banned_import_from.rs:51
↓ 1 callers
Function
banned_module_level_imports
TID253
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:61
↓ 1 callers
Function
banned_relative_import
TID252
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/relative_imports.rs:125
↓ 1 callers
Function
bar
This is another docstring with more lines of text
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:20
↓ 1 callers
Function
bar
(x)
crates/ruff_linter/resources/test/fixtures/refurb/FURB101_0.py:5
↓ 1 callers
Function
bar
(x)
crates/ruff_linter/resources/test/fixtures/refurb/FURB103_0.py:5
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/flake8_annotations/suppress_none_returning.py:38
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET503.py:414
↓ 1 callers
Function
bar
(x: int)
crates/ruff_linter/resources/test/fixtures/flake8_use_pathlib/full_name.py:83
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF052_0.py:111
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/W391_0.py:6
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/W391_3.py:6
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/W391_1.py:6
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/W391_2.py:6
↓ 1 callers
Function
bar
(x: int, y: int)
crates/ruff_linter/resources/test/fixtures/pylint/swap_with_temporary_variable.py:17
↓ 1 callers
Function
bar
(b)
crates/ruff_linter/resources/test/fixtures/pylint/redefined_argument_from_local.py:78
↓ 1 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B039.py:33
↓ 1 callers
Function
bar
(x: T)
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_17.py:109
↓ 1 callers
Method
bar
(self, x: int)
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:445
↓ 1 callers
Method
bar
(self)
crates/ruff_linter/resources/test/fixtures/pylint/no_self_use.py:80
↓ 1 callers
Method
bar
(self, arg: str)
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B019.py:119
↓ 1 callers
Function
bar_never_annotation
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET503.py:367
↓ 1 callers
Function
bar_no_return_annotation
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET503.py:334
← previous
next →
7,901–8,000 of 31,562, ranked by callers