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
place_access_can_raise
Returns whether accessing a name, attribute, or subscript can raise. Only a definitely bound name in the current flow state is known to be safe. In p
crates/ty_python_core/src/builder.rs:2492
↓ 1 callers
Function
place_comment
Manually attach comments to nodes that the default placement gets wrong.
crates/ruff_python_formatter/src/comments/placement.rs:23
↓ 1 callers
Method
place_expr_prefix_loads
Describes how to evaluate the tracked prefixes of `place_expr` in this scope.
crates/ty_python_semantic/src/place_load.rs:1256
↓ 1 callers
Function
place_from_declarations_with_reachability_cache
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, declarations: DeclarationsIterator<'_, 'db>,
crates/ty_python_semantic/src/place.rs:864
↓ 1 callers
Method
place_id_by_instance_attribute_name
(&self, name: &str)
crates/ty_python_core/src/member.rs:579
↓ 1 callers
Function
place_keywords
Tries to place every keyword of this length alongside the shorter keywords.
crates/ruff_python_parser/src/lexer/keywords.rs:131
↓ 1 callers
Method
place_name
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:12818
↓ 1 callers
Method
place_use
(&self, expr: ast::ExprRef<'_>)
crates/ty_python_core/src/ast_ids.rs:227
↓ 1 callers
Function
pointless_async_iterable
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B023.py:34
↓ 1 callers
Method
poll_uv_sync
Gives one project's uv environments an opportunity to make progress.
crates/ty_server/src/session.rs:289
↓ 1 callers
Method
pop
(&mut self)
crates/mdtest/src/parser.rs:472
↓ 1 callers
Method
pop_definition
Pop the current [`Member`] off the stack.
crates/ruff_python_semantic/src/model.rs:1441
↓ 1 callers
Method
pop_loop
Pop a loop, replacing with the previous saved outer loop, if any.
crates/ty_python_core/src/builder.rs:501
↓ 1 callers
Method
pop_sections_to_level
(&mut self, level: usize)
crates/mdtest/src/parser.rs:1055
↓ 1 callers
Method
pop_statement
(&mut self)
crates/ty_python_core/src/builder.rs:2654
↓ 1 callers
Method
pop_symbol
(&mut self)
crates/ty_ide/src/symbols.rs:1223
↓ 1 callers
Method
pop_try_context
Removes the current `try` context after its handlers have been deactivated.
crates/ty_python_core/src/builder/except_handlers.rs:99
↓ 1 callers
Method
populate_all_reexports
Populate `self.all_reexports` with indices into `self.reexport` for all symbols that are a re-export of `self.origin[origin_index]`. This includes the
crates/ty_ide/src/all_symbols.rs:477
↓ 1 callers
Method
populate_loop_header
Build a `LoopHeader` that tracks all the variables bound in a loop, which will be visible to uses in the same loop via "loop header definitions". We c
crates/ty_python_core/src/builder.rs:1880
↓ 1 callers
Method
position
Creates a new buffer snapshot that points to the specified position.
crates/ruff_formatter/src/buffer.rs:95
↓ 1 callers
Method
positional_or_keyword_to_keyword_only
Rewrites a positional-or-keyword parameter as keyword-only while preserving its metadata.
crates/ty_python_semantic/src/types/signatures.rs:6504
↓ 1 callers
Method
positive_step
(self, step: NonZeroI32)
crates/ty_python_semantic/src/types/tuple.rs:1527
↓ 1 callers
Function
possible_class_attribute_descriptor
Recover the concrete descriptor hidden by an uncertain metaclass-member annotation. The declared type describes the descriptor object, not the values
crates/ty_python_semantic/src/types/attribute_write.rs:723
↓ 1 callers
Function
possibly_reversed_intersection
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, reversed: bool, left: Type<'db>, right:
crates/ty_python_semantic/src/types/constraints/sequents.rs:1400
↓ 1 callers
Function
possibly_reversed_union
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, reversed: bool, left: Type<'db>, right:
crates/ty_python_semantic/src/types/constraints/sequents.rs:1414
↓ 1 callers
Function
post_init_default
RUF033
crates/ruff_linter/src/rules/ruff/rules/post_init_default.rs:96
↓ 1 callers
Function
potential_index_error
PLE0643
crates/ruff_linter/src/rules/pylint/rules/potential_index_error.rs:34
↓ 1 callers
Function
pre_process
( groups: &'a [Group<'a>], )
crates/ruff_annotate_snippets/src/renderer/render.rs:2727
↓ 1 callers
Method
precedence
Return the [`OperatorPrecedence`] of this expression
crates/ruff_python_ast/src/nodes.rs:100
↓ 1 callers
Method
precedence
Returns the [`OperatorPrecedence`] for the given operator token or [None] if the token isn't an operator token.
crates/ruff_python_parser/src/parser/expression.rs:3103
↓ 1 callers
Function
preceding_clause_info
Returns the end offset of the clause preceding `finally` and the last statement in that clause's body (used for comment indentation checks)
crates/ruff_linter/src/rules/ruff/rules/useless_finally.rs:160
↓ 1 callers
Method
preceding_type_checking_block
Return the `TYPE_CHECKING` block that precedes the given position, if any.
crates/ruff_linter/src/importer/mod.rs:542
↓ 1 callers
Method
predicate_constraints
Returns the cached positive and negative narrowing constraints for a predicate.
crates/ty_python_semantic/src/reachability.rs:1287
↓ 1 callers
Function
predicate_contains_special_cased_condition
( db: &'db dyn Db, scope: ScopeId<'db>, predicate: ScopedPredicateId, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:865
↓ 1 callers
Method
predicate_kind
(&mut self, pattern: &ast::Pattern)
crates/ty_python_core/src/builder.rs:2712
↓ 1 callers
Method
preferred_constraint
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, has_lower_bound_evide
crates/ty_python_semantic/src/types/constraints/solutions.rs:2063
↓ 1 callers
Function
preferred_markup_kind
Returns the preferred markup kind, derived from preference list.
crates/ty_server/src/capabilities.rs:86
↓ 1 callers
Method
prefers_markdown_in_completion
Returns `true` if the client prefers Markdown over plain text in completion items.
crates/ty_server/src/capabilities.rs:207
↓ 1 callers
Method
prefers_markdown_in_hover
Returns `true` if the client prefers markdown in hover responses.
crates/ty_server/src/capabilities.rs:139
↓ 1 callers
Function
prefixWithRuffToml
(settings: object)
playground/ruff/src/Editor/SettingsEditor.tsx:153
↓ 1 callers
Method
prefix_str
The docstring's prefixes as they exist in the original source code.
crates/ruff_linter/src/docstrings/mod.rs:66
↓ 1 callers
Function
prefix_type_params
PYI001
crates/ruff_linter/src/rules/flake8_pyi/rules/prefix_type_params.rs:64
↓ 1 callers
Method
prenormalized_prefix_elements
Returns the prefix of the prenormalization of this tuple. This is used in our subtyping and equivalence checks below to handle different tuple types
crates/ty_python_semantic/src/types/tuple.rs:2127
↓ 1 callers
Method
prenormalized_suffix_elements
Returns the suffix of the prenormalization of this tuple. This is used in our subtyping and equivalence checks below to handle different tuple types
crates/ty_python_semantic/src/types/tuple.rs:2163
↓ 1 callers
Method
prepare
Prepares a fresh case for the selected mode. Call once before measuring a request.
crates/ruff_benchmark/benches/ty_ide.rs:349
↓ 1 callers
Method
prepare
Prepares us to render the next line by buffering the separator required to delineate it from the previous line.
crates/ty_ide/src/docstring/markdown/general.rs:416
↓ 1 callers
Method
prepare_for_partial_application
Prepare these overloads for constructing `functools.partial(...)`. Partial application intentionally leaves some parameters unbound, so we still want
crates/ty_python_semantic/src/types/call/bind.rs:3697
↓ 1 callers
Function
prepare_implementations_finder_for_goto_target
Select and prepare the appropriate `ImplementationsFinder` for `goto_target`.
crates/ty_ide/src/goto_implementation.rs:127
↓ 1 callers
Method
prepare_line
(&mut self, first_line: bool)
crates/ty_ide/src/docstring/markdown/general.rs:295
↓ 1 callers
Function
prepare_rename
Converts an LSP rename request into our internal representation of the same.
crates/ty_server/src/server/api/requests/will_rename_files.rs:71
↓ 1 callers
Method
prepare_typed_dict_constructor
Prepare a `TypedDict` constructor call before general argument inference. This gives constructor values the declared field type as context, then vali
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:566
↓ 1 callers
Method
prepend_info
Adds an "info" sub-diagnostic before any existing sub-diagnostics.
crates/ruff_db/src/diagnostic/mod.rs:179
↓ 1 callers
Method
preserves_lazy_signatures
Returns `true` if this mapping should leave unevaluated function signatures unchanged.
crates/ty_python_semantic/src/types/generics.rs:2340
↓ 1 callers
Method
pretty
(&'a self, db: &'a dyn Db)
crates/ty_project/src/metadata/options.rs:2384
↓ 1 callers
Function
pretty_comments
Public function for generating a printable string of the debug comments.
crates/ruff_python_formatter/src/lib.rs:209
↓ 1 callers
Method
previous_kind
Returns the last consumed non-trivia token kind.
crates/ruff_python_parser/src/token_source.rs:46
↓ 1 callers
Method
previous_line
Returns the text of the last line of the previous section or an empty string if it is the first section.
crates/ruff_linter/src/docstrings/sections.rs:395
↓ 1 callers
Method
previous_overload_in_chain
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:474
↓ 1 callers
Function
primary_key_member
Synthesize `id` and `pk` attributes for Django models. Without an explicit primary key, both `id` and `pk` have type `int`: ```py class Book(models.M
crates/ty_python_semantic/src/types/dedicated/django.rs:263
↓ 1 callers
Method
print_best_fitting
( &mut self, variants: &'a BestFittingVariants, mode: BestFittingMode, queue:
crates/ruff_formatter/src/printer/mod.rs:549
↓ 1 callers
Function
print_call
T201, T203
crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs:125
↓ 1 callers
Function
print_config
(**context)
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:35
↓ 1 callers
Function
print_config_with_get_current_context
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:55
↓ 1 callers
Function
print_context
Print the Airflow context and ds variable from the context.
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:72
↓ 1 callers
Function
print_diagnostic_diff
Print the difference in diagnostics before and after a change.
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:484
↓ 1 callers
Function
print_diagnostics
Print the lint diagnostics in `diagnostics`.
crates/ruff_linter/src/test.rs:472
↓ 1 callers
Function
print_empty_string
FURB105
crates/ruff_linter/src/rules/refurb/rules/print_empty_string.rs:80
↓ 1 callers
Method
print_fill_entries
Tries to fit as much content as possible on a single line. `Fill` is a sequence of *item*, *separator*, *item*, *separator*, *item*, ... entries. The
crates/ruff_formatter/src/printer/mod.rs:640
↓ 1 callers
Method
print_fill_item
Semantic alias for [`Self::print_entry`] for fill items.
crates/ruff_formatter/src/printer/mod.rs:762
↓ 1 callers
Method
print_fill_separator
Semantic alias for [`Self::print_entry`] for fill separators.
crates/ruff_formatter/src/printer/mod.rs:772
↓ 1 callers
Function
print_fix_summary
( writer: &mut dyn Write, fixed: &FixMap, preview: PreviewMode, prefer_rule_codes: bool, )
crates/ruff/src/printer.rs:469
↓ 1 callers
Function
print_interactive_warning
()
crates/ty_server/src/lib.rs:76
↓ 1 callers
Function
print_syntax_errors
(errors: &[ParseError], path: &Path, source: &SourceKind)
crates/ruff_linter/src/test.rs:453
↓ 1 callers
Method
print_text
(&mut self, text: Text)
crates/ruff_formatter/src/printer/mod.rs:448
↓ 1 callers
Method
print_with_indent
(&self, indent: u16)
crates/ruff_formatter/src/lib.rs:329
↓ 1 callers
Method
print_with_indent
( mut self, document: &'a Document, indent: u16, )
crates/ruff_formatter/src/printer/mod.rs:58
↓ 1 callers
Function
printf_in_gettext_func_call
INT003
crates/ruff_linter/src/rules/flake8_gettext/rules/printf_in_gettext_func_call.rs:67
↓ 1 callers
Function
printf_string_formatting
UP031
crates/ruff_linter/src/rules/pyupgrade/rules/printf_string_formatting.rs:371
↓ 1 callers
Method
priority
Returns an integer reflecting the "priority" of this import kind relative to other import statements. Lower values indicate higher priority.
crates/ty_python_semantic/src/importer.rs:994
↓ 1 callers
Function
private_member_access
SLF001
crates/ruff_linter/src/rules/flake8_self/rules/private_member_access.rs:76
↓ 1 callers
Function
private_type_parameter
UP049
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/private_type_parameter.rs:106
↓ 1 callers
Function
probe_package_dirs
Probe exact package directories under `prefix_dir` for a known Python version. Discovers directories in the form `{prefix_dir}/{python,pypy}X.Y[t]/{s
crates/ty_site_packages/src/lib.rs:1533
↓ 1 callers
Method
process_call_idiom
Processes a call idiom for `__all__` and updates the set of names accordingly. Returns `true` if the call idiom is recognized and valid, `false` othe
crates/ty_python_semantic/src/dunder_all.rs:119
↓ 1 callers
Method
process_code_block
( &mut self, lang: &'s str, code: &'s str, ignore: bool, backtick_offs
crates/mdtest/src/parser.rs:824
↓ 1 callers
Method
process_config_block
(&mut self, code: &str)
crates/mdtest/src/parser.rs:959
↓ 1 callers
Function
process_data
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF052_1.py:2
↓ 1 callers
Method
process_header
(&mut self, header_level: usize, title: &'s str)
crates/mdtest/src/parser.rs:794
↓ 1 callers
Method
process_inline_snapshot
( &mut self, code: &'s str, offsets: BacktickOffsets, )
crates/mdtest/src/parser.rs:976
↓ 1 callers
Method
process_mdtest_directive
( &mut self, directive: MdtestDirective, value: Option<String>, )
crates/mdtest/src/parser.rs:1025
↓ 1 callers
Method
process_stmts
Runs the core logic for the builder.
crates/ruff_python_semantic/src/cfg/graph.rs:194
↓ 1 callers
Function
program_file
Returns the program to use for `file`. Scripts use their own program, and project files use the project program. For third-party files, this chooses
crates/ty_project/src/db.rs:43
↓ 1 callers
Function
program_file
(db: &'db TestDb, path: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1330
↓ 1 callers
Method
program_file
(&self, file: File)
crates/ty_python_semantic/src/db.rs:183
↓ 1 callers
Method
program_for_dependency
Returns a program whose configured search paths contain `path`. Prefers the project environment, then existing script environments. This does not req
crates/ty_project/src/db.rs:264
↓ 1 callers
Method
project_meta_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types.rs:568
↓ 1 callers
Method
project_root
(self)
crates/ty_project/src/metadata/options.rs:649
↓ 1 callers
Method
project_state
Returns a reference to the project's [`ProjectState`] in which the given `path` belongs. If the path is a system path, it will return the project dat
crates/ty_server/src/session.rs:499
↓ 1 callers
Method
project_states_mut
Returns a mutable iterator over all projects.
crates/ty_server/src/session.rs:588
↓ 1 callers
Method
projected_node
(&self, id: ScopedNarrowingConstraint)
crates/ty_python_semantic/src/reachability.rs:1633
↓ 1 callers
Method
projection_source_order
Orders projected facts by replaying the rules already discovered during this walk. Projection emits derived facts in TDD branch order. Retaining that
crates/ty_python_semantic/src/types/constraints/paths.rs:217
← previous
next →
12,301–12,400 of 31,562, ranked by callers