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
Method
qualifiers
(&self)
crates/ty_python_semantic/src/types/attribute_write.rs:254
↓ 1 callers
Method
qualify
(&self, mut expr: &'a Expr)
crates/ruff_python_ast/src/name.rs:394
↓ 1 callers
Method
query_module
( &self, module: &ModuleName, python_version: PythonVersion, )
crates/ty_module_resolver/src/typeshed.rs:79
↓ 1 callers
Function
quick_fix
( snapshot: &DocumentSnapshot, fixes: &[DiagnosticFix], )
crates/ruff_server/src/server/api/requests/code_action.rs:127
↓ 1 callers
Function
quote
(rule_code: Rule, path: &Path)
crates/ruff_linter/src/rules/flake8_type_checking/mod.rs:184
↓ 1 callers
Function
quote_imports
Generate a [`Fix`] to quote runtime usages for imports in a type-checking block.
crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs:287
↓ 1 callers
Function
quote_option
(option: Option<String>)
crates/ruff_macros/src/config.rs:206
↓ 1 callers
Method
quote_style
(self)
crates/ruff_python_ast/src/token.rs:790
↓ 1 callers
Function
quoted_annotation
Returns `true` if any argument in the slice is a quoted annotation.
crates/ruff_python_semantic/src/analyze/typing.rs:227
↓ 1 callers
Function
quoted_annotation
UP037
crates/ruff_linter/src/rules/pyupgrade/rules/quoted_annotation.rs:106
↓ 1 callers
Function
quoted_annotation_in_stub
PYI020
crates/ruff_linter/src/rules/flake8_pyi/rules/quoted_annotation_in_stub.rs:48
↓ 1 callers
Function
quoted_type_alias
TC008
crates/ruff_linter/src/rules/flake8_type_checking/rules/type_alias_quotes.rs:273
↓ 1 callers
Function
quotes_are_unremovable
Traverses the type expression and checks if the expression can safely be unquoted
crates/ruff_linter/src/rules/flake8_type_checking/rules/type_alias_quotes.rs:330
↓ 1 callers
Function
raise_deprecation_warning
(s)
crates/ruff_linter/resources/test/fixtures/ruff/RUF061_deprecated_call.py:5
↓ 1 callers
Function
raise_literal
B016
crates/ruff_linter/src/rules/flake8_bugbear/rules/raise_literal.rs:42
↓ 1 callers
Function
raise_not_implemented
F901
crates/ruff_linter/src/rules/pyflakes/rules/raise_not_implemented.rs:73
↓ 1 callers
Function
raise_user_warning
(s)
crates/ruff_linter/resources/test/fixtures/ruff/RUF061_warns.py:5
↓ 1 callers
Function
raise_vanilla_args
TRY003
crates/ruff_linter/src/rules/tryceratops/rules/raise_vanilla_args.rs:59
↓ 1 callers
Function
raise_vanilla_class
TRY002
crates/ruff_linter/src/rules/tryceratops/rules/raise_vanilla_class.rs:68
↓ 1 callers
Function
raise_within_try
TRY301
crates/ruff_linter/src/rules/tryceratops/rules/raise_within_try.rs:80
↓ 1 callers
Function
raise_without_from_inside_except
B904
crates/ruff_linter/src/rules/flake8_bugbear/rules/raise_without_from_inside_except.rs:74
↓ 1 callers
Function
raises_call
PT010
crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs:190
↓ 1 callers
Function
randdec
(maxprec, maxexp)
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_0.py:20
↓ 1 callers
Method
range
(&self)
crates/ruff_python_semantic/src/binding.rs:448
↓ 1 callers
Method
range
(&self)
crates/ruff_python_formatter/src/pattern/pattern_match_mapping.rs:114
↓ 1 callers
Method
range
(&self)
crates/ruff_python_formatter/src/expression/expr_yield.rs:31
↓ 1 callers
Method
range
(&self)
crates/ruff_python_formatter/src/comments/visitor.rs:330
↓ 1 callers
Method
range
(&self)
crates/ruff_python_trivia/src/tokenizer.rs:204
↓ 1 callers
Method
range
(&self)
crates/ruff_python_ast/src/stmt_if.rs:31
↓ 1 callers
Method
range
(&self)
crates/ruff_python_ast/src/script.rs:153
↓ 1 callers
Method
range
(&self)
crates/ty_ide/src/docstring/document/syntax.rs:316
↓ 1 callers
Method
range
(&self)
crates/ty_ide/src/docstring/document/rst.rs:271
↓ 1 callers
Method
range
(&self)
crates/ruff_linter/src/noqa.rs:74
↓ 1 callers
Method
range
(&self)
crates/ruff_linter/src/docstrings/sections.rs:318
↓ 1 callers
Method
range
(&self)
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:205
↓ 1 callers
Method
range
(&self)
crates/ruff_linter/src/rules/isort/comments.rs:15
↓ 1 callers
Method
range
(&self)
crates/ruff_linter/src/rules/flake8_pyi/rules/bad_generator_return_type.rs:285
↓ 1 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pylint/rules/redefined_slots_in_subclass.rs:105
↓ 1 callers
Method
range_end_position
Returns the cursor position after `range`, accounting for surrounding parentheses.
crates/ty_ide/src/completion.rs:1214
↓ 1 callers
Function
range_intersect
(range: &lsp_types::Range, other: &lsp_types::Range)
crates/ty_server/src/server/api/requests/code_action.rs:157
↓ 1 callers
Method
rank
Returns the rank of the expected answer in the completions given. The rank is the position (one indexed) at which the expected answer appears in the
crates/ty_completion_eval/src/main.rs:311
↓ 1 callers
Function
rank_matches
Returns a pair with first component the length of the largest shared prefix between the qualified name of the import binding and the `prototype` and s
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:897
↓ 1 callers
Function
raw_byte_applicability
Check how same it is to prepend the `r` prefix to the byte sting. ## Returns `None` if the prefix cannot be added, `Some(a)` if it can be added with
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:256
↓ 1 callers
Function
raw_contents_range
(contents: &str)
crates/ruff_python_ast/src/str.rs:274
↓ 1 callers
Method
raw_elements
Flatten the parts in source order. Each element borrows from the AST, and adjacent literal pieces are still separate at this point.
crates/ruff_python_ast/src/comparable.rs:677
↓ 1 callers
Function
raw_string_applicability
Check how safe it is to prepend the `r` prefix to the string. ## Returns `None` if the prefix cannot be added, `Some(a)` if it can be added with appl
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:206
↓ 1 callers
Function
rdjson_suggestions
( edits: &'a [Edit], source_code: Option<SourceCode>, )
crates/ruff_db/src/diagnostic/render/rdjson.rs:106
↓ 1 callers
Method
re_lex_raw_string_in_format_spec
Re-lex `r"` in a format specifier position. `r"` in a format specifier position is unlikely to be the start of a raw string. Instead, it's the format
crates/ruff_python_parser/src/lexer.rs:1355
↓ 1 callers
Method
re_lex_string_token_in_interpolation_element
Re-lexes an unclosed string token in the context of an interpolated string element. ```py f'{a' ``` This method re-lexes the trailing `'` as the end
crates/ruff_python_parser/src/lexer.rs:1287
↓ 1 callers
Function
re_sub_positional_args
B034
crates/ruff_linter/src/rules/flake8_bugbear/rules/re_sub_positional_args.rs:62
↓ 1 callers
Function
reachability_contains_special_cased_condition
( db: &'db dyn Db, scope: ScopeId<'db>, reachability: ScopedReachabilityConstraintId, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:831
↓ 1 callers
Function
reachable
Returns set of block indices reachable from entry block
crates/ruff_linter/src/rules/pylint/rules/unreachable.rs:79
↓ 1 callers
Function
reachable_implementation_definitions
( db: &'db dyn Db, definitions: impl IntoIterator<Item = Definition<'db>>, )
crates/ty_python_semantic/src/types/ide_support.rs:798
↓ 1 callers
Method
reachable_imported_final_candidates
Imports that may contribute a `Final` qualifier anywhere in the scope.
crates/ty_python_core/src/use_def.rs:1417
↓ 1 callers
Method
reaches_pending_typevar
( &self, generic_context: GenericContext<'db>, types: &FxHashMap<BoundTypeVarIdentity<
crates/ty_python_semantic/src/types/generics.rs:3311
↓ 1 callers
Method
read_directory
( &'a self, path: &SystemPath, )
crates/ty_test/src/db.rs:582
↓ 1 callers
Method
read_directory
Read the direct children of the directory identified by `path`. If `path` is not a directory, then this will return an empty iterator.
crates/ruff_db/src/vendored.rs:134
↓ 1 callers
Function
read_from_stdin
Read a `String` from `stdin`.
crates/ruff_python_formatter/src/main.rs:11
↓ 1 callers
Function
read_sha256
(path: Path)
scripts/patch-dist-manifest-checksums.py:44
↓ 1 callers
Method
read_to_notebook
Reads the content of the file into a [`Notebook`]. Reading the same file multiple times isn't guaranteed to return the same content. It's possible th
crates/ruff_db/src/files.rs:431
↓ 1 callers
Method
read_to_string
(&self, path: &SystemPath)
crates/ruff_db/src/system/test.rs:124
↓ 1 callers
Method
read_to_string
(&self, path: &SystemPath)
crates/ty_wasm/src/lib.rs:1648
↓ 1 callers
Method
read_virtual_path_to_notebook
( &self, _path: &SystemVirtualPath, )
crates/ruff_db/src/system/os.rs:107
↓ 1 callers
Method
read_virtual_path_to_string
(&self, path: &SystemVirtualPath)
crates/ruff_db/src/system/test.rs:132
↓ 1 callers
Function
read_whole_file
FURB101
crates/ruff_linter/src/rules/refurb/rules/read_whole_file.rs:85
↓ 1 callers
Function
readlines_in_comprehension
FURB129
crates/ruff_linter/src/rules/refurb/rules/readlines_in_for.rs:72
↓ 1 callers
Function
readlines_in_for
FURB129
crates/ruff_linter/src/rules/refurb/rules/readlines_in_for.rs:67
↓ 1 callers
Function
real_stdlib_directory_from_sys_prefix
Attempt to retrieve the real stdlib directory associated with a given Python installation. The location of the stdlib directory can vary according to
crates/ty_site_packages/src/lib.rs:1818
↓ 1 callers
Method
real_stdlib_path
(&self, system: &dyn System)
crates/ty_site_packages/src/lib.rs:441
↓ 1 callers
Method
receiver_constraints_when_satisfied
( &self, db: &'db dyn Db, checker: &TypeRelationChecker<'_, 'c, 'db>, )
crates/ty_python_semantic/src/types/signatures.rs:2106
↓ 1 callers
Function
recheck_files
( db: &dyn Db, changes: Vec<(QueuedFile<'a>, usize)>, fix_mode: FixMode, cancellation_token: &
crates/ty_python_semantic/src/fixes.rs:753
↓ 1 callers
Method
record_ambiguous_reachability
Records a reachability constraint that always evaluates to "ambiguous".
crates/ty_python_core/src/builder.rs:2590
↓ 1 callers
Method
record_and_negate_star_import_reachability_constraint
This method exists solely for handling `*`-import reachability constraints. The reason why we add reachability constraints for [`Definition`]s create
crates/ty_python_core/src/use_def.rs:2676
↓ 1 callers
Method
record_assignment_index
( &mut self, assignment: Assignment<AtomicConstraintId>, index: usize, )
crates/ty_python_semantic/src/types/constraints/paths.rs:560
↓ 1 callers
Method
record_boolean_test_root
Record a "boolean test" expression that Python tests for truthiness. See [`super::SemanticIndexBuilder::visit_boolean_test`] for details on what a bo
crates/ty_python_core/src/use_def.rs:3062
↓ 1 callers
Method
record_callee
(&mut self, leaf: CalleeLeaf<'a>)
crates/ty_ide/src/call_hierarchy/outgoing_calls.rs:131
↓ 1 callers
Method
record_class
(&self, db: &'db dyn Db, class: ClassLiteral<'db>)
crates/ty_python_semantic/src/types/display.rs:647
↓ 1 callers
Method
record_declared_type
Records that a typevar has a declared type. This makes it ineligible for tuple size promotion.
crates/ty_python_semantic/src/types/tuple/promotion.rs:124
↓ 1 callers
Method
record_deferred_terminal_context_manager_exit
Records that a context manager makes an apparently terminal control-flow path possibly non-terminal because it may silence an earlier exception. Wheth
crates/ty_python_core/src/builder/except_handlers.rs:182
↓ 1 callers
Method
record_eager_snapshots
Records snapshots of the place states visible from the current eager scope.
crates/ty_python_core/src/builder.rs:549
↓ 1 callers
Function
record_guaranteed_typed_dict_constructor_key
( context: &InferContext<'db, 'ast>, typed_dict: TypedDictType<'db>, guaranteed_keys: &mut BTreeMa
crates/ty_python_semantic/src/types/typed_dict.rs:2570
↓ 1 callers
Method
record_inferred_expression_type
Records whether an inferred collection element blocks tuple size promotion for the typevar.
crates/ty_python_semantic/src/types/tuple/promotion.rs:129
↓ 1 callers
Method
record_lazy_snapshots
Records snapshots of the place states visible from the current lazy scope.
crates/ty_python_core/src/builder.rs:723
↓ 1 callers
Method
record_multi_use
( &mut self, places: impl Iterator<Item = ScopedPlaceId>, )
crates/ty_python_core/src/use_def.rs:2949
↓ 1 callers
Method
record_narrowing_constraint_for_bindings
Records a narrowing constraint on the current live bindings selected by definition ID.
crates/ty_python_core/src/use_def.rs:2513
↓ 1 callers
Method
record_narrowing_constraint_for_bindings_at_use
Records a narrowing constraint on the current live bindings that were read by the corresponding earlier uses.
crates/ty_python_core/src/use_def.rs:2481
↓ 1 callers
Method
record_narrowing_constraint_id_for_places
Records a previously added narrowing constraint by adding it to the live bindings of the specified places.
crates/ty_python_core/src/builder.rs:2338
↓ 1 callers
Method
record_negated_narrowing_constraint_for_places
Records a negated narrowing constraint for only the specified places. The positive and negative constraints use the same predicate ID. This lets `P o
crates/ty_python_core/src/use_def.rs:2550
↓ 1 callers
Method
record_non_terminal_call_constraints
Records a reachability predicate and its corresponding narrowing gate together. Reachability is materialized when a place is used, while the narrowin
crates/ty_python_core/src/use_def.rs:2764
↓ 1 callers
Method
record_pending_capture_binding
( &mut self, symbol: ScopedSymbolId, definition_id: ScopedDefinitionId, )
crates/ty_python_core/src/builder.rs:651
↓ 1 callers
Method
record_place_use
(&mut self, place_id: ScopedPlaceId, expr: &'ast ast::Expr)
crates/ty_python_core/src/builder.rs:1407
↓ 1 callers
Method
record_reference
(&self, db: &'db dyn Db, reference: DefinitionUse<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:614
↓ 1 callers
Method
record_return_type
(&mut self, ty: Type<'db>, range: TextRange)
crates/ty_python_semantic/src/types/infer/builder.rs:2061
↓ 1 callers
Method
record_stub_parameters
Records deferred stub parameters in definition order so duplicate names retain their earlier bindings and declarations during construction.
crates/ty_python_core/src/use_def.rs:3291
↓ 1 callers
Method
record_terminal_finally_entry
Records that the current state can enter any active `finally` suites before the current terminal control-flow transfer reaches its destination.
crates/ty_python_core/src/builder.rs:2426
↓ 1 callers
Method
record_type_alias
(&self, db: &'db dyn Db, type_alias: TypeAliasType<'db>)
crates/ty_python_semantic/src/types/display.rs:651
↓ 1 callers
Method
record_type_field
(&mut self, name: &'a str, ty: &'a str)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:221
↓ 1 callers
Method
record_unknown_target_subtree
Records `Unknown` for a malformed unpack target and all of its descendant expressions.
crates/ty_python_semantic/src/types/unpacker.rs:156
↓ 1 callers
Method
record_unpromotable_type
Block tuple size promotion if this type variable is assigned a possible tuple type.
crates/ty_python_semantic/src/types/tuple/promotion.rs:143
↓ 1 callers
Method
record_value_field
(&mut self, name: &'a str, has_inline_type: bool)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:214
← previous
next →
12,501–12,600 of 31,562, ranked by callers