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
promote_class_literals
Promote class literals to the class objects represented by `type[...]`. This is intentionally separate from regular promotion. Applying it during col
crates/ty_python_semantic/src/types.rs:3780
↓ 1 callers
Method
promote_impl
Like [`Type::promote`], but does not recurse into nested types.
crates/ty_python_semantic/src/types.rs:3807
↓ 1 callers
Method
promote_singletons_recursively
Recursively promote singleton types (like `None`, `EllipsisType`) to `T | Unknown` within nominal type parameters, without recursing into unions. Used
crates/ty_python_semantic/src/types.rs:3793
↓ 1 callers
Method
promote_tuple_size_in_union
Within a larger union, promotes every group of homogeneous, fixed-length tuples of differing lengths to a single variadic tuple. This deliberately on
crates/ty_python_semantic/src/types/tuple/promotion.rs:311
↓ 1 callers
Method
propagate_deferred_terminal_context_manager_exit
Forwards a deferred terminal state to the nearest enclosing `try`.
crates/ty_python_core/src/builder/except_handlers.rs:189
↓ 1 callers
Method
propagate_expand
Sets [`expand`](tag::Group::expand) to [`GroupMode::Propagated`] if the group contains any of: - a group with [`expand`](tag::Group::expand) set to [`
crates/ruff_formatter/src/format_element/document.rs:33
↓ 1 callers
Method
propagate_expand
(&self)
crates/ruff_formatter/src/format_element/tag.rs:214
↓ 1 callers
Function
property_accessor_role_matches
Returns whether `definition` is either not a property accessor or has the requested role.
crates/ty_python_semantic/src/types/ide_support.rs:666
↓ 1 callers
Method
property_deleter_returns_never
Returns `true` if `property_ty` is a property whose deleter returns `Never`/`NoReturn` when called for deletion on `object_ty`.
crates/ty_python_semantic/src/types/infer/builder.rs:3127
↓ 1 callers
Function
property_display_name
(db: &'db dyn Db, property: PropertyInstanceType<'db>)
crates/ty_python_semantic/src/types/display.rs:1168
↓ 1 callers
Function
property_docstring_starts_with_verb
D421
crates/ruff_linter/src/rules/pydocstyle/rules/property_docstring_starts_with_verb.rs:77
↓ 1 callers
Function
property_get_member_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, getter: Type<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:2463
↓ 1 callers
Function
property_getter_definitions
If a function is a property setter or deleter (e.g., decorated with `@my_property.setter`), return the definitions for the property getter. This ensur
crates/ty_ide/src/goto.rs:1382
↓ 1 callers
Function
property_set_member_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, setter: Type<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:2482
↓ 1 callers
Function
property_set_type
Bind the setter's accepted value type to the receiver used for this write. The setter definition retained by [`property_setter_value_type`] identifies
crates/ty_python_semantic/src/types/attribute_write.rs:1388
↓ 1 callers
Function
property_setter_returns_never
Return whether a property setter is terminal for this receiver and value type. This is intentionally specific to `property`: other descriptors are go
crates/ty_python_semantic/src/types/attribute_write.rs:977
↓ 1 callers
Function
property_with_parameters
PLR0206
crates/ruff_linter/src/rules/pylint/rules/property_with_parameters.rs:54
↓ 1 callers
Function
property_without_return
RUF066
crates/ruff_linter/src/rules/ruff/rules/property_without_return.rs:56
↓ 1 callers
Function
property_wrapper_descriptor
Recognizes inherited property descriptor methods without replacing subclass overrides.
crates/ty_python_semantic/src/types.rs:1612
↓ 1 callers
Function
protocol_materialization_is_noop_by_inspection
Prove by inspecting its member types that materialization leaves `protocol` unchanged. The inspection accounts for callable signatures and the wrappe
crates/ty_python_semantic/src/types/instance.rs:563
↓ 1 callers
Function
protocol_materialization_is_noop_with_type_parameters
Prove that materialization leaves a protocol specialization unchanged by inspecting its interface with type parameters as placeholders and checking it
crates/ty_python_semantic/src/types/instance.rs:608
↓ 1 callers
Method
protocol_member_write_is_definitely_missing_from_ty
Conservatively proves that `ty` lacks an instance write required by `member`. This currently recognizes only a concrete read-only property. Unknown o
crates/ty_python_semantic/src/types/protocol_class.rs:3252
↓ 1 callers
Method
provides_bound_for
( self, db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/constraints/variables.rs:575
↓ 1 callers
Method
provides_lower
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:555
↓ 1 callers
Method
provides_upper
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:565
↓ 1 callers
Method
public_func
(self)
crates/ruff_linter/resources/test/fixtures/flake8_self/SLF001.py:47
↓ 1 callers
Function
publish
( run_id: int, run_attempt: int, report: str, pull_request: int, *, workflow_ref: str,
scripts/publish_pr_report.py:316
↓ 1 callers
Method
publish_result
(&self, result: UvMetadataResult)
crates/ty_project/src/uv/service.rs:106
↓ 1 callers
Function
publish_workspace
( cargo: list[str], crates: list[Crate], api_url: str, cargo_publish_args: list[str] )
scripts/publish-crates.py:150
↓ 1 callers
Method
pull
Pull the latest changes. Typically `reset` should be run first.
python/ruff-ecosystem/ruff_ecosystem/projects.py:500
↓ 1 callers
Method
push
Creates a new stack frame for a [`FormatElement::Tag`] of `kind` with `args` as the call arguments.
crates/ruff_formatter/src/printer/call_stack.rs:183
↓ 1 callers
Method
push
Queues a single element to process before the other elements in this queue.
crates/ruff_formatter/src/printer/queue.rs:29
↓ 1 callers
Method
push
(&mut self, context: InterpolatedStringContext)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:131
↓ 1 callers
Method
push
Push a new error context node, making the existing tree a child of the new context.
crates/ty_python_semantic/src/types/relation_error.rs:974
↓ 1 callers
Method
push
(&mut self, diagnostic: Diagnostic)
crates/ty_python_semantic/src/types/diagnostic.rs:1667
↓ 1 callers
Method
push_blank_line
(&mut self)
crates/ty_ide/src/docstring/document/numpy.rs:468
↓ 1 callers
Method
push_blank_line
(&mut self)
crates/ty_ide/src/docstring/document/google.rs:547
↓ 1 callers
Method
push_body_line
(&mut self, line: ParsedLine<'a>, item_line: Option<ItemLine<'a>>)
crates/ty_ide/src/docstring/document/numpy.rs:370
↓ 1 callers
Method
push_builtin
Create a new [`Binding`] for a builtin.
crates/ruff_python_semantic/src/model.rs:349
↓ 1 callers
Method
push_code
Push current token to stack of [`Code`] objects
crates/ruff_linter/src/noqa.rs:675
↓ 1 callers
Function
push_codes
(writer: &mut dyn std::fmt::Write, codes: impl Iterator<Item = I>)
crates/ruff_linter/src/noqa.rs:1185
↓ 1 callers
Method
push_content_line
(&mut self, line: ParsedLine<'a>, item_line: ItemLine<'a>)
crates/ty_ide/src/docstring/document/google.rs:458
↓ 1 callers
Method
push_context_manager_context
Registers a context manager after it enters but before its target is assigned.
crates/ty_python_core/src/builder/except_handlers.rs:81
↓ 1 callers
Method
push_dangling_comment
(&mut self, node: AnyNodeRef<'a>, comment: impl Into<SourceComment>)
crates/ruff_python_formatter/src/comments/visitor.rs:622
↓ 1 callers
Method
push_definition
Push a [`Member`] onto the stack.
crates/ruff_python_semantic/src/model.rs:1436
↓ 1 callers
Function
push_diagnostic
(checker: &Checker, range: TextRange, charset: &NamedCharset)
crates/ruff_linter/src/rules/refurb/rules/hardcoded_string_charset.rs:99
↓ 1 callers
Method
push_diagnostic
(&mut self, diagnostic: Diagnostic)
crates/ty_python_semantic/src/fixes.rs:714
↓ 1 callers
Function
push_escaped_markdown_text
(output: &mut String, input: &str)
crates/ty_ide/src/docstring/markdown/general/inline.rs:596
↓ 1 callers
Method
push_expression
(&mut self, expression: ast::InterpolatedElement)
crates/ruff_python_formatter/tests/normalizer.rs:135
↓ 1 callers
Method
push_fallback_line
Adds `line` to the speculative rendering used if conversion is abandoned.
crates/ty_ide/src/docstring/markdown/general/inline.rs:265
↓ 1 callers
Method
push_format_action
Consume this block and add actions to the give queue for formatting. This may trim lines from the end of the block and add them to the queue for prin
crates/ruff_python_formatter/src/string/docstring.rs:1250
↓ 1 callers
Method
push_indentation
(&mut self, indentation: TextSize, leading_indentation: LeadingIndentation)
crates/ty_ide/src/docstring/markdown/general.rs:299
↓ 1 callers
Method
push_leading_comment
(&mut self, node: AnyNodeRef<'a>, comment: impl Into<SourceComment>)
crates/ruff_python_formatter/src/comments/visitor.rs:617
↓ 1 callers
Function
push_link_destination
(output: &mut String, input: &str)
crates/ty_ide/src/docstring/markdown/general/inline.rs:638
↓ 1 callers
Function
push_link_label
(output: &mut String, input: &str)
crates/ty_ide/src/docstring/markdown/general/inline.rs:608
↓ 1 callers
Method
push_literal
The logic for concatenating adjacent string literals occurs here, implicitly: when we encounter a sequence of string literals, the first gets pushed t
crates/ruff_python_formatter/tests/normalizer.rs:114
↓ 1 callers
Method
push_loop
Push a new loop, returning the outer loop, if any.
crates/ty_python_core/src/builder.rs:494
↓ 1 callers
Method
push_marker
(&mut self, metadata_offset: TextSize, source_offset: TextSize)
crates/ruff_python_ast/src/script.rs:184
↓ 1 callers
Method
push_member
Pushes a new member definition and returns its unique id. Members are assumed to be pushed in traversal order, such that parents are pushed before th
crates/ruff_python_semantic/src/definition.rs:212
↓ 1 callers
Method
push_prefix_regex
(&mut self, glob: &Glob)
crates/ty_project/src/glob/include.rs:261
↓ 1 callers
Function
push_raw_segment
(segments: &mut Vec<Segment<'a>>, source: &'a str, range: TextRange)
crates/ty_ide/src/docstring/markdown/structured.rs:108
↓ 1 callers
Method
push_statement
(&mut self, statement: CurrentStatement<'ast, 'db>)
crates/ty_python_core/src/builder.rs:2650
↓ 1 callers
Method
push_static_substitution
(&mut self, line: ParsedLine<'a>)
crates/ty_ide/src/docstring/document/numpy.rs:346
↓ 1 callers
Method
push_token
SAFETY: `LogicalLines::from_tokens` asserts that the file has less than `u32::MAX` tokens and each tokens is at least one character long
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:392
↓ 1 callers
Method
push_token_at
( &mut self, start: lsp_types::Position, length: u32, ty: SemanticTokenType,
crates/ty_server/src/server/api/semantic_tokens.rs:105
↓ 1 callers
Method
push_trailing_comment
(&mut self, node: AnyNodeRef<'a>, comment: impl Into<SourceComment>)
crates/ruff_python_formatter/src/comments/visitor.rs:627
↓ 1 callers
Method
push_try_context
Registers a `try` statement on the current scope's exception-context stack. Only suites with handlers collect exception checkpoints; a bare handler p
crates/ty_python_core/src/builder/except_handlers.rs:70
↓ 1 callers
Method
push_type
(&mut self, ty: Type<'db>, seen_aliases: &mut Vec<Type<'db>>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1173
↓ 1 callers
Function
push_unescaped
(output: &mut String, text: &str)
crates/ty_ide/src/docstring/markdown/structured.rs:457
↓ 1 callers
Method
py_slice
( &self, _db: &'db dyn Db, start: Option<i32>, stop: Option<i32>, step
crates/ty_python_semantic/src/subscript.rs:220
↓ 1 callers
Method
py_typed
Get the `py.typed` info for this package (not considering parent packages)
crates/ty_module_resolver/src/path.rs:107
↓ 1 callers
Function
pytest_db
(path: &'static str, source: &'static str)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1241
↓ 1 callers
Function
pytest_db
(path: &'static str, source: &'static str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3597
↓ 1 callers
Function
pytest_db_with_config
( files: &[(&'static str, &'static str)], config: &'static str, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3626
↓ 1 callers
Function
pytest_fixture_autouse
`pytest-fixture-autouse`
crates/ruff_linter/src/rules/ruff/rules/pytest_fixture_autouse.rs:75
↓ 1 callers
Function
pytest_fixture_parentheses
( checker: &Checker, decorator: &Decorator, fix: Fix, expected: Parentheses, actual: Paren
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:727
↓ 1 callers
Function
pytest_global_plugin_files_from_config
( db: &'db dyn Db, config_file: ProgramFile<'db>, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:329
↓ 1 callers
Function
pytest_legacy_tmpdir_plugin
( db: &'db dyn Db, program: Program<'db>, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:381
↓ 1 callers
Function
pytest_mark_parentheses
( checker: &Checker, decorator: &Decorator, marker: &str, fix: Fix, preferred: Parentheses
crates/ruff_linter/src/rules/flake8_pytest_style/rules/marks.rs:138
↓ 1 callers
Function
pytest_raises_ambiguous_pattern
RUF043
crates/ruff_linter/src/rules/ruff/rules/pytest_raises_ambiguous_pattern.rs:85
↓ 1 callers
Function
pytest_raises_exception_group
ASYNC401
crates/ruff_linter/src/rules/flake8_async/rules/pytest_raises_exception_group.rs:76
↓ 1 callers
Function
pytest_test_class_kind
Returns the collection kind for a class under pytest's default conventions. Returns [`PytestTestKind::Pytest`] for classes whose names start with `Te
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:350
↓ 1 callers
Method
python
(&self)
crates/ty_test/src/config.rs:77
↓ 1 callers
Function
python_builtins
Return the list of builtins for the given Python minor version. Intended to be kept in sync with [`is_python_builtin`].
crates/ruff_python_stdlib/src/builtins.rs:201
↓ 1 callers
Method
python_environment
Resolve the configured Python environment. Return `None` if no path was configured.
crates/ty_project/src/metadata.rs:592
↓ 1 callers
Method
python_environment
Resolve the configured Python environment. Return `None` if no path was configured.
crates/ty_project/src/metadata/options.rs:356
↓ 1 callers
Method
python_file
(&self)
crates/ty_python_semantic/src/types/context.rs:199
↓ 1 callers
Method
python_version
(&self)
crates/ty_test/src/config.rs:61
↓ 1 callers
Method
python_version
(self, db: &'db dyn Db)
crates/ty_python_core/src/program.rs:43
↓ 1 callers
Method
python_version
Returns the Python version associated with this file's program.
crates/ty_python_core/src/program_file.rs:90
↓ 1 callers
Method
python_version_from_metadata
Returns the Python version that was used to create this environment (will only be available for virtual environments that specify the metadata in thei
crates/ty_site_packages/src/lib.rs:424
↓ 1 callers
Method
python_version_with_source
(&self, _file: File)
crates/ty_python_semantic/src/db.rs:187
↓ 1 callers
Function
quadratic_list_summation
RUF017
crates/ruff_linter/src/rules/ruff/rules/quadratic_list_summation.rs:113
↓ 1 callers
Method
qualification_map
Returns the qualification level map for all names. When there's any ambiguity for a name (including conflicts between a class and a type alias), the
crates/ty_python_semantic/src/types/display.rs:659
↓ 1 callers
Method
qualified
(&self)
crates/ty_completion_eval/src/main.rs:522
↓ 1 callers
Method
qualified
Returns the fully qualified name for this symbol. This includes the full absolute module name for the symbol. When this symbol corresponds to a modu
crates/ty_ide/src/all_symbols.rs:151
↓ 1 callers
Method
qualified
(mut self, qualified: impl Into<CompactString>)
crates/ty_ide/src/completion.rs:579
↓ 1 callers
Method
qualified_name
For example, given `import foo`, returns `["foo"]`.
crates/ruff_python_semantic/src/binding.rs:753
↓ 1 callers
Method
qualified_name_components
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/display.rs:86
↓ 1 callers
Function
qualified_symbol_text
If the import action requires qualifying the symbol (e.g. `import foo` instead of `from foo import A`), returns the qualified symbol text. Otherwise r
crates/ty_ide/src/inlay_hints.rs:859
← previous
next →
12,401–12,500 of 31,562, ranked by callers