Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
Method
from
(format_string: &CFormatString)
crates/ruff_linter/src/rules/pyflakes/cformat.rs:17
Method
from
(value: YieldOutsideFunctionKind)
crates/ruff_linter/src/rules/pyflakes/rules/yield_outside_function.rs:27
Method
from
(value: usize)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:252
Method
from
(cmp_op: &CmpOp)
crates/ruff_linter/src/rules/pyflakes/rules/invalid_literal_comparisons.rs:127
Method
from
( TypeVar { name, restriction, kind, default,
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/mod.rs:150
Method
from
(paths: [SystemPathBuf; N])
crates/ty_site_packages/src/lib.rs:254
Method
from
(array: [T; N])
crates/ruff_index/src/vec.rs:175
Method
from
(vec: IndexVec<I, T>)
crates/ruff_index/src/frozen.rs:60
Method
from_ambiguity_state
(state: &AmbiguityState)
crates/ty_python_semantic/src/types/display.rs:587
Method
from_analysis_settings
(settings: &AnalysisSettings)
crates/ty_python_semantic/src/types/equality.rs:420
Method
from_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
Method
from_annotation
(annotation: &'a Annotation, resolver: &'a dyn FileResolver)
crates/ruff_db/src/diagnostic/render/github.rs:163
Method
from_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
Method
from_arg_matches
(matches: &ArgMatches)
crates/ty/src/args.rs:354
Method
from_arguments
Return the constructor form for `arguments`.
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:49
Method
from_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
Method
from_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
Method
from_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
Method
from_assignment
(node: &ast::StmtAssign)
crates/ty_python_core/src/definition.rs:1769
Method
from_ast
Extracts the comments from the AST.
crates/ruff_python_formatter/src/comments/mod.rs:238
Method
from_ast
(arguments: &'a ast::Arguments)
crates/ty_python_semantic/src/types/infer/builder.rs:13351
Method
from_attribute
(level: &str)
crates/ruff_python_stdlib/src/logging.rs:13
Method
from_attribute
(attr: &str)
crates/ruff_linter/src/rules/flake8_logging_format/rules/logging_call.rs:229
Method
from_back
(start: usize, stop: usize, step: NonZeroUsize)
crates/ty_python_semantic/src/types/tuple.rs:1401
Method
from_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
Method
from_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
Method
from_binding
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, binding: &crate::types::call::Bindin
crates/ty_python_semantic/src/types/ide_support.rs:1003
Method
from_binding_id
(semantic: &'a SemanticModel<'b>, id: BindingId, scope: &'a Scope)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:791
Method
from_bindings
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, bindings: &Bindings<'db>, )
crates/ty_python_semantic/src/types/call.rs:28
Method
from_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
Method
from_bindings
( db: &'db dyn Db, bindings: BindingWithConstraintsIterator<'db, 'db>, )
crates/ty_python_semantic/src/place/definitions.rs:58
Method
from_bits
(bits: RankBitBoxVec)
crates/ty_python_core/src/rank.rs:53
Method
from_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
Method
from_body
Returns the [`Terminal`] behavior of the body, if it can be determined.
crates/ruff_python_semantic/src/analyze/terminal.rs:49
Method
from_bool
(value: bool)
crates/ty_python_semantic/src/types/equality.rs:94
Method
from_bool
(builder: &'c ConstraintSetBuilder<'db>, b: bool)
crates/ty_python_semantic/src/types/constraints.rs:435
Method
from_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
Method
from_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
Method
from_call
Recognize imported patch functions before falling back to fixture names.
crates/ruff_linter/src/rules/ruff/rules/shared_clock_mock.rs:79
Method
from_call_expr
( semantic: &'a SemanticModel, call: &'a ExprCall, func_name: &str, )
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:175
Method
from_callable
( db: &'db dyn Db, func: Type<'db>, program: Program<'db>, receiver: Type<'db>
crates/ty_python_semantic/src/types/method.rs:125
Method
from_char
(c: char)
crates/ruff_python_literal/src/format.rs:29
Method
from_chars
Parse an [`OpenMode`] from a sequence of characters.
crates/ruff_python_stdlib/src/open_mode.rs:25
Method
from_class
(db: &'db dyn Db, class: ClassType<'db>)
crates/ty_python_semantic/src/types.rs:1558
Method
from_class
(db: &dyn Db, class: ClassLiteral)
crates/ty_python_semantic/src/types/display.rs:2496
Method
from_class
(db: &'db dyn Db, class: ClassType<'db>)
crates/ty_python_semantic/src/types/instance.rs:227
Method
from_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
Method
from_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
Method
from_class
( db: &'db dyn Db, class: StaticClassLiteral<'db>, transformer_params: DataclassTransf
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:55
Method
from_class
(class: &StmtClassDef)
crates/ruff_linter/src/rules/pylint/rules/eq_without_hash.rs:102
Method
from_class_literal
(db: &'db dyn Db, class: ClassLiteral<'db>)
crates/ty_python_semantic/src/types/class.rs:3378
Method
from_clause
Creates an upper bound from one explicit evidence clause.
crates/ty_python_semantic/src/types/constraints.rs:1877
Method
from_cli
(cli: &FormatArguments)
crates/ruff/src/commands/format.rs:59
Method
from_cli_arguments
( global_options: GlobalConfigArgs, per_flag_overrides: ExplicitConfigOverrides, )
crates/ruff/src/args.rs:723
Method
from_client_capabilities
(client_capabilities: ResolvedClientCapabilities)
crates/ty_server/src/server/api/diagnostics.rs:611
Method
from_code
(source: &'a str)
crates/ruff_python_formatter/src/comments/mod.rs:564
Method
from_code
(code: &str)
crates/ruff_linter/src/registry.rs:17
Function
from_collections_abc
()
crates/ruff_linter/resources/test/fixtures/flake8_type_checking/TC001-3_future_strict.py:8
Method
from_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
Method
from_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
Method
from_comment
Attempt to transform a normal comment into a [`TodoComment`].
crates/ruff_linter/src/directives.rs:272
Method
from_comment_ranges
( source: &'s str, comment_ranges: impl Iterator<Item = TextRange>, file_index: &LineI
crates/mdtest/src/assertion.rs:92
Method
from_commented_ranges
( comment_ranges: &CommentRanges, path: &Path, locator: &'a Locator<'a>, )
crates/ruff_linter/src/noqa.rs:1220
Method
from_components
(components: impl IntoIterator<Item = &'a str>)
crates/ty_module_resolver/src/module_name.rs:250
Method
from_concrete_bound
(bound: impl ProvidesConcreteBound<'db>)
crates/ty_python_semantic/src/types/constraints/sequents.rs:520
Method
from_config_file
Loads an explicitly selected configuration file.
crates/ty_project/src/metadata.rs:98
Method
from_context
(context: &'a PyFormatContext<'src>)
crates/ruff_python_formatter/src/string/normalize.rs:24
Method
from_context
( context: ErrorContext<'db>, relation: impl Into<ErrorRelation>, )
crates/ty_python_semantic/src/types/relation_error.rs:944
Method
from_covering_node
Creates a `GotoTarget` from a `CoveringNode` and an offset within the node
crates/ty_ide/src/goto.rs:976
Method
from_dataclass_transformer
( db: &'db dyn Db, class: StaticClassLiteral<'db>, transformer_params: DataclassTransf
crates/ty_python_semantic/src/types/class.rs:254
Method
from_db
(workspace: &Workspace, annotation: &diagnostic::Annotation)
crates/ty_wasm/src/lib.rs:1041
Method
from_decorator_type
(db: &dyn Db, decorator_type: Type)
crates/ty_python_semantic/src/types/function.rs:181
Method
from_default
(expr: &'a Expr, semantic: &SemanticModel<'a>)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:304
Method
from_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
Method
from_definition
(definition: Option<Definition<'db>>)
crates/ty_python_semantic/src/place.rs:110
Method
from_definition
Creates an environment that lazily obtains its program from `definition`.
crates/ty_python_semantic/src/types/context.rs:51
Method
from_definition
Create a field by extracting the metadata from its definition.
crates/ty_python_semantic/src/types/dedicated/django.rs:44
Method
from_definitions
Summarizes resolved definitions, following assignments to establish environment provenance.
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:506
Method
from_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
Method
from_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
Method
from_depends_call
(arguments: &'a Arguments, semantic: &SemanticModel<'a>)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:310
Method
from_diagnostic
(diagnostic: &Diagnostic)
crates/ty_project/src/baseline.rs:395
Method
from_diagnostic
Resolve a single diagnostic.
crates/ruff_db/src/diagnostic/render.rs:172
Method
from_diagnostic
( diagnostic: &'a Diagnostic, stylesheet: &'a DiagnosticStylesheet, resolver: &'a dyn
crates/ruff_db/src/diagnostic/render/full.rs:101
Method
from_diagnostic
(code: &'a Diagnostic, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/sarif.rs:204
Method
from_diagnostic
( diagnostic: &'a Diagnostic, seen: &mut FxHashMap<DiagnosticFingerprint, &'a Diagnost
crates/ty_python_semantic/src/fixes.rs:2143
Method
from_diagnostics
Builds a baseline and returns the diagnostics it cannot record.
crates/ty_project/src/baseline.rs:257
Method
from_directive
(directive: &'a Directive, matches: &'a [Rule])
crates/ruff_linter/src/rules/ruff/rules/noqa_comments.rs:173
Method
from_disjuncts
( intersection_disjuncts: SmallVec<[Conjunctions<'db>; 1]>, replacement_disjuncts: SmallVec<[C
crates/ty_python_semantic/src/types/narrow.rs:1159
Method
from_docstring
Extract all `SectionContext` values from a docstring.
crates/ruff_linter/src/docstrings/sections.rs:156
Method
from_document
(document: &Document)
crates/ty_server/src/session.rs:1973
Method
from_dotted_name
(name: &'a str)
crates/ruff_python_ast/src/name.rs:315
Method
from_dynamic_class
(db: &'db dyn Db, class: DynamicClassLiteral<'db>)
crates/ty_python_semantic/src/types/class.rs:270
Method
from_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
Method
from_elements
(elements: impl IntoIterator<Item = T>)
crates/ty_python_semantic/src/types/tuple.rs:983
Method
from_elements
(callables: impl IntoIterator<Item = CallableType<'db>>)
crates/ty_python_semantic/src/types/callable.rs:1127
Method
from_elements_cycle_recovery
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, elements: I, )
crates/ty_python_semantic/src/types/set_theoretic.rs:273
Method
from_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
Method
from_entries
(mut entries: Vec<(ScopedPredicateId, ScopedPlaceId)>)
crates/ty_python_core/src/use_def.rs:657
Method
from_entries
Creates a frozen map from entries with unique keys.
crates/ty_python_core/src/frozen.rs:83
← previous
next →
21,001–21,100 of 31,766, ranked by callers