MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions31,766 in github.com/astral-sh/ruff

↓ 7 callersMethodreachable_symbol_declarations
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1376
↓ 7 callersMethodread_only
(mut self, yes: bool)
crates/ty_python_semantic/src/types/typed_dict.rs:3339
↓ 7 callersMethodrelative_to
(&self, parent: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:211
↓ 7 callersMethodremaining_literal_types
Expand this complement to the enum literals that remain possible.
crates/ty_python_semantic/src/types/enums.rs:784
↓ 7 callersMethodresolve
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/protocol_class.rs:1406
↓ 7 callersFunctionresolve_definition
Resolve import definitions to their targets. Returns resolved definitions which can be either specific definitions or module files. For non-import def
crates/ty_python_semantic/src/types/definition_resolution.rs:592
↓ 7 callersMethodresolve_module
Resolve the given import made in this file to a Module
crates/ty_python_semantic/src/semantic_model.rs:175
↓ 7 callersFunctionresolve_real_module_confident
Resolves a module name to a module, without desperate resolution available (stubs not allowed). This is appropriate for resolving a `KnownModule`, or
crates/ty_module_resolver/src/resolve.rs:180
↓ 7 callersFunctionresolve_root_settings
Extract the [`Settings`] from a given `pyproject.toml` and process the configuration with the given [`ConfigurationTransformer`].
crates/ruff_workspace/src/resolver.rs:426
↓ 7 callersMethodresolve_target_version
Resolve the [`TargetVersion`] to use for linting. This method respects the per-file version overrides in [`LinterSettings::per_file_target_version`]
crates/ruff_linter/src/settings/mod.rs:879
↓ 7 callersMethodroot
(&self)
crates/ty_server/tests/e2e/main.rs:1731
↓ 7 callersMethodrun
Runs the directory traversal and calls the passed `builder` to create visitors that do the visiting. The walker may run multiple threads to visit the
crates/ruff_db/src/system/walk_directory.rs:86
↓ 7 callersMethodsave_text_document
Send a `textDocument/didSave` notification
crates/ty_server/tests/e2e/main.rs:928
↓ 7 callersMethodscope_id
The scope in which the reference is defined.
crates/ruff_python_semantic/src/reference.rs:36
↓ 7 callersMethodset_message
Sets the message on this annotation. If one was already set, then this overwrites it. This is useful if one needs to set the message on an annotatio
crates/ruff_db/src/diagnostic/mod.rs:843
↓ 7 callersMethodsignature_receiver
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/method.rs:79
↓ 7 callersMethodsingle_element
Returns the single `CallableBinding` if this is not a union or intersection.
crates/ty_python_semantic/src/types/call/bind.rs:1501
↓ 7 callersMethodsource_file
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:3781
↓ 7 callersMethodsource_text
(&self)
crates/ruff_source_file/src/lib.rs:177
↓ 7 callersFunctionspace
Return a [`ParenthesizableWhitespace`] containing a single space.
crates/ruff_linter/src/cst/helpers.rs:7
↓ 7 callersMethodspecialization
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:763
↓ 7 callersMethodspecialize_partial
Creates a specialization of this generic context. Panics if the length of `types` does not match the number of typevars in the generic context. If any
crates/ty_python_semantic/src/types/generics.rs:1177
↓ 7 callersMethodstandard_filters
Enables all the standard ignore filters. This toggles, as a group, all the filters that are enabled by default: [`hidden`](Self::ignore_hidden) Any [
crates/ruff_db/src/system/walk_directory.rs:67
↓ 7 callersMethodsub_end
(&self, amount: TextSize)
crates/ruff_text_size/src/range.rs:449
↓ 7 callersFunctionsyntax_error
()
crates/ruff_wasm/tests/api.rs:90
↓ 7 callersMethodsystem
(&self)
crates/ty/tests/file_watching.rs:360
↓ 7 callersMethodtake_salsa_events
Takes the salsa events.
crates/ty_project/src/db.rs:842
↓ 7 callersMethodtake_salsa_events
Takes the salsa events.
crates/ty_module_resolver/src/db.rs:78
↓ 7 callersMethodtext
(name: string)
playground/ty/src/Playground.tsx:730
↓ 7 callersMethodto_class_literal
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1566
↓ 7 callersMethodto_merged_options
Returns all option layers merged according to their precedence.
crates/ty_project/src/metadata.rs:540
↓ 7 callersMethodto_specialized_class_type
Look up a generic [`KnownClass`] in its canonical module and return a [`Type`] representing a specialization of that class. If the class cannot be fo
crates/ty_python_semantic/src/types/class/known.rs:1302
↓ 7 callersMethodto_u32
Returns current raw `offset` as u32. # Examples ```rust # use ruff_text_size::*; assert_eq!(TextSize::from(4).to_u32(), 4); ```
crates/ruff_text_size/src/size.rs:78
↓ 7 callersMethodtokens
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:512
↓ 7 callersMethodtop
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1721
↓ 7 callersFunctiontraverse_union
Traverse a "union" type annotation, applying `func` to each union member. Supports traversal of `Union` and `|` union expressions. The function is c
crates/ruff_python_semantic/src/analyze/typing.rs:477
↓ 7 callersMethodtrim_whitespace_end
(&self)
crates/ruff_python_trivia/src/whitespace.rs:121
↓ 7 callersMethodtruncate
(&mut self, snapshot: &PathSnapshot)
crates/ty_python_semantic/src/types/constraints/paths.rs:455
↓ 7 callersMethodtry_call_dunder_get
Looks up `__get__` on the meta-type of `self` and calls it with `self`, `instance`, and `owner`. Unlike other dunder methods, `__get__` is not itself
crates/ty_python_semantic/src/types.rs:5198
↓ 7 callersMethodtry_metaclass
Return the selected metaclass or protocol fallback, or an error if it cannot be inferred.
crates/ty_python_semantic/src/types/class/static_literal.rs:1312
↓ 7 callersMethodtypevar_data
(&self, typevar: TypeVarId)
crates/ty_python_semantic/src/types/constraints.rs:1535
↓ 7 callersMethodunpack
Matches the source sequence `self` to the target shape specified by `length`. For `a, b = (1, "two")`, `length` is `TupleLength::Fixed(2)`, and each
crates/ty_python_semantic/src/types/tuple.rs:2412
↓ 7 callersMethodunpack_keys_and_items
Returns the key and value types of this object if it was unpacked using `**`, or `None` if the object does not support unpacking.
crates/ty_python_semantic/src/types.rs:7053
↓ 7 callersFunctionuv_workspace
(root: &SystemPathBuf, system: &TestSystem)
crates/ty_project/src/metadata.rs:2161
↓ 7 callersMethodvalue
(&self)
crates/ty_project/src/metadata/value.rs:149
↓ 7 callersMethodversion
Get the version of document selected by this query.
crates/ruff_server/src/session/index.rs:615
↓ 7 callersMethodvisit
( &self, db: &'db dyn Db, ty: Type<'db>, type_mapping: &TypeMapping<'_, 'db>,
crates/ty_python_semantic/src/types.rs:581
↓ 7 callersMethodvisit_body
(&mut self, body: &'a [Stmt])
crates/ruff_python_ast/src/visitor.rs:93
↓ 7 callersMethodvisit_expr
(&mut self, expr: &Expr)
crates/ty_ide/src/semantic_tokens.rs:1079
↓ 7 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/typevar.rs:1013
↓ 7 callersMethodwatcher_registration_request
( &mut self, )
crates/ty_server/tests/e2e/main.rs:622
↓ 7 callersFunctionwatcher_registrations
(server: &mut TestServer)
crates/ty_server/tests/e2e/file_watching.rs:535
↓ 7 callersMethodwhen_false
(self)
crates/ty_python_semantic/src/types/constraints.rs:1822
↓ 7 callersMethodwith_definedness
(mut self, definedness: Definedness)
crates/ty_python_semantic/src/place.rs:170
↓ 7 callersFunctionwith_escaped_paths
(f: impl FnOnce() -> R)
crates/ty_project/src/metadata.rs:2176
↓ 7 callersMethodwith_expanded_typevars_and_newtypes
Return a version of this intersection type where any type variables in the positive elements have been replaced by their bounds or constraints, and wh
crates/ty_python_semantic/src/types/set_theoretic.rs:1488
↓ 7 callersMethodwith_library_root
Add a "library" root to this test case.
crates/ty_module_resolver/src/testing.rs:161
↓ 7 callersMethodwith_optional_default_type
(self, default: Option<Type<'db>>)
crates/ty_python_semantic/src/types/signatures.rs:6092
↓ 7 callersMethodwith_polarity
Creates a `VarianceInferable` that applies `polarity` (see `TypeVarVariance::compose`) to the result of variance inference on the underlying value. I
crates/ty_python_semantic/src/types/variance.rs:256
↓ 7 callersMethodwith_print_mode
(mut self, mode: PrintMode)
crates/ruff_formatter/src/printer/call_stack.rs:74
↓ 7 callersMethodwith_recursion
(&mut self, f: impl FnOnce(&mut Self) -> T)
crates/ruff_python_parser/src/parser/mod.rs:965
↓ 6 callersMethodaccepted_type
Which type is accepted in a write to this protocol member? Returns `None` if that type cannot be represented directly (if the protocol member is a cu
crates/ty_python_semantic/src/types/attribute_write.rs:104
↓ 6 callersMethodadd_binding
Add a [`Binding`] to the current scope, bound to the given name.
crates/ruff_linter/src/checkers/ast/mod.rs:2823
↓ 6 callersMethodadd_clause
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:1958
↓ 6 callersMethodadd_future_import
Add a `from __future__ import annotations` import.
crates/ruff_linter/src/importer/mod.rs:569
↓ 6 callersFunctionadd_inferred_python_version_hint_to_diagnostic
Add a subdiagnostic to `diagnostic` that explains why a certain Python version was inferred. ty can infer the Python version from various sources, su
crates/ty_python_semantic/src/diagnostic/mod.rs:50
↓ 6 callersMethodadd_place
Add a place to the place table and the use-def map. Return the [`ScopedPlaceId`] that uniquely identifies the place in both.
crates/ty_python_core/src/builder.rs:1384
↓ 6 callersMethodadd_predicate
Adds a new predicate to the list of all predicates, but does not record it. Returns the predicate ID for later recording using [`SemanticIndexBuilder:
crates/ty_python_core/src/builder.rs:2326
↓ 6 callersMethodadd_range
Add the given folding range if it spans multiple lines.
crates/ty_ide/src/folding_range.rs:128
↓ 6 callersMethodadd_str
(self, text: &str)
crates/ruff_linter/src/line_width.rs:219
↓ 6 callersFunctionadjust_indentation
Safely adjust the indentation of the indented block at [`TextRange`]. The [`TextRange`] is assumed to represent an entire indented block, including t
crates/ruff_linter/src/fix/edits.rs:442
↓ 6 callersMethodadvance
Returns a new search which has been advanced by one component of a module name. The previous search object can be reused for searching sibling module
crates/ty_module_resolver/src/resolve/search.rs:270
↓ 6 callersFunctionall
(x)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C419_2.py:2
↓ 6 callersMethodanalyze_constraint_set
Solves one relation without recording it or changing the legacy type mappings.
crates/ty_python_semantic/src/types/generics.rs:3619
↓ 6 callersMethodanalyze_successful_pattern
Compute the subject and binding types produced by a successful pattern. `subject_ty` is the type of the value reaching this pattern node. Structural
crates/ty_python_semantic/src/types/narrow.rs:2234
↓ 6 callersMethodannotations
(&self, workspace: &Workspace)
crates/ty_wasm/src/lib.rs:913
↓ 6 callersMethodapply_changes
( &mut self, client: &Client, path: &AnySystemPath, changes: &[ChangeEvent],
crates/ty_server/src/session.rs:548
↓ 6 callersMethodapply_configuration_files
Loads the lower-precedence options from the user-level configuration file.
crates/ty_project/src/metadata.rs:516
↓ 6 callersMethodapply_specialization
Apply a specialization to this class.
crates/ty_python_semantic/src/types/class.rs:1063
↓ 6 callersMethodargument_context_type
(&self)
crates/ty_python_semantic/src/types/signatures.rs:6326
↓ 6 callersMethodas_compare_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2199
↓ 6 callersMethodas_import_from_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1028
↓ 6 callersMethodas_instance_attribute
Return `Some(<ATTRIBUTE>)` if the place expression is an instance attribute.
crates/ty_python_core/src/member.rs:113
↓ 6 callersMethodas_paramspec
Returns the bound `ParamSpec` type variable if the parameter list is exactly `P`. For either `P` or `Concatenate[<prefix-params>, P]`, use [`as_param
crates/ty_python_semantic/src/types/signatures.rs:5305
↓ 6 callersMethodas_paramspec_value
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:3167
↓ 6 callersMethodas_ptr
(&self)
crates/ruff_python_ast/src/generated.rs:7088
↓ 6 callersMethodas_relation_checker
( &'a self, materialization_visitor: &'a ApplyTypeMappingVisitor<'a, 'db>, )
crates/ty_python_semantic/src/types/relation.rs:3466
↓ 6 callersMethodas_str
(&self)
crates/ruff_python_trivia/src/cursor.rs:45
↓ 6 callersMethodas_str
The full debug text between the `{` and the conversion / `format_spec` / `}`.
crates/ruff_python_ast/src/nodes.rs:526
↓ 6 callersMethodas_str
(self)
crates/ruff_linter/src/rules/flake8_pie/rules/reimplemented_container_builtin.rs:102
↓ 6 callersMethodas_u8
Return the [`Int`] as an u8, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:69
↓ 6 callersFunctionassert_comparable
(left: &str, right: &str)
crates/ruff_python_ast_integration_tests/tests/comparable.rs:11
↓ 6 callersFunctionassert_logical_lines
(contents: &str, expected: &[&str])
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:663
↓ 6 callersMethodassert_package_directories
( &self, name: &str, mode: ModuleResolveMode, expected: Option
crates/ty_module_resolver/src/resolve.rs:3573
↓ 6 callersFunctionassert_section_is_structurally_ambiguous
(raw: &str)
crates/ty_ide/src/docstring/document/numpy.rs:1349
↓ 6 callersMethodassert_work_done_progress
( &mut self, expected_title: &str, )
crates/ty_server/tests/e2e/main.rs:656
↓ 6 callersFunctionassignment_attribute_members
Return the members considered by attribute assignment in lookup-precedence order. The type member comes from class-member lookup. A member found dire
crates/ty_python_semantic/src/types/attribute_write.rs:1195
↓ 6 callersMethodat_soft_keyword
Returns `true` if the parser is at a soft keyword token.
crates/ruff_python_parser/src/parser/expression.rs:131
↓ 6 callersFunctionbind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured/numpy.rs:365
↓ 6 callersFunctionbinding
( bound_typevar: BoundTypeVarInstance<'db>, solution: Type<'db>, )
crates/ty_python_semantic/src/types/constraints/resolution.rs:272
← previousnext →2,201–2,300 of 31,766, ranked by callers