MCPcopy Create free account

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

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

↓ 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:814
↓ 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:3379
↓ 3 callersMethodincludes_all
(&self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:148
↓ 3 callersMethodincrement
(self)
crates/ty_python_semantic/src/types/typevar.rs:904
↓ 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 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:11128
↓ 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:8597
↓ 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:3694
↓ 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:13012
↓ 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:291
↓ 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:10933
↓ 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:2243
↓ 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:745
↓ 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:1541
↓ 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:12068
↓ 3 callersMethodinfer_unary_expression
(&mut self, unary: &ast::ExprUnaryOp)
crates/ty_python_semantic/src/types/infer/builder.rs:11600
↓ 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:2166
↓ 3 callersMethodinferred_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:1300
↓ 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 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:749
↓ 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:3468
↓ 3 callersFunctioninsert_narrowing_constraint
( constraints: &mut NarrowingConstraints<'db>, place: ScopedPlaceId, constraint: NarrowingConstrai
crates/ty_python_semantic/src/types/narrow.rs:1408
↓ 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:558
↓ 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:1432
↓ 3 callersMethodintern_constraint
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, data: Constraint<
crates/ty_python_semantic/src/types/constraints.rs:1413
↓ 3 callersMethodintern_constraint_typevars
Interns all of the typevars mentioned in a constraint in a stable order.
crates/ty_python_semantic/src/types/constraints.rs:1381
↓ 3 callersMethodintern_source_order
(&mut self, data: SourceOrder)
crates/ty_python_semantic/src/types/constraints.rs:1523
↓ 3 callersFunctioninterpolation_fields
(node: &ast::InterpolatedElement)
crates/ruff_python_ast/src/comparable.rs:825
↓ 3 callersMethodinto_all_elements_with_kind
(self)
crates/ty_python_semantic/src/types/tuple.rs:1251
↓ 3 callersMethodinto_branches
(self)
crates/ty_python_core/src/builder.rs:229
↓ 3 callersMethodinto_diagnostic
Convert the violation into a [`Diagnostic`].
crates/ruff_linter/src/violation.rs:74
↓ 3 callersMethodinto_dynamic
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:564
↓ 3 callersMethodinto_fixed_length
(self)
crates/ty_python_semantic/src/types/tuple.rs:122
↓ 3 callersMethodinto_fragments
(self)
crates/ty_ide/src/docstring/document.rs:115
↓ 3 callersMethodinto_iter
(self)
crates/ruff_python_formatter/src/comments/map.rs:340
↓ 3 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:3238
↓ 3 callersMethodinto_path
The full path that this entry represents. Analogous to [`DirectoryEntry::path`], but moves ownership of the path.
crates/ruff_db/src/system/walk_directory.rs:178
↓ 3 callersMethodinto_place_and_conflicting_declarations
( self, )
crates/ty_python_semantic/src/place.rs:1054
↓ 3 callersMethodinto_protocol_class
Returns `Some` if this is a protocol class, `None` otherwise.
crates/ty_python_semantic/src/types/protocol_class.rs:43
↓ 3 callersMethodinto_type
(self)
crates/ty_python_semantic/src/types/union_type_instance.rs:100
↓ 3 callersMethodinvalid_assignment_to_final_attribute
( &self, object_ty: Type<'db>, target: &ast::ExprAttribute, attribute: &str,
crates/ty_python_semantic/src/types/infer/builder/final_attribute.rs:95
↓ 3 callersFunctioninvalid_script_metadata_diagnostic
( file: File, message: impl std::fmt::Display, range: Option<TextRange>, )
crates/ty_project/src/script.rs:394
↓ 3 callersMethodinvalidate_narrowing_aliases_for
Invalidate any narrowing aliases affected by a new definition of `place`.
crates/ty_python_core/src/builder.rs:1173
↓ 3 callersFunctionis_airflow_task
Returns `true` if the given function is decorated with `@airflow.decorators.task` (or `@airflow.sdk.task`), including variant forms like `@task.branch
crates/ruff_linter/src/rules/airflow/helpers.rs:313
↓ 3 callersMethodis_always_unbound
(&self)
crates/ty_python_core/src/use_def/place_state.rs:325
↓ 3 callersFunctionis_ambiguous_name
Returns `true` if the name should be considered "ambiguous".
crates/ruff_linter/src/rules/pycodestyle/helpers.rs:4
↓ 3 callersMethodis_available
Return `true` if `member` is an "available" symbol, i.e., a symbol that has not been bound in the current scope currently being visited, or in any con
crates/ruff_python_semantic/src/model.rs:463
↓ 3 callersMethodis_boolean_test_root
Return `true` if `expression` is an outermost "boolean test". A boolean test is an expression that Python tests for truthiness, such as an `if` condi
crates/ty_python_core/src/lib.rs:643
↓ 3 callersMethodis_bytes
(self)
crates/ty_python_semantic/src/types/literal.rs:249
↓ 3 callersFunctionis_cjk_unified_ideograph
(ch: char)
crates/ruff_unicode_names2/src/lib.rs:74
↓ 3 callersMethodis_class_literal
(&self)
crates/ty_python_semantic/src/types.rs:3211
↓ 3 callersFunctionis_class_var_annotation
Returns `true` if the given [`Expr`] is a `typing.ClassVar` annotation.
crates/ruff_linter/src/rules/ruff/helpers.rs:60
↓ 3 callersMethodis_classmethod_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:898
↓ 3 callersMethodis_code
(&self)
crates/ty_ide/src/docstring/markdown/general.rs:484
↓ 3 callersFunctionis_collection_literal
(expression: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:13140
↓ 3 callersMethodis_complete
Whether all keyword values were captured at the call site, rather than described by a type.
crates/ty_python_semantic/src/types/call/arguments.rs:360
↓ 3 callersMethodis_constraint_set_subtype_of
Return true if this type is a subtype of `target` for every specialization of the type variables in either type.
crates/ty_python_semantic/src/types/relation.rs:585
↓ 3 callersFunctionis_context_variable
Check if an expression is a valid Airflow context variable.
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1249
↓ 3 callersMethodis_continue_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1221
↓ 3 callersMethodis_cpython
(self)
crates/ty_site_packages/src/lib.rs:549
↓ 3 callersMethodis_declaration
True if this definition establishes a "declared type" for the place. If so, any assignments reached by this definition are in error if they assign a
crates/ty_python_core/src/definition.rs:908
↓ 3 callersMethodis_directory
(self)
crates/ruff_db/src/system.rs:338
↓ 3 callersFunctionis_document_excluded_for_linting
Return `true` if the document at the given [`Path`] should be excluded from linting.
crates/ruff_server/src/resolve.rs:10
↓ 3 callersFunctionis_dotted_identifier
Returns whether every component of `name` is a Python identifier. For example, this returns `true` for `"package.Type"` and `false` for `"package.1"`
crates/ty_ide/src/docstring/document/syntax.rs:37
↓ 3 callersFunctionis_dunder_all
Checks if the given expression is a name expression for `__all__`.
crates/ty_ide/src/symbols.rs:1632
↓ 3 callersMethodis_empty
(&self)
crates/ruff_python_ast/src/nodes.rs:274
↓ 3 callersFunctionis_empty_or_null_string
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:124
↓ 3 callersMethodis_enabled
(&self)
crates/ty_project/src/uv/environments.rs:493
↓ 3 callersMethodis_enabled
(self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:535
↓ 3 callersMethodis_eof
(&self)
crates/ruff_python_trivia/src/cursor.rs:88
↓ 3 callersMethodis_escaped
Returns whether a preceding odd-length backslash run escapes this run.
crates/ty_ide/src/docstring/document/syntax.rs:448
↓ 3 callersMethodis_evidence
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:74
↓ 3 callersMethodis_exact
(&self)
crates/ty_python_semantic/src/types.rs:2321
↓ 3 callersMethodis_expanded
(&self)
crates/ruff_formatter/src/format_element.rs:140
↓ 3 callersMethodis_explicit_export
Return `true` if this [`Binding`] represents an explicit re-export (e.g., `FastAPI` in `from fastapi import FastAPI as FastAPI`).
crates/ruff_python_semantic/src/binding.rs:59
↓ 3 callersMethodis_expr_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1110
↓ 3 callersFunctionis_fastapi_route
Returns `true` if the function is a FastAPI route.
crates/ruff_linter/src/rules/fastapi/rules/mod.rs:14
← previousnext →4,101–4,200 of 31,562, ranked by callers