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
↓ 4 callers
Function
map_member_lookup_type
( db: &'db dyn Db, result: MemberLookupResult<'db>, f: impl FnOnce(Type<'db>) -> Type<'db>, )
crates/ty_python_semantic/src/types.rs:1193
↓ 4 callers
Method
map_type
Transform the member's value type without changing its property accessor deprecations.
crates/ty_python_semantic/src/types.rs:1158
↓ 4 callers
Method
mark_bound
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/place.rs:441
↓ 4 callers
Method
mark_parameter
(&mut self)
crates/ty_python_core/src/symbol.rs:163
↓ 4 callers
Method
mark_used
(&mut self, suppression_id: FileSuppressionId)
crates/ty_python_semantic/src/types/diagnostic.rs:1695
↓ 4 callers
Function
match_arg
(call: &'a Call<'b>)
crates/ruff_linter/src/cst/matchers.rs:115
↓ 4 callers
Function
match_candidate_exclusion
Return `true` if the given candidates should be ignored based on the exclusion criteria.
crates/ruff_workspace/src/resolver.rs:888
↓ 4 callers
Function
match_indented_block
( suite: &'a mut Suite<'b>, )
crates/ruff_linter/src/cst/matchers.rs:193
↓ 4 callers
Method
materialize_impl
( self, db: &'db dyn Db, materialization_kind: MaterializationKind, visitor: &
crates/ty_python_semantic/src/types/generics.rs:1575
↓ 4 callers
Method
materialize_ref
Returns the materialized place state for immutable access. Call this instead of [`Self::materialize`] when the state will only be read. If the pendin
crates/ty_python_core/src/use_def.rs:1897
↓ 4 callers
Method
materialized_origin
Returns the class origin of a protocol with a pending materialization.
crates/ty_python_semantic/src/types/instance.rs:1780
↓ 4 callers
Method
may_be_present
Returns `false` for optional fields whose declared type is uninhabited.
crates/ty_python_semantic/src/types/typed_dict.rs:3266
↓ 4 callers
Method
member_count
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:370
↓ 4 callers
Method
member_id_by_instance_attribute_name
(&self, name: &str)
crates/ty_python_core/src/place.rs:315
↓ 4 callers
Method
member_sources
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:67
↓ 4 callers
Method
members_in_scope_at
Builds a set of members in scope at the given AST node and position. Callers should use this routine to build "in scope members" to be used with repe
crates/ty_python_semantic/src/importer.rs:95
↓ 4 callers
Method
merge
Merge the given snapshot into the current state, reflecting that we might have taken either path to get here. The new state for each place should incl
crates/ty_python_core/src/use_def.rs:3237
↓ 4 callers
Method
merge
(&mut self, b: Self, reachability_constraints: &mut ReachabilityConstraintsBuilder)
crates/ty_python_core/src/use_def/place_state.rs:271
↓ 4 callers
Method
merged_specialization
Merge the alternatives into one closed specialization, discarding their correlations and completeness. Compatibility and diagnostic results use their
crates/ty_python_semantic/src/types/generics.rs:2592
↓ 4 callers
Method
message
Attach a message to this annotation. An annotation without a message will still have a presence in rendering. In particular, it will highlight the sp
crates/ruff_db/src/diagnostic/mod.rs:860
↓ 4 callers
Method
message
(&self)
crates/ty_wasm/src/lib.rs:908
↓ 4 callers
Method
metaclass_instance_type
Return a type representing "the set of all instances of the metaclass of this class".
crates/ty_python_semantic/src/types/class.rs:845
↓ 4 callers
Method
model
(name: string)
playground/ty/src/Playground.tsx:767
↓ 4 callers
Function
module_type_symbols
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/place.rs:2650
↓ 4 callers
Method
mro_identity
Return the identity of this base for method-resolution-order construction. Specializations of a generic class share one runtime class and must occupy
crates/ty_python_semantic/src/types/class_base.rs:112
↓ 4 callers
Method
multiline
(&self)
crates/ty_python_semantic/src/types/display.rs:167
↓ 4 callers
Method
name
(self, name: String)
crates/ruff_server/src/server/schedule/thread.rs:48
↓ 4 callers
Method
name_in_file
Returns the name of this symbol as it exists in a file. When absent, there is no concrete symbol in a module somewhere. Instead, this represents impo
crates/ty_ide/src/all_symbols.rs:141
↓ 4 callers
Method
narrow
Narrows a binding while reusing projections and shared suffixes from earlier bindings.
crates/ty_python_semantic/src/reachability.rs:1231
↓ 4 callers
Method
narrowing_constraint
(&self)
crates/ty_python_core/src/use_def/place_state.rs:418
↓ 4 callers
Method
narrowing_evaluator
( &self, constraint: ScopedNarrowingConstraint, )
crates/ty_python_core/src/use_def.rs:1178
↓ 4 callers
Method
nearest_disjoint_base
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:1632
↓ 4 callers
Method
needs_parentheses
( &self, parent: AnyNodeRef, context: &PyFormatContext, )
crates/ruff_python_formatter/src/pattern/mod.rs:138
↓ 4 callers
Method
nesting
(&self)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:50
↓ 4 callers
Method
new_module_name
(&self, old_module_name: &ModuleName)
crates/ty_ide/src/will_rename.rs:218
↓ 4 callers
Method
next
(&mut self)
crates/ruff_formatter/src/printer/queue.rs:219
↓ 4 callers
Method
next
(&mut self)
crates/ty_python_semantic/src/types/set_theoretic.rs:993
↓ 4 callers
Method
next_back
(&mut self)
crates/ruff_formatter/src/format_element.rs:442
↓ 4 callers
Method
next_sibling
(&self)
crates/ruff_python_ast/src/traversal.rs:69
↓ 4 callers
Method
node_key
(self)
crates/ty_python_core/src/scope.rs:342
↓ 4 callers
Function
non_terminal_call_predicates
( db: &'db dyn Db, scope: ScopeId<'db>, )
crates/ty_python_semantic/src/reachability.rs:684
↓ 4 callers
Function
non_type_parameter_parent
Returns a scope's lexical parent, skipping an intervening type-parameter scope.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1366
↓ 4 callers
Function
normalize_candidates
Orders candidates for the same module name by precedence and removes shadowed namespace packages. Regular packages and file modules shadow namespace
crates/ty_module_resolver/src/resolve.rs:1427
↓ 4 callers
Function
normalize_path_to
Convert any path to an absolute path (based on the specified project root).
crates/ruff_linter/src/fs.rs:39
↓ 4 callers
Function
normalize_string
( input: &str, start_offset: usize, new_flags: AnyStringFlags, escape_braces: bool, )
crates/ruff_python_formatter/src/string/normalize.rs:664
↓ 4 callers
Method
num_lines
(&self)
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:135
↓ 4 callers
Method
object
Return a `ClassLiteral` representing the class `builtins.object`
crates/ty_python_semantic/src/types/class.rs:624
↓ 4 callers
Method
observe_line_outside_preformatted_block
Updates internal state for a line outside of any active preformatted block.
crates/ty_ide/src/docstring/document/preformatted.rs:118
↓ 4 callers
Method
offset
(&self)
crates/ruff_python_trivia/src/cursor.rs:27
↓ 4 callers
Method
offset
(&self)
crates/ruff_linter/src/docstrings/sections.rs:344
↓ 4 callers
Method
open_virtual_text_document
Send a `textDocument/didOpen` notification for an unsaved virtual document.
crates/ty_server/tests/e2e/main.rs:885
↓ 4 callers
Method
openness
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/typed_dict.rs:975
↓ 4 callers
Method
opposite
(self)
crates/ruff_python_ast/src/str.rs:37
↓ 4 callers
Method
options
Returns the client options for this workspace.
crates/ruff_server/src/workspace.rs:115
↓ 4 callers
Method
or_never
Returns the retained type, or `Never` if every union element was disjoint.
crates/ty_python_semantic/src/types.rs:2273
↓ 4 callers
Method
order_rule_selectors
Sorts rule selectors according to their precedence. From highest to lowest precedence normal rule names An alias for another rule (the new name wins
crates/ty_project/src/metadata/options.rs:173
↓ 4 callers
Method
own_instance_member
A helper function for `instance_member` that looks up the `name` attribute only on this class, not on its superclasses.
crates/ty_python_semantic/src/types/class.rs:2262
↓ 4 callers
Function
own_model_fields
(db: &'db dyn Db, class: StaticClassLiteral<'db>)
crates/ty_python_semantic/src/types/dedicated/django.rs:118
↓ 4 callers
Method
package_roots
Return a mapping from Python package to its package root.
crates/ruff_workspace/src/resolver.rs:195
↓ 4 callers
Function
pad_expression
Re-formats the given expression for use within a formatted string. For example, when converting a `dict()` call to a dictionary literal within a form
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:322
↓ 4 callers
Method
parent_range
Returns the range of the binding's parent.
crates/ruff_python_semantic/src/binding.rs:292
↓ 4 callers
Method
parse
Parses a portable glob pattern. Returns an error if the pattern isn't valid.
crates/ty_project/src/glob/portable.rs:40
↓ 4 callers
Method
parse_comma_separated_list_into_vec
Parses a comma separated list of elements into a vector where each element is parsed using the given `parse_element` function.
crates/ruff_python_parser/src/parser/mod.rs:755
↓ 4 callers
Method
parse_generators
Parses a list of comprehension generators. These are the `for` and `async for` clauses in a comprehension, optionally followed by `if` clauses. See:
crates/ruff_python_parser/src/parser/expression.rs:2531
↓ 4 callers
Method
parse_list
Parses a list of elements where each element is parsed using the given `parse_element` function.
crates/ruff_python_parser/src/parser/mod.rs:699
↓ 4 callers
Function
parse_pyproject_toml
Parse a `pyproject.toml` file.
crates/ruff_workspace/src/pyproject.rs:72
↓ 4 callers
Function
parse_string_annotation
Parses the given expression as a string annotation.
crates/ty_python_semantic/src/types/string_annotation.rs:51
↓ 4 callers
Method
path
(&self)
crates/ruff_server/src/session/index/ruff_settings.rs:35
↓ 4 callers
Function
pattern_binding_fallthrough_type
Return the fallthrough type for a binding that can reach a later match case. Failure of a sequence pattern establishes length and indexed-element fac
crates/ty_python_semantic/src/types/match_pattern.rs:1024
↓ 4 callers
Function
pattern_is_exhaustive_for_subject
Return whether `pattern` is statically guaranteed to match every value in `subject_ty`.
crates/ty_python_semantic/src/types/match_pattern.rs:588
↓ 4 callers
Method
peek_byte
(&self)
crates/ruff_python_parser/src/string.rs:152
↓ 4 callers
Method
pending_candidate_solution
Create a pending candidate solution for the current path. This method is fallible because a path to the `true` terminal might still be unsatisfiable,
crates/ty_python_semantic/src/types/constraints/solutions.rs:1533
↓ 4 callers
Function
place_from_bindings_impl
Implementation of [`place_from_bindings`]. ## Implementation Note This function gets called cross-module. It, therefore, shouldn't access any AST nod
crates/ty_python_semantic/src/place.rs:1852
↓ 4 callers
Function
place_from_bindings_with_reachability_cache
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, bindings_with_constraints: BindingWithConstraint
crates/ty_python_semantic/src/place.rs:804
↓ 4 callers
Method
positive_constraints
( &self, )
crates/ty_python_semantic/src/types/constraints/paths.rs:526
↓ 4 callers
Method
positive_elements
(mut self, elements: I)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1855
↓ 4 callers
Method
possibly_add_export
(&mut self, export: &'db Name, kind: PossibleExportKind)
crates/ty_python_core/src/re_exports.rs:77
↓ 4 callers
Method
precise_iterable_element_type
( &self, iterable: &ast::Expr, expression_type: impl FnMut(&ast::Expr) -> Type<'db>,
crates/ty_python_semantic/src/types/infer/builder.rs:5339
↓ 4 callers
Method
predicate_narrowing_targets
(&self)
crates/ty_python_core/src/use_def.rs:1612
↓ 4 callers
Function
prepare
( server: &mut crate::TestServer, path: impl AsRef<ruff_db::system::SystemPath>, position: Positio
crates/ty_server/tests/e2e/call_hierarchy.rs:301
↓ 4 callers
Method
prepare_call_arguments
Infer the variadic argument types needed for call binding and emit the shared diagnostics for invalid `*args` and `**kwargs` inputs.
crates/ty_python_semantic/src/types/infer/builder.rs:9361
↓ 4 callers
Method
primary_tags
Returns the tags from the primary annotation of this diagnostic if it exists.
crates/ruff_db/src/diagnostic/mod.rs:339
↓ 4 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/visitor.rs:527
↓ 4 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/class/static_literal.rs:559
↓ 4 callers
Method
program_file
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/definition_resolution.rs:91
↓ 4 callers
Method
project_type_form
Projects type-form values to the static types that they represent. This projects `TypeForm[T]` to `T` and runtime class forms to their instance types
crates/ty_python_semantic/src/types/type_form.rs:37
↓ 4 callers
Method
projects_mut
Returns a mutable iterator over all project databases.
crates/ty_server/src/session.rs:583
↓ 4 callers
Function
property
(value: &JsValue, name: &str)
crates/ruff_wasm/tests/api.rs:46
↓ 4 callers
Method
property_deprecations
Collect deprecated accessor implementations without inferring their signatures or intersecting their function or descriptor types. Retain the declarat
crates/ty_python_semantic/src/types.rs:5070
↓ 4 callers
Method
provenance
(&self)
crates/ty_python_semantic/src/types.rs:12097
↓ 4 callers
Function
publish_all_document_diagnostics
Publishes diagnostics for all open files that need push diagnostics.
crates/ty_server/src/server/api/diagnostics.rs:199
↓ 4 callers
Function
publish_diagnostics_if_needed
Publishes the diagnostics for the given document snapshot using the [publish diagnostics notification] . Unlike [`publish_diagnostics`], this functio
crates/ty_server/src/server/api/diagnostics.rs:213
↓ 4 callers
Method
push_binding
Create a new [`Binding`] for the given `name` and `range`.
crates/ruff_python_semantic/src/model.rs:363
↓ 4 callers
Method
push_definition
(&mut self, entry: DefinitionEntry<'db>)
crates/ty_python_core/src/use_def.rs:2312
↓ 4 callers
Method
push_scope
Pushes a new scope and returns its unique id
crates/ruff_python_semantic/src/scope.rs:273
↓ 4 callers
Method
push_scope
(&mut self, node: NodeWithScopeRef)
crates/ty_python_core/src/builder.rs:510
↓ 4 callers
Function
pytest_global_plugin_files
Returns the installed core pytest plugin files in registration order.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:306
↓ 4 callers
Method
python_version
The Python version used to resolve this module.
crates/ty_module_resolver/src/module.rs:83
↓ 4 callers
Method
python_version
(&self)
crates/ruff_python_parser/tests/fixtures.rs:636
↓ 4 callers
Method
quote_len
The length of the quotes used to start and close the string. This does not include the length of any prefixes the string has in its opener.
crates/ruff_python_ast/src/nodes.rs:1003
← previous
next →
3,401–3,500 of 31,562, ranked by callers