MCPcopy Create free account

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

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

↓ 7 callersMethodto_diagnostic
(&self, severity: Severity)
crates/ty_project/src/uv/metadata.rs:131
↓ 7 callersMethodto_merged_options
Returns all option layers merged according to their precedence.
crates/ty_project/src/metadata.rs:532
↓ 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:1673
↓ 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 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:5176
↓ 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:1313
↓ 7 callersMethodtypevar_data
(&self, typevar: TypeVarId)
crates/ty_python_semantic/src/types/constraints.rs:1606
↓ 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:6992
↓ 7 callersFunctionuv_workspace
(root: &SystemPathBuf, system: &TestSystem)
crates/ty_project/src/metadata.rs:2149
↓ 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:580
↓ 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 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 callersMethodwith_definedness
(mut self, definedness: Definedness)
crates/ty_python_semantic/src/place.rs:175
↓ 7 callersFunctionwith_escaped_paths
(f: impl FnOnce() -> R)
crates/ty_project/src/metadata.rs:2164
↓ 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:6189
↓ 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
↓ 7 callersMethodwith_transformed_parameters
Rebuild this parameter list after transforming its existing parameters. Unlike [`Self::from_annotation`], this preserves the provenance of the origin
crates/ty_python_semantic/src/types/signatures.rs:5279
↓ 7 callersMethodwith_use_uv
(mut self, use_uv: UseUv)
crates/ty_project/src/metadata.rs:353
↓ 7 callersMethodwith_vendored_typeshed
Use the vendored stdlib stubs included in the Ruff binary for this test case
crates/ty_module_resolver/src/testing.rs:197
↓ 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:103
↓ 6 callersMethodadd_binding
Add a [`Binding`] to the current scope, bound to the given name.
crates/ruff_linter/src/checkers/ast/mod.rs:2813
↓ 6 callersMethodadd_clause
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:2029
↓ 6 callersMethodadd_future_import
Add a `from __future__ import annotations` import.
crates/ruff_linter/src/importer/mod.rs:565
↓ 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:433
↓ 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:271
↓ 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:3598
↓ 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:2232
↓ 6 callersMethodannotations
(&self, workspace: &Workspace)
crates/ty_wasm/src/lib.rs:913
↓ 6 callersFunctionany_over_type_including_alias_arguments
Searches through the arguments of [`Type::TypeAlias`] without evaluating alias bodies or other lazy attributes. This also visits arguments that the al
crates/ty_python_semantic/src/types/visitor.rs:1080
↓ 6 callersMethodapply_changes
( &mut self, client: &Client, path: &AnySystemPath, changes: &[ChangeEvent],
crates/ty_server/src/session.rs:549
↓ 6 callersMethodapply_configuration_files
Loads the lower-precedence options from the user-level configuration file.
crates/ty_project/src/metadata.rs:508
↓ 6 callersMethodapply_specialization
Apply a specialization to this class.
crates/ty_python_semantic/src/types/class.rs:1044
↓ 6 callersMethodas_atomic
(self, storage: &ConstraintSetStorage<'_>)
crates/ty_python_semantic/src/types/constraints.rs:1862
↓ 6 callersMethodas_compare_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2199
↓ 6 callersMethodas_enum
(self)
crates/ty_python_semantic/src/types/literal.rs:197
↓ 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:5392
↓ 6 callersMethodas_paramspec_value
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:3168
↓ 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:3409
↓ 6 callersMethodas_str
The full debug text between the `{` and the conversion / `format_spec` / `}`.
crates/ruff_python_ast/src/nodes.rs:513
↓ 6 callersMethodas_str
(self)
crates/ruff_linter/src/rules/flake8_pie/rules/reimplemented_container_builtin.rs:100
↓ 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 callersFunctionassert_section_is_structurally_ambiguous
(raw: &str)
crates/ty_ide/src/docstring/document/numpy.rs:1351
↓ 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:1055
↓ 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:273
↓ 6 callersMethodbuild
(self)
crates/ty_project/src/glob/exclude.rs:90
↓ 6 callersMethodbuild
(self)
crates/ty_python_core/src/db.rs:159
↓ 6 callersMethodbump_any
Bumps the current token regardless of its kind and advances to the next token. # Panics If the parser is at end of file.
crates/ruff_python_parser/src/parser/mod.rs:588
↓ 6 callersMethodbump_revision
Bumps the revision. The revision is used to track when workspace diagnostics may have changed and need to be re-run. It's okay if a bump doesn't nece
crates/ty_server/src/session.rs:415
↓ 6 callersMethodcache_key
(&self)
crates/ty_project/src/uv/service.rs:180
↓ 6 callersMethodcall
(param)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/fmtonoff5.py:52
↓ 6 callersMethodcell_offsets
Return the [`CellOffsets`] for the concatenated source code corresponding the Jupyter notebook.
crates/ruff_notebook/src/notebook.rs:396
↓ 6 callersMethodcharge_type
Charges the set-theoretic terms that a type constructor may flatten or inspect. Aliases are included so a large union cannot evade the limit by being
crates/ty_python_semantic/src/types/constraints/projection.rs:73
↓ 6 callersFunctioncheck
()
crates/ty_wasm/tests/api.rs:7
↓ 6 callersFunctioncheck_file
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/lib.rs:235
↓ 6 callersMethodclear_salsa_events
Clears the emitted salsa events.
crates/ruff_db/src/lib.rs:181
↓ 6 callersMethodclone
(self, checkout_dir: Path)
scripts/ty_benchmark/src/benchmark/projects.py:43
↓ 6 callersMethodcmp
(&self, other: &Self)
crates/ty_python_semantic/src/types/constraints/paths.rs:179
↓ 6 callersMethodcmp
(&self, other: &Self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:613
↓ 6 callersMethodcodes_as_str
Return the suppressed codes as strings
crates/ruff_linter/src/suppression.rs:79
↓ 6 callersFunctioncommand
()
crates/ruff/tests/analyze_graph.rs:15
↓ 6 callersMethodcomments_in_range
Returns the comments who are within the range
crates/ruff_python_trivia/src/comment_ranges.rs:94
↓ 6 callersFunctioncompletion
( db: &'db dyn Db, settings: &CompletionSettings, capabilities: CompletionCapabilities, file:
crates/ty_ide/src/completion.rs:36
↓ 6 callersMethodcompose_thunk
(self, other: F)
crates/ty_python_semantic/src/types/variance.rs:154
↓ 6 callersMethodconstructed_instance_type
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:77
↓ 6 callersMethodcontents
(&self)
crates/ty_server/src/document/text_document.rs:77
↓ 6 callersMethodcontext
Set the number of contextual lines to include for each snippet in diagnostic rendering.
crates/ruff_db/src/diagnostic/render.rs:2531
↓ 6 callersFunctioncreate_diagnostics
( filename: &str, source: &str, edit: impl IntoIterator<Item = Edit>, )
crates/ruff_linter/src/fix/mod.rs:184
↓ 6 callersFunctioncreate_notebook_diagnostics
Create Ruff-style diagnostics for testing the various output formats for a notebook.
crates/ruff_db/src/diagnostic/render.rs:3111
↓ 6 callersMethodcurrent_scope_id
(&self)
crates/ty_python_core/src/builder.rs:398
↓ 6 callersMethodcurrent_token_text
(&self)
crates/ruff_python_parser/src/parser/mod.rs:497
↓ 6 callersFunctioncustom_enum_method
Returns the enum method defined in `scope`, including opaque bindings.
crates/ty_python_semantic/src/types/enums.rs:1504
↓ 6 callersFunctiondataclass_kind
Return the kind of dataclass this class definition is (stdlib or `attrs`), or `None` if the class is not a dataclass.
crates/ruff_linter/src/rules/ruff/helpers.rs:108
↓ 6 callersMethoddeclarations_id
(self)
crates/ty_python_core/src/use_def.rs:342
↓ 6 callersMethoddedent
(&mut self)
crates/ruff_python_parser/src/lexer/indentation.rs:121
↓ 6 callersMethoddefer_annotations
Are we currently inferring types in file with deferred types? This is true for stub files, for files with `__future__.annotations`, and by default for
crates/ty_python_semantic/src/types/infer/builder.rs:1028
↓ 6 callersMethoddefinition
Returns where this type is defined. It's the foundation for the editor's "Go to type definition" feature where the user clicks on a value and it take
crates/ty_python_semantic/src/types.rs:10854
← previousnext →2,201–2,300 of 31,562, ranked by callers