MCPcopy Create free account

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

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

↓ 3 callersFunctiongenerate_suppression_edits
( path: &Path, diagnostics: &[Diagnostic], locator: &Locator, comment_ranges: &CommentRanges,
crates/ruff_linter/src/noqa.rs:35
↓ 3 callersMethodgenerator_return_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:9032
↓ 3 callersMethodgeneric_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/cyclic.rs:307
↓ 3 callersMethodgetOrCreateVendoredFileHandle
(vendoredPath: string)
playground/ty/src/Editor/Editor.tsx:511
↓ 3 callersMethodgetVendoredPath
(uri: Uri)
playground/ty/src/Editor/Editor.tsx:222
↓ 3 callersFunctionget_bound_typevar_instance
( db: &'db TestDb, type_alias: PEP695TypeAliasType<'db>, )
crates/ty_python_semantic/src/types/tests.rs:891
↓ 3 callersMethodget_secret_value
(self)
crates/ruff_benchmark/resources/pydantic/types.py:420
↓ 3 callersMethodglobal
Return the [`TextRange`] at which a name is declared as global in the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1806
↓ 3 callersMethodglobal_definition
(&'db self, path: &str, name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4369
↓ 3 callersMethodglobal_scope_mut
Returns a mutable reference to the global [`Scope`].
crates/ruff_python_semantic/src/model.rs:1564
↓ 3 callersFunctiongood_docstring
(quote: Quote)
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:193
↓ 3 callersFunctiongoto_declaration
Navigate to the declaration of a symbol. A "declaration" includes both formal declarations (class statements, def statements, and variable annotation
crates/ty_ide/src/goto_declaration.rs:14
↓ 3 callersMethodgoto_declaration
(&self)
crates/ty_ide/src/goto_declaration.rs:2767
↓ 3 callersFunctiongoto_definition
Navigate to the definition of a symbol. A "definition" is the actual implementation of a symbol, potentially in a source file rather than a stub file
crates/ty_ide/src/goto_definition.rs:15
↓ 3 callersFunctiongoto_implementation
Returns the known implementations for the supported target at `offset`. Returns `None` when the cursor is not on a supported target or no implementat
crates/ty_ide/src/goto_implementation.rs:74
↓ 3 callersFunctiongoto_type_definition
( db: &dyn Db, file: ProgramFile<'_>, offset: TextSize, )
crates/ty_ide/src/goto_type_definition.rs:9
↓ 3 callersFunctiongroupby
(data, key=None)
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:259
↓ 3 callersFunctionhas_any_external_visible_definitions
Determines whether the resolved definitions can have references outside their file.
crates/ty_ide/src/references.rs:339
↓ 3 callersMethodhas_cell_boundary
Returns `true` if the given range contains a cell boundary. A range starting at the cell boundary isn't considered to contain the cell boundary as it
crates/ruff_notebook/src/cell.rs:315
↓ 3 callersMethodhas_data_descriptor_method
Looks for a concrete `__set__` or `__delete__` method. A type such as `type[Any]` can hold a data descriptor without declaring either method.
crates/ty_python_semantic/src/types.rs:5578
↓ 3 callersMethodhas_directive_set
(&self, directive: MdtestDirective)
crates/mdtest/src/parser.rs:1097
↓ 3 callersMethodhas_dynamic
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:3065
↓ 3 callersMethodhas_errors_affecting_overload_resolution
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:9854
↓ 3 callersMethodhas_evidence_without_validity
(&self, source: EvidenceSource)
crates/ty_python_semantic/src/types/constraints.rs:1916
↓ 3 callersMethodhas_incompatible_class_variable_declaration
Returns whether an instance declaration conflicts with a required writable class variable. An unannotated assignment preserves an inherited `ClassVar
crates/ty_python_semantic/src/types/protocol_class.rs:2153
↓ 3 callersMethodhas_instance_slot
Returns whether this class or any base defines a slot with the given name.
crates/ty_python_semantic/src/types/class/slots.rs:521
↓ 3 callersMethodhas_invalid_syntax
Returns `true` if the parsed source code is invalid i.e., it has [`ParseError`]s. Note that this does not include version-related [`UnsupportedSyntax
crates/ruff_linter/src/linter.rs:53
↓ 3 callersMethodhas_ordering_method_in_mro
Returns `true` if any class in this class's MRO (excluding `object`) defines an ordering method (`__lt__`, `__le__`, `__gt__`, `__ge__`). Used by `@to
crates/ty_python_semantic/src/types/class/static_literal.rs:316
↓ 3 callersFunctionhas_own_parentheses
Returns the [`OwnParentheses`] value for a given [`Expr`], to indicate whether it has its own parentheses, and whether those parentheses are empty. A
crates/ruff_python_formatter/src/expression/mod.rs:1187
↓ 3 callersFunctionhas_slots
Return `true` if the given body contains a `__slots__` assignment.
crates/ruff_linter/src/rules/flake8_slots/helpers.rs:4
↓ 3 callersFunctionhas_target_own_parentheses
Returns `true` for targets that have their own set of parentheses when they split, in which case we want to avoid parenthesizing the assigned value.
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1331
↓ 3 callersMethodhash
(&self, state: &mut H)
crates/ty_site_packages/src/lib.rs:87
↓ 3 callersFunctionhash_single
Helper function to hash a single value and return the hash.
crates/ty_python_core/src/member.rs:1030
↓ 3 callersMethodhighlight_range
Get semantic tokens for a specific range in the file
crates/ty_ide/src/semantic_tokens.rs:5045
↓ 3 callersMethodhyperlinks
Configures hyperlink rendering for colored diagnostic output.
crates/ruff_db/src/diagnostic/mod.rs:1455
↓ 3 callersMethodid
(&self)
crates/ruff_formatter/src/format_element/tag.rs:255
↓ 3 callersMethodif_ambiguous
(self)
crates/ty_python_core/src/reachability_constraints.rs:83
↓ 3 callersFunctionif_elif_branches
(stmt_if: &StmtIf)
crates/ruff_python_ast/src/stmt_if.rs:36
↓ 3 callersMethodif_false
(self)
crates/ty_python_core/src/reachability_constraints.rs:87
↓ 3 callersMethodif_true
(self)
crates/ty_python_core/src/reachability_constraints.rs:79
↓ 3 callersFunctionimplicit_builtins_symbol_scope
Returns the module scope that supplies `symbol` through implicit builtin fallback. Uses the same visibility rules as [`implicit_builtins_symbol`] so
crates/ty_python_semantic/src/place.rs:652
↓ 3 callersMethodimport
Builds a best-effort import action for this module, usually for an IDE completion. This method always returns an action, even when it cannot avoid ev
crates/ty_python_semantic/src/importer.rs:133
↓ 3 callersMethodimport_for_diagnostic
Builds an import action for a diagnostic fix, returning `None` if its name cannot be used confidently at the proposed use site. [`Self::import`] uses
crates/ty_python_semantic/src/importer.rs:323
↓ 3 callersMethodimported_final_candidates_iterator
( &'map self, declarations: &'map [LiveDeclaration], )
crates/ty_python_core/src/use_def.rs:1493
↓ 3 callersMethodimporting_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:12635
↓ 3 callersMethodimports
(&self)
crates/ty_python_semantic/src/importer.rs:493
↓ 3 callersFunctionin_airflow_task_function
Returns `true` if the current statement hierarchy has a function that's decorated with `@airflow.decorators.task` or `@airflow.sdk.task`.
crates/ruff_linter/src/rules/airflow/helpers.rs:303
↓ 3 callersMethodin_deferred_type_definition
Return `true` if the model is visiting any kind of type definition that was previously deferred when initially traversing the AST
crates/ruff_python_semantic/src/model.rs:2182
↓ 3 callersFunctionin_dunder_method
( dunder_name: &str, semantic: &SemanticModel, settings: &LinterSettings, )
crates/ruff_linter/src/rules/pylint/helpers.rs:29
↓ 3 callersMethodin_function_scope
(&self)
crates/ruff_python_parser/tests/fixtures.rs:692
↓ 3 callersMethodin_multi_statement_line
Return `true` if a [`Stmt`] appears to be part of a multi-statement line.
crates/ruff_python_index/src/indexer.rs:224
↓ 3 callersMethodin_notebook
(&self)
crates/ruff_python_parser/tests/fixtures.rs:696
↓ 3 callersMethodin_type_expression
Interpret this special form as an unparameterized type in a type-expression context. This is called for the "misc" special forms that are not aliases
crates/ty_python_semantic/src/types/special_form.rs:813
↓ 3 callersMethodin_type_params
(self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:515
↓ 3 callersMethodinc
(&mut self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:122
↓ 3 callersMethodincludes
(self, provenance: ConstraintProvenance)
crates/ty_python_semantic/src/types/constraints.rs:3340
↓ 3 callersMethodincludes_all
(&self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:148
↓ 3 callersMethodincoming_mut
(&mut self)
crates/ty_server/src/session/request_queue.rs:38
↓ 3 callersMethodincrement
(self)
crates/ty_python_semantic/src/types/typevar.rs:909
↓ 3 callersMethodincrement_usage_count
Increment the usage count for the group name by the given value. If we're in one of the branches of a mutually exclusive statement, then increment the
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:100
↓ 3 callersMethodincremented
(self)
crates/ruff_python_formatter/src/comments/map.rs:562
↓ 3 callersFunctionindent
D206, D207, D208
crates/ruff_linter/src/rules/pydocstyle/rules/indent.rs:185
↓ 3 callersMethodindent_level
(&self)
crates/ruff_python_formatter/src/context.rs:73
↓ 3 callersMethodindent_style
(&self)
crates/ruff_python_formatter/src/options.rs:236
↓ 3 callersFunctionindentation
(line: &str)
crates/ty_ide/src/docstring/document/preformatted.rs:308
↓ 3 callersMethodindex_for_path
(&self, path: &NormalizedVendoredPath)
crates/ruff_db/src/vendored.rs:371
↓ 3 callersFunctionindex_values
( entries: impl IntoIterator<Item = (K, V)>, )
crates/ty_python_core/src/frozen.rs:168
↓ 3 callersMethodindices
( &self, )
crates/ruff_index/src/slice.rs:75
↓ 3 callersMethodinfer_attribute_load
Infer an attribute load, returning its recovery type if lookup fails.
crates/ty_python_semantic/src/types/infer/builder.rs:11275
↓ 3 callersMethodinfer_binary_expression_type
Infer the result type and collect deprecated methods for the enclosing operation. The caller reports them together after expanding union operands and
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:451
↓ 3 callersFunctioninfer_binary_type_comparison_inner
( context: &InferContext<'db, '_>, left: Type<'db>, op: NonIdentityOperator, right: Type<'db>,
crates/ty_python_semantic/src/types/infer/comparisons.rs:840
↓ 3 callersMethodinfer_comprehension_specialization
Return specialization(s) of the collection class (list, dict, set) based on the type context and the inferred element / key-value types from the compr
crates/ty_python_semantic/src/types/infer/builder.rs:8731
↓ 3 callersMethodinfer_explicit_type_alias_specialization
Infer the type of an explicitly specialized generic legacy type alias.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1973
↓ 3 callersMethodinfer_from_constraint_set
Records a relation and projects its solutions into the legacy type mapping. Contextual preference checks, variadic inference, and recursive-specializ
crates/ty_python_semantic/src/types/generics.rs:3715
↓ 3 callersMethodinfer_loud
Infer the expression with diagnostics enabled. This method must be called exactly once in the lifetime of the [`MultiInferenceGuard`].
crates/ty_python_semantic/src/types/infer/builder.rs:13161
↓ 3 callersMethodinfer_name_or_attribute_type_expression
( &mut self, ty: Type<'db>, definition: Option<Definition<'db>>, annotation: &
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:290
↓ 3 callersMethodinfer_place_load
Infer the type of the value read from a place expression. This also returns the [`ConstraintKey`]s used by expression-level narrowing.
crates/ty_python_semantic/src/types/infer/builder.rs:11080
↓ 3 callersMethodinfer_scope_body
Infer the body of a module, class, or function scope. As a memory optimization, store `LiteralString` for a leading docstring instead of interning it
crates/ty_python_semantic/src/types/infer/builder.rs:2263
↓ 3 callersFunctioninfer_statement_types
Infer all types for a [`Statement`]. This is useful when you want to infer a sub-expression with its natural type context, as statements are the mini
crates/ty_python_semantic/src/types/infer.rs:744
↓ 3 callersMethodinfer_subscript_expression_types
Infer a subscription and report failures while preserving their recovery types.
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:1535
↓ 3 callersMethodinfer_tuple_type_expression
Return the type represented by a `tuple[]` expression in a type annotation. This method assumes that a type has already been inferred and stored for
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1618
↓ 3 callersMethodinfer_type_parameters
(&mut self, type_parameters: &ast::TypeParams)
crates/ty_python_semantic/src/types/infer/builder.rs:12215
↓ 3 callersMethodinfer_unary_expression
(&mut self, unary: &ast::ExprUnaryOp)
crates/ty_python_semantic/src/types/infer/builder.rs:11747
↓ 3 callersFunctioninfer_unpacked_keyword_types
Infers each unpacked `**kwargs` constructor argument exactly once. Mixed positional-and-keyword `TypedDict` construction needs to inspect unpacked ke
crates/ty_python_semantic/src/types/typed_dict.rs:2170
↓ 3 callersMethodinferred_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:1299
↓ 3 callersFunctioninherited_member_candidates
( db: &'db dyn Db, class: StaticClassLiteral<'db>, )
crates/ty_python_semantic/src/types/overrides.rs:545
↓ 3 callersFunctioninlay_hints
( db: &dyn Db, file: ProgramFile<'_>, range: TextRange, settings: &InlayHintSettings, )
crates/ty_ide/src/inlay_hints.rs:363
↓ 3 callersMethodinlay_hints_request
Sends a `textDocument/inlayHint` request for the document at the given path and range.
crates/ty_server/tests/e2e/main.rs:1110
↓ 3 callersFunctioninline_script_options
Returns the script's inline `[tool.ty]` options unless `--config-file` takes precedence. Callers can read these unmerged options before indexing the
crates/ty_project/src/script.rs:237
↓ 3 callersMethodinner_mut
(&mut self)
crates/ty_project/src/files.rs:273
↓ 3 callersMethodinnermost_try
Finds the nearest enclosing `try`, skipping context managers.
crates/ty_python_core/src/builder/except_handlers.rs:330
↓ 3 callersMethodinput
(&self, file: File)
crates/ruff_db/src/diagnostic/render.rs:778
↓ 3 callersMethodinsert
Insert a file path into the module imports.
crates/ruff_graph/src/lib.rs:67
↓ 3 callersMethodinsert_hash_map_type_mapping
( &mut self, bound_typevar: BoundTypeVarInstance<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/generics.rs:3489
↓ 3 callersFunctioninsert_narrowing_constraint
( constraints: &mut NarrowingConstraints<'db>, place: ScopedPlaceId, constraint: NarrowingConstrai
crates/ty_python_semantic/src/types/narrow.rs:1410
↓ 3 callersMethodinspect
Gives access to the memoized content. Performs the formatting if the content hasn't been formatted at this point. # Example Inspect if some memoize
crates/ruff_formatter/src/format_extensions.rs:142
↓ 3 callersFunctioninstalled_package_event
( server: &mut TestServer, site_packages: &Uri, package: &str, )
crates/ty_server/tests/e2e/goto_definition.rs:617
↓ 3 callersMethodinstance_member
Look up an instance member by name (including superclasses).
crates/ty_python_semantic/src/types/class/named_tuple.rs:310
↓ 3 callersMethodintern
Returns an inline name directly, or a shared clone of a heap-allocated name.
crates/ruff_python_parser/src/parser/mod.rs:49
↓ 3 callersMethodintern_atomic_constraint
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, data: AtomicConst
crates/ty_python_semantic/src/types/constraints.rs:1361
← previousnext →4,101–4,200 of 31,766, ranked by callers