MCPcopy Create free account

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

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

Methodfrom
(format_string: &CFormatString)
crates/ruff_linter/src/rules/pyflakes/cformat.rs:17
Methodfrom
(value: YieldOutsideFunctionKind)
crates/ruff_linter/src/rules/pyflakes/rules/yield_outside_function.rs:27
Methodfrom
(value: usize)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:252
Methodfrom
(cmp_op: &CmpOp)
crates/ruff_linter/src/rules/pyflakes/rules/invalid_literal_comparisons.rs:127
Methodfrom
( TypeVar { name, restriction, kind, default,
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/mod.rs:150
Methodfrom
(paths: [SystemPathBuf; N])
crates/ty_site_packages/src/lib.rs:254
Methodfrom
(array: [T; N])
crates/ruff_index/src/vec.rs:175
Methodfrom
(vec: IndexVec<I, T>)
crates/ruff_index/src/frozen.rs:60
Methodfrom_ambiguity_state
(state: &AmbiguityState)
crates/ty_python_semantic/src/types/display.rs:587
Methodfrom_analysis_settings
(settings: &AnalysisSettings)
crates/ty_python_semantic/src/types/equality.rs:420
Methodfrom_ancestors
Creates a new `CoveringNode` from a list of ancestor nodes. The ancestors should be ordered from root to the covering node.
crates/ruff_python_ast/src/find_node.rs:67
Methodfrom_annotation
(annotation: &'a Annotation, resolver: &'a dyn FileResolver)
crates/ruff_db/src/diagnostic/render/github.rs:163
Methodfrom_annotation
Create a parameter list, normalizing it and inferring its kind from annotations. The kind of the parameter list is determined based on the provided p
crates/ty_python_semantic/src/types/signatures.rs:4958
Methodfrom_arg_matches
(matches: &ArgMatches)
crates/ty/src/args.rs:354
Methodfrom_arguments
Return the constructor form for `arguments`.
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:49
Methodfrom_arguments
Create `CallArguments` from AST arguments. We will use the provided callback to obtain the type of each splatted argument, so that we can determine it
crates/ty_python_semantic/src/types/call/arguments.rs:528
Methodfrom_arguments_typed
Like [`Self::from_arguments`] but fills as much typing info in as possible. This currently only exists for the LSP usecase, and shouldn't be used in
crates/ty_python_semantic/src/types/call/arguments.rs:564
Methodfrom_arguments_unchecked
Creates a new best fitting IR with the given variants. Callers are required to ensure that the number of variants given is at least 2. You're lookin
crates/ruff_formatter/src/builders.rs:2593
Methodfrom_assignment
(node: &ast::StmtAssign)
crates/ty_python_core/src/definition.rs:1769
Methodfrom_ast
Extracts the comments from the AST.
crates/ruff_python_formatter/src/comments/mod.rs:238
Methodfrom_ast
(arguments: &'a ast::Arguments)
crates/ty_python_semantic/src/types/infer/builder.rs:13351
Methodfrom_attribute
(level: &str)
crates/ruff_python_stdlib/src/logging.rs:13
Methodfrom_attribute
(attr: &str)
crates/ruff_linter/src/rules/flake8_logging_format/rules/logging_call.rs:229
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:664
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:183
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:435
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:153
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:1558
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:189
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:55
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:3378
Methodfrom_clause
Creates an upper bound from one explicit evidence clause.
crates/ty_python_semantic/src/types/constraints.rs:1877
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:611
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:1220
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:520
Methodfrom_config_file
Loads an explicitly selected configuration file.
crates/ty_project/src/metadata.rs:98
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:254
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:110
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:172
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:2143
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:1159
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:1973
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:270
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:1127
Methodfrom_elements_cycle_recovery
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, elements: I, )
crates/ty_python_semantic/src/types/set_theoretic.rs:273
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:184
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
← previousnext →21,001–21,100 of 31,766, ranked by callers