MCPcopy Create free account

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

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

Methodfrom_back
(start: usize, stop: usize, step: NonZeroUsize)
crates/ty_python_semantic/src/types/tuple.rs:1401
Methodfrom_base_classes
Creates a generic context from the legacy `TypeVar`s that appear in class's base class list.
crates/ty_python_semantic/src/types/generics.rs:687
Methodfrom_bin_op
Returns `Some` for binary expressions matching `date[:-1] + "-00"` or `date.strip("Z") + "+00"`
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:190
Methodfrom_binding
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, binding: &crate::types::call::Bindin
crates/ty_python_semantic/src/types/ide_support.rs:1003
Methodfrom_binding_id
(semantic: &'a SemanticModel<'b>, id: BindingId, scope: &'a Scope)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:791
Methodfrom_bindings
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, bindings: &Bindings<'db>, )
crates/ty_python_semantic/src/types/call.rs:28
Methodfrom_bindings
Follow only bindings retained at the read. Keep environment-dependent alternatives even when their predicates are false for the configured platform or
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:491
Methodfrom_bindings
( db: &'db dyn Db, bindings: BindingWithConstraintsIterator<'db, 'db>, )
crates/ty_python_semantic/src/place/definitions.rs:58
Methodfrom_bits
(bits: RankBitBoxVec)
crates/ty_python_core/src/rank.rs:53
Methodfrom_body
Extracts the set of global names from a given scope, or return `None` if the scope does not contain any `global` declarations.
crates/ruff_python_semantic/src/globals.rs:45
Methodfrom_body
Returns the [`Terminal`] behavior of the body, if it can be determined.
crates/ruff_python_semantic/src/analyze/terminal.rs:49
Methodfrom_bool
(value: bool)
crates/ty_python_semantic/src/types/equality.rs:94
Methodfrom_bool
(builder: &'c ConstraintSetBuilder<'db>, b: bool)
crates/ty_python_semantic/src/types/constraints.rs:439
Methodfrom_call
Returns `Some` if the call expression is a call to `str.replace` and matches `date.replace("Z", "+00:00")`
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:160
Methodfrom_call
Generate a suggestion to remove the empty string positional argument and the `sep` keyword argument, if it exists.
crates/ruff_linter/src/rules/refurb/rules/print_empty_string.rs:226
Methodfrom_call
Recognize imported patch functions before falling back to fixture names.
crates/ruff_linter/src/rules/ruff/rules/shared_clock_mock.rs:79
Methodfrom_call_expr
( semantic: &'a SemanticModel, call: &'a ExprCall, func_name: &str, )
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:175
Methodfrom_callable
( db: &'db dyn Db, func: Type<'db>, program: Program<'db>, receiver: Type<'db>
crates/ty_python_semantic/src/types/method.rs:125
Methodfrom_char
(c: char)
crates/ruff_python_literal/src/format.rs:29
Methodfrom_chars
Parse an [`OpenMode`] from a sequence of characters.
crates/ruff_python_stdlib/src/open_mode.rs:25
Methodfrom_class
(db: &'db dyn Db, class: ClassType<'db>)
crates/ty_python_semantic/src/types.rs:1559
Methodfrom_class
(db: &dyn Db, class: ClassLiteral)
crates/ty_python_semantic/src/types/display.rs:2496
Methodfrom_class
(db: &'db dyn Db, class: ClassType<'db>)
crates/ty_python_semantic/src/types/instance.rs:227
Methodfrom_class
Return the code-generation behavior for a class. This is invariant across generic specializations. Type arguments affect the types of synthesized mem
crates/ty_python_semantic/src/types/class.rs:186
Methodfrom_class
Iterate over the MRO of an arbitrary class. The MRO may be of any length.
crates/ty_python_semantic/src/types/class_base.rs:604
Methodfrom_class
( db: &'db dyn Db, class: StaticClassLiteral<'db>, transformer_params: DataclassTransf
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:53
Methodfrom_class
(class: &StmtClassDef)
crates/ruff_linter/src/rules/pylint/rules/eq_without_hash.rs:102
Methodfrom_class_literal
(db: &'db dyn Db, class: ClassLiteral<'db>)
crates/ty_python_semantic/src/types/class.rs:3337
Methodfrom_clause
Creates an upper bound from one explicit evidence clause.
crates/ty_python_semantic/src/types/constraints.rs:1948
Methodfrom_cli
(cli: &FormatArguments)
crates/ruff/src/commands/format.rs:59
Methodfrom_cli_arguments
( global_options: GlobalConfigArgs, per_flag_overrides: ExplicitConfigOverrides, )
crates/ruff/src/args.rs:723
Methodfrom_client_capabilities
(client_capabilities: ResolvedClientCapabilities)
crates/ty_server/src/server/api/diagnostics.rs:620
Methodfrom_code
(source: &'a str)
crates/ruff_python_formatter/src/comments/mod.rs:564
Methodfrom_code
(code: &str)
crates/ruff_linter/src/registry.rs:17
Functionfrom_collections_abc
()
crates/ruff_linter/resources/test/fixtures/flake8_type_checking/TC001-3_future_strict.py:8
Methodfrom_comment
Attempts to identify the `kind` of a `comment`. The comment string should be the full line with the comment on it.
crates/ruff_python_trivia/src/comments.rs:18
Methodfrom_comment
Returns `Some(_)` if the comment starts with `# error`, `# snapshot`, or `# revealed`, indicating that it is a assertion comment.
crates/mdtest/src/assertion.rs:258
Methodfrom_comment
Attempt to transform a normal comment into a [`TodoComment`].
crates/ruff_linter/src/directives.rs:272
Methodfrom_comment_ranges
( source: &'s str, comment_ranges: impl Iterator<Item = TextRange>, file_index: &LineI
crates/mdtest/src/assertion.rs:92
Methodfrom_commented_ranges
( comment_ranges: &CommentRanges, path: &Path, locator: &'a Locator<'a>, )
crates/ruff_linter/src/noqa.rs:1221
Methodfrom_components
(components: impl IntoIterator<Item = &'a str>)
crates/ty_module_resolver/src/module_name.rs:250
Methodfrom_concrete_bound
(bound: impl ProvidesConcreteBound<'db>)
crates/ty_python_semantic/src/types/constraints/sequents.rs:519
Methodfrom_config_file
Loads an explicitly selected configuration file.
crates/ty_project/src/metadata.rs:94
Methodfrom_context
(context: &'a PyFormatContext<'src>)
crates/ruff_python_formatter/src/string/normalize.rs:24
Methodfrom_context
( context: ErrorContext<'db>, relation: impl Into<ErrorRelation>, )
crates/ty_python_semantic/src/types/relation_error.rs:944
Methodfrom_covering_node
Creates a `GotoTarget` from a `CoveringNode` and an offset within the node
crates/ty_ide/src/goto.rs:976
Methodfrom_dataclass_transformer
( db: &'db dyn Db, class: StaticClassLiteral<'db>, transformer_params: DataclassTransf
crates/ty_python_semantic/src/types/class.rs:251
Methodfrom_db
(workspace: &Workspace, annotation: &diagnostic::Annotation)
crates/ty_wasm/src/lib.rs:1041
Methodfrom_decorator_type
(db: &dyn Db, decorator_type: Type)
crates/ty_python_semantic/src/types/function.rs:181
Methodfrom_default
(expr: &'a Expr, semantic: &SemanticModel<'a>)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:304
Methodfrom_definition
Build a [`CallHierarchyItem`] from a resolved definition, returning `None` for kinds that are not callable (variables, type aliases, parameters, ...).
crates/ty_ide/src/call_hierarchy.rs:89
Methodfrom_definition
(definition: Option<Definition<'db>>)
crates/ty_python_semantic/src/place.rs:125
Methodfrom_definition
Creates an environment that lazily obtains its program from `definition`.
crates/ty_python_semantic/src/types/context.rs:51
Methodfrom_definition
Create a field by extracting the metadata from its definition.
crates/ty_python_semantic/src/types/dedicated/django.rs:44
Methodfrom_definitions
Summarizes resolved definitions, following assignments to establish environment provenance.
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:506
Methodfrom_dependency_instance
Resolve a dependency that is a class instance (e.g. `Depends(Query())`). FastAPI calls the instance, so the parameters come from `__call__`.
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:361
Methodfrom_dependency_name
Resolve a dependency that is a name reference (e.g. `Depends(Query)`). For classes, FastAPI calls the class constructor, so the parameters come from
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:332
Methodfrom_depends_call
(arguments: &'a Arguments, semantic: &SemanticModel<'a>)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:310
Methodfrom_diagnostic
(diagnostic: &Diagnostic)
crates/ty_project/src/baseline.rs:395
Methodfrom_diagnostic
Resolve a single diagnostic.
crates/ruff_db/src/diagnostic/render.rs:143
Methodfrom_diagnostic
( diagnostic: &'a Diagnostic, stylesheet: &'a DiagnosticStylesheet, resolver: &'a dyn
crates/ruff_db/src/diagnostic/render/full.rs:101
Methodfrom_diagnostic
(code: &'a Diagnostic, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/sarif.rs:204
Methodfrom_diagnostic
( diagnostic: &'a Diagnostic, seen: &mut FxHashMap<DiagnosticFingerprint, &'a Diagnost
crates/ty_python_semantic/src/fixes.rs:2130
Methodfrom_diagnostics
Builds a baseline and returns the diagnostics it cannot record.
crates/ty_project/src/baseline.rs:257
Methodfrom_directive
(directive: &'a Directive, matches: &'a [Rule])
crates/ruff_linter/src/rules/ruff/rules/noqa_comments.rs:173
Methodfrom_disjuncts
( intersection_disjuncts: SmallVec<[Conjunctions<'db>; 1]>, replacement_disjuncts: SmallVec<[C
crates/ty_python_semantic/src/types/narrow.rs:1157
Methodfrom_docstring
Extract all `SectionContext` values from a docstring.
crates/ruff_linter/src/docstrings/sections.rs:156
Methodfrom_document
(document: &Document)
crates/ty_server/src/session.rs:1945
Methodfrom_dotted_name
(name: &'a str)
crates/ruff_python_ast/src/name.rs:315
Methodfrom_dynamic_class
(db: &'db dyn Db, class: DynamicClassLiteral<'db>)
crates/ty_python_semantic/src/types/class.rs:267
Methodfrom_elements
Create a union from a list of elements (which may be eagerly simplified into a different variant of [`Type`] altogether). For performance reasons, co
crates/ty_python_semantic/src/types/set_theoretic.rs:100
Methodfrom_elements
(elements: impl IntoIterator<Item = T>)
crates/ty_python_semantic/src/types/tuple.rs:983
Methodfrom_elements
(callables: impl IntoIterator<Item = CallableType<'db>>)
crates/ty_python_semantic/src/types/callable.rs:1129
Methodfrom_elements_cycle_recovery
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, elements: I, )
crates/ty_python_semantic/src/types/set_theoretic.rs:255
Methodfrom_elements_leave_aliases
Create a union from a list of elements without unpacking type aliases.
crates/ty_python_semantic/src/types/set_theoretic.rs:166
Methodfrom_entries
(mut entries: Vec<(ScopedPredicateId, ScopedPlaceId)>)
crates/ty_python_core/src/use_def.rs:657
Methodfrom_entries
Creates a frozen map from entries with unique keys.
crates/ty_python_core/src/frozen.rs:83
Methodfrom_entry
(entry: &Entry, map: &'a MultiMap<K, T>)
crates/ruff_python_formatter/src/comments/map.rs:317
Methodfrom_equivalence
( bound_typevar: BoundTypeVarInstance<'db>, ty: Type<'db>, inferable: TypeVarSet<'db>,
crates/ty_python_semantic/src/types/constraints.rs:3409
Methodfrom_error
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, class: ClassType<'db>, )
crates/ty_python_semantic/src/types/mro.rs:345
Methodfrom_executable_home_path
(path: &PythonHomePath)
crates/ty_site_packages/src/lib.rs:2076
Methodfrom_executable_home_path_real
Like `from_executable_home_path` but attempts to resolve through symlink facades to find a sys prefix that will actually contain the stdlib.
crates/ty_site_packages/src/lib.rs:2094
Methodfrom_exposure
Creates a reference target from a fixture exposure.
crates/ty_ide/src/references.rs:443
Methodfrom_expr
Convert an `Expr` to its [`UnqualifiedName`] (like `["typing", "List"]`).
crates/ruff_python_ast/src/name.rs:516
Methodfrom_expr
(expr: &Expr)
crates/ruff_python_ast/src/operator_precedence.rs:132
Methodfrom_expr
Classify a single expression node's side effect.
crates/ruff_python_ast/src/helpers.rs:74
Methodfrom_expr
(expr: &'a ast::Expr)
crates/ty_ide/src/call_hierarchy.rs:147
Methodfrom_expr
(expr: &'a Expr)
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:151
Methodfrom_expr
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/ruff/rules/never_union.rs:230
Methodfrom_expr
(expr: &Expr)
crates/ruff_linter/src/rules/pyupgrade/types.rs:15
Methodfrom_expr
Returns the [`DefaultedTypeAnnotation`], if the given expression is a type annotation that includes default type arguments.
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_default_type_args.rs:168
Methodfrom_expr_name
Create a new `PlaceExpr` from a name. This always returns a `PlaceExpr::Symbol` with empty flags and `name`.
crates/ty_python_core/src/place.rs:51
Methodfrom_expr_name
(func: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/ruff/rules/legacy_form_pytest_raises.rs:94
Methodfrom_expr_ref
(expr: ExprRef)
crates/ruff_python_ast/src/operator_precedence.rs:57
Methodfrom_expression
Returns either `Fluent` or `NonFluent` depending on a heuristic computed for the whole chain. Explicitly, the criterion to return `Fluent` is as foll
crates/ruff_python_formatter/src/expression/mod.rs:978
Methodfrom_expression
Extracts a direct or awaited call for checking whether an expression statement can return. Callers pass the value of an expression statement, such as
crates/ty_python_core/src/predicate.rs:144
Methodfrom_expression
(expr: &'a ast::Expr)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_non_annotated_dependency.rs:202
Methodfrom_extension
Otherwise sets the defaults. Returns none if the extension is unknown
crates/ruff_python_formatter/src/options.rs:108
Methodfrom_extension
(ext: &str)
crates/ruff_python_ast/src/lib.rs:51
Methodfrom_field
Create a `TypedDictField` from a [`Field`] with `FieldKind::TypedDict`.
crates/ty_python_semantic/src/types/typed_dict.rs:3275
← previousnext →20,901–21,000 of 31,562, ranked by callers