MCPcopy Create free account

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

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

↓ 5 callersMethodadd_interior
(&mut self, node: InteriorNode)
crates/ty_python_core/src/narrowing_constraints.rs:193
↓ 5 callersMethodadd_negated_atom
( &mut self, predicate: ScopedPredicateId, )
crates/ty_python_core/src/narrowing_constraints.rs:253
↓ 5 callersMethodadd_standalone_expression
Record an expression that needs to be a Salsa ingredient, because we need to infer its type standalone (type narrowing tests, RHS of an assignment.)
crates/ty_python_core/src/builder.rs:2911
↓ 5 callersMethodadd_standalone_expression_impl
( &mut self, expression_node: &ast::Expr, expression_kind: ExpressionKind, ass
crates/ty_python_core/src/builder.rs:2952
↓ 5 callersFunctionall_end_of_scope_members
Iterate over all declarations and bindings that exist at the end of the given scope.
crates/ty_python_semantic/src/types/list_members.rs:34
↓ 5 callersMethodancestor_scopes
Returns an iterator over all ancestors of `scope`, starting with `scope` itself.
crates/ty_python_core/src/lib.rs:662
↓ 5 callersMethodapplicability
Return the [`Applicability`] of the [`Fix`].
crates/ruff_diagnostics/src/fix.rs:158
↓ 5 callersMethodapply_changes
( &mut self, changes: Vec<lsp_types::TextDocumentContentChangeEvent>, new_version: Doc
crates/ruff_server/src/edit/text_document.rs:84
↓ 5 callersMethodapply_optional_owner_specialization_to_member
Projects a member from its generic owner, applying the owner's specialization to both ordinary occurrences and the domain of any retained synthetic `S
crates/ty_python_semantic/src/types.rs:9777
↓ 5 callersMethodas_ann_assign_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:658
↓ 5 callersMethodas_bool
(self)
crates/ty_python_semantic/src/types/literal.rs:228
↓ 5 callersMethodas_class_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:436
↓ 5 callersMethodas_enum
(self)
crates/ty_python_semantic/src/types/literal.rs:212
↓ 5 callersMethodas_expression
Returns the [`Expr`] if this is a expression, or `None` if the reference is to another kind of AST node.
crates/ruff_python_semantic/src/nodes.rs:101
↓ 5 callersMethodas_full_str
(&self)
crates/ruff_source_file/src/newlines.rs:267
↓ 5 callersMethodas_i64
Return the [`Int`] as an i64, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:133
↓ 5 callersMethodas_literal_expr
Returns [`LiteralExpressionRef`] if the expression is a literal expression.
crates/ruff_python_ast/src/nodes.rs:89
↓ 5 callersMethodas_notebook
(&self)
crates/ruff_server/src/session/index.rs:522
↓ 5 callersMethodas_paramspec_typevar
If this type is a `ParamSpec` type variable, returns it. Otherwise, returns `None`.
crates/ty_python_semantic/src/types.rs:7009
↓ 5 callersMethodas_single_document
Attempt to access the single inner text document selected by the query. If this query is selecting an entire notebook document, this will return `None
crates/ruff_server/src/session/index.rs:650
↓ 5 callersMethodas_slice
(&self)
crates/ruff_python_ast/src/name.rs:743
↓ 5 callersMethodas_statement
Returns the [`Stmt`] if this is a statement, or `None` if the reference is to another kind of AST node.
crates/ruff_python_semantic/src/nodes.rs:92
↓ 5 callersMethodas_str
(&self)
crates/ruff_python_codegen/src/stylist.rs:159
↓ 5 callersMethodas_str
(self)
crates/ty_ide/src/docstring/markdown/structured.rs:134
↓ 5 callersMethodas_system_path
(&self)
crates/ruff_db/src/files/path.rs:33
↓ 5 callersMethodas_unary_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1755
↓ 5 callersMethodas_vendored_path
(&self)
crates/ty_module_resolver/src/path.rs:832
↓ 5 callersMethodas_writable
(&self)
crates/ty_test/src/db.rs:598
↓ 5 callersFunctionassert_bindings
(place: &PlaceState, expected: &[(u32, ScopedNarrowingConstraint)])
crates/ty_python_core/src/use_def/place_state.rs:800
↓ 5 callersFunctionassert_error_chain_eq
(error: ProjectMetadataError, message: &str)
crates/ty_project/src/metadata.rs:2156
↓ 5 callersFunctionassert_no_edits
(renames: &[(&str, &str)], sources: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:2450
↓ 5 callersMethodassignable_solutions_with_inferable
Calculates the [`CandidateSolutions`] that represent the valid solutions for when `self` is constraint-set assignable to `target`.
crates/ty_python_semantic/src/types/constraints.rs:3611
↓ 5 callersMethodassignment_holds
(&self, assignment: Assignment<AtomicConstraintId>)
crates/ty_python_semantic/src/types/constraints/paths.rs:567
↓ 5 callersMethodassociated_place_ids
(&self, place: ScopedPlaceId)
crates/ty_python_core/src/place.rs:371
↓ 5 callersMethodat_identifier_or_soft_keyword
Returns `true` if the parser is at an identifier or soft keyword token.
crates/ruff_python_parser/src/parser/expression.rs:126
↓ 5 callersMethodat_sequence_end
Returns `true` if the current token ends a sequence.
crates/ruff_python_parser/src/parser/expression.rs:141
↓ 5 callersFunctionattribute_write_requirement
Resolve the receiver-level requirements for writing `object_ty.attribute`. This expands aliases, preserves the all-arms rule for unions and the any-p
crates/ty_python_semantic/src/types/attribute_write.rs:344
↓ 5 callersFunctionautofix_with_notimplementederror
Add an autofix to `diagnostic` that replaces the given node with `NotImplementedError` iff `NotImplementedError` definitely has a builtin binding from
crates/ty_python_semantic/src/types/diagnostic.rs:3445
↓ 5 callersFunctionb
(arg: int)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/dummy_implementations.py:40
↓ 5 callersMethodbaseline
(&self)
crates/ty_project/src/metadata/settings.rs:45
↓ 5 callersFunctionbinary_choice
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, typevar: BoundTypeVarInstance<'db>,
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:65
↓ 5 callersFunctionbind_attribute_self_typevars
Bind an annotation using the selected lookup class and the original receiver. A constrained type variable has no single nominal class. The concrete l
crates/ty_python_semantic/src/types/attribute_write.rs:1006
↓ 5 callersMethodbind_self
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Type<'db>,
crates/ty_python_semantic/src/types/protocol_class.rs:1238
↓ 5 callersMethodbind_self
Binds a method receiver, specializing its signatures and removing incompatible overloads. `typing_self_type` is used to replace `typing.Self`, which
crates/ty_python_semantic/src/types/callable.rs:961
↓ 5 callersMethodbottom
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1710
↓ 5 callersMethodbuilder
Returns a builder for tersely constructing diagnostics.
crates/ruff_db/src/diagnostic/render.rs:2678
↓ 5 callersMethodbump
Moves the cursor to the next character, returning the previous character. Returns [`None`] if there is no next character.
crates/ruff_python_parser/src/lexer/cursor.rs:93
↓ 5 callersMethodbump_back
Consumes the next character from the back
crates/ruff_python_trivia/src/cursor.rs:99
↓ 5 callersFunctioncan_rename
Returns the range of the symbol if it can be renamed, None if not.
crates/ty_ide/src/rename.rs:10
↓ 5 callersMethodcanonical_module
Return the module in which we should look up the definition for this class
crates/ty_python_semantic/src/types/class/known.rs:1525
↓ 5 callersMethodcanonicalize
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:96
↓ 5 callersFunctioncatch
(db: &dyn Db, file: File, f: F)
crates/ty_project/src/lib.rs:1126
↓ 5 callersMethodcategory
(&self, in_stub: bool, module: &ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1136
↓ 5 callersMethodcategory
(&self, db: &dyn Db)
crates/ty_python_semantic/src/types/definition_resolution.rs:70
↓ 5 callersMethodcheck_class_pair
( &self, db: &'db dyn Db, source: ClassType<'db>, target: ClassType<'db>,
crates/ty_python_semantic/src/types/class.rs:2636
↓ 5 callersFunctioncheck_file_unwrap
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/lib.rs:229
↓ 5 callersMethodcheck_specialization_pair
( &self, db: &'db dyn Db, source: Specialization<'db>, target: Specialization<
crates/ty_python_semantic/src/types/generics.rs:1727
↓ 5 callersMethodchoose
(&self, preferred_quote: Quote)
crates/ruff_python_formatter/src/string/normalize.rs:336
↓ 5 callersMethodclass_literal_and_specialization
Returns the underlying class literal and specialization, if any. For a non-generic class, this returns the class literal directly. For a generic alia
crates/ty_python_semantic/src/types/class.rs:1258
↓ 5 callersMethodclear_env_vars
Clears the inherited environment and any previously set variables.
crates/ruff_db/src/system/test.rs:49
↓ 5 callersMethodclone
(&self)
crates/ruff_formatter/src/arguments.rs:10
↓ 5 callersMethodclose
De-registers a document, specified by its key. Calling this multiple times for the same document is a logic error. Returns `true` if the client needs
crates/ty_server/src/session.rs:2193
↓ 5 callersMethodcollect_hints
(&self, settings: &InlayHintSettings)
crates/ty_ide/src/inlay_hints.rs:1331
↓ 5 callersFunctioncombine_definite_truthiness
Combine results when the caller only needs definite truthiness. Any ambiguous or narrowing result, or any disagreement between definite results, make
crates/ty_python_semantic/src/types/equality.rs:1357
↓ 5 callersMethodconfig_file_override
Returns the explicit configuration file that replaces normal project discovery, if any.
crates/ty_project/src/metadata.rs:414
↓ 5 callersMethodcontains_definition
Returns `true` if this function includes `definition` as one of its overload signatures or implementation.
crates/ty_python_semantic/src/types/function.rs:1656
↓ 5 callersMethodcontains_member
Return whether `name` is an enum member, including aliases.
crates/ty_python_semantic/src/types/enums.rs:532
↓ 5 callersMethodcontext_result
Returns the diagnostics and semantic validity of this unpacking assignment.
crates/ty_python_semantic/src/types/unpacker.rs:402
↓ 5 callersMethodcount_lines
The number of lines `range` spans. ## Examples ``` # use ruff_text_size::{Ranged, TextRange}; # use ruff_source_file::LineRanges; assert_eq!("a\nb"
crates/ruff_source_file/src/line_ranges.rs:314
↓ 5 callersFunctioncreate_compacted_owned_set
(db: &TestDb)
crates/ty_python_semantic/src/types/constraints.rs:7283
↓ 5 callersFunctioncreate_typevar
(db: &'db TestDb, name: &'static str)
crates/ty_python_semantic/src/types/constraints/sequents.rs:2237
↓ 5 callersFunctioncreate_typevar
(db: &'db TestDb, name: &str)
crates/ty_python_semantic/src/types/constraints/resolution.rs:263
↓ 5 callersFunctioncreate_workspace_server_with_file
Helper functions for long-polling tests
crates/ty_server/tests/e2e/pull_diagnostics.rs:1564
↓ 5 callersMethodcurrent
(&self)
crates/ruff_python_parser/src/lexer/indentation.rs:125
↓ 5 callersMethoddecorators
Return the types of the decorators on this class
crates/ty_python_semantic/src/types/class/static_literal.rs:815
↓ 5 callersMethoddefault
(&self)
crates/ty_python_semantic/src/types/signatures.rs:6384
↓ 5 callersMethoddefinition
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2479
↓ 5 callersMethoddefinition
(&self)
crates/ty_python_semantic/src/types/definition_resolution.rs:83
↓ 5 callersMethoddefuse
Consume the underlying `Diagnostic` without emitting it. In general you should avoid constructing diagnostics that may not be emitted, but this metho
crates/ruff_linter/src/checkers/ast/mod.rs:3834
↓ 5 callersFunctiondelete_comment
Generate a [`Edit`] to delete a comment (for example: a `noqa` directive).
crates/ruff_linter/src/fix/edits.rs:67
↓ 5 callersFunctiondependency_workspace_case
()
crates/ty/tests/cli/uv_workspace.rs:148
↓ 5 callersFunctionderive_impl
(input: DeriveInput)
crates/ruff_macros/src/config.rs:12
↓ 5 callersFunctiondescriptor_setter_domain
Derive the values accepted by every possible descriptor setter when they fit in [`Type`].
crates/ty_python_semantic/src/types/attribute_write.rs:1326
↓ 5 callersMethoddifference
(db: &'db dyn Db, types: TypePair<'db>)
crates/ty_python_semantic/src/types/set_theoretic.rs:1200
↓ 5 callersMethoddiscard_disjoint_union_elements
If the type is a union, removes union elements that are disjoint from `target`. Returns [`DiscardDisjointUnionElementsResult::AllDisjoint`] if every
crates/ty_python_semantic/src/types.rs:3680
↓ 5 callersFunctiondiscovery_test
(source: &str)
crates/ty_ide/src/pytest_test_discovery.rs:317
↓ 5 callersMethoddisplay
Return a `std::fmt::Display` implementation that renders this diagnostic in the full, human-readable format. Note that this `Display` impl includes a
crates/ruff_db/src/diagnostic/mod.rs:215
↓ 5 callersMethoddisplay
(&self, source: &'src str)
crates/ruff_linter/src/rules/refurb/helpers.rs:165
↓ 5 callersMethoddo_bump
Moves the parser to the next token.
crates/ruff_python_parser/src/parser/mod.rs:358
↓ 5 callersFunctiondunder_all_names
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/dunder_all.rs:16
↓ 5 callersMethoddunder_class
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:9672
↓ 5 callersMethoddurability
(self, db: &dyn Db)
crates/ruff_db/src/files/file_root.rs:26
↓ 5 callersMethoddynamic_class_scope_offset
Identify a dangling dynamic-class call without retaining an absolute source position.
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:40
↓ 5 callersMethodeager_default_type
Returns a default type stored directly in the signature, without running inference. Deferred source defaults return `None`, even if their type is alre
crates/ty_python_semantic/src/types/signatures.rs:6402
↓ 5 callersMethodemit
(&mut self, text: &dyn Debug)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:217
↓ 5 callersFunctionempty_parenthesized
Format comments inside empty parentheses, brackets or curly braces. Empty `()`, `[]` and `{}` are special because there can be dangling comments, and
crates/ruff_python_formatter/src/expression/parentheses.rs:384
↓ 5 callersFunctionend_of_statement
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET503.py:299
↓ 5 callersMethodensure_overlay_identity_caches
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:1125
↓ 5 callersMethodentries
(&mut self, items: I)
crates/ty_python_semantic/src/types/display.rs:513
↓ 5 callersMethodevaluate_expression_node_predicate
( &mut self, expression_node: &ruff_python_ast::Expr, expression: Expression<'db>,
crates/ty_python_semantic/src/types/narrow.rs:1745
← previousnext →2,601–2,700 of 31,766, ranked by callers