MCPcopy Create free account

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

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

↓ 5 callersMethodwith_paramspec_attr
Returns a new bound typevar instance with the given `ParamSpec` attribute set. This method will also set an appropriate upper bound on the typevar, b
crates/ty_python_semantic/src/types/typevar.rs:1159
↓ 5 callersMethodwith_show_fix_status
Whether to show a fix's availability or not.
crates/ruff_db/src/diagnostic/mod.rs:1544
↓ 5 callersMethodwith_transposed_type_var
Converts `type[T]` with a type variable `T` into a type variable whose bound or constraints describe the runtime classes of `T`'s possible inhabitants
crates/ty_python_semantic/src/types/subclass_of.rs:614
↓ 5 callersMethodwith_triple_quotes
(mut self, triple_quotes: TripleQuotes)
crates/ruff_python_ast/src/nodes.rs:1136
↓ 5 callersMethodwith_ty
(self, ty: Type<'db>)
crates/ty_python_semantic/src/types/protocol_class.rs:1371
↓ 5 callersFunctionx
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:575
↓ 4 callersMethodaccessor_role
Returns the [`PropertyAccessorRole`] that `def` plays in this property, or `None` when `def` is not one of this property's accessors. Each accessor s
crates/ty_python_semantic/src/types.rs:1808
↓ 4 callersMethodadd
Adds an include pattern to the filter.
crates/ty_project/src/glob/include.rs:195
↓ 4 callersMethodadd
Adds a new binding with the given name to this scope.
crates/ruff_python_semantic/src/scope.rs:78
↓ 4 callersMethodadd
Adds two numbers to the current value. Parameters ---------- number : int or float The first number to a
crates/ruff_linter/resources/test/fixtures/pydoclint/DOC102_numpy.py:203
↓ 4 callersMethodadd_file
( &mut self, path: impl AsRef<VendoredPath>, content: &str, )
crates/ruff_db/src/vendored.rs:485
↓ 4 callersMethodadd_import
Add an import statement to import the given module, with an explicit `lazy` keyword if requested. If there are no existing imports, the new import wi
crates/ruff_linter/src/importer/mod.rs:75
↓ 4 callersMethodadd_interior
Adds an interior node, ensuring that we always use the same reachability constraint ID for equal nodes.
crates/ty_python_core/src/reachability_constraints.rs:349
↓ 4 callersMethodadd_lower
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:3205
↓ 4 callersMethodadd_mutation
Register a mutation.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:250
↓ 4 callersMethodadd_single_implication
(&mut self, ante: AtomicConstraint<'db>, post: AtomicConstraint<'db>)
crates/ty_python_semantic/src/types/constraints/sequents.rs:366
↓ 4 callersMethodadd_start
Looks for the start of a code example. If one was found, then the given line is kept and added as part of the code example. Otherwise, the line is pus
crates/ruff_python_formatter/src/string/docstring.rs:757
↓ 4 callersMethodadd_type_mapping
Add a type mapping for a bound typevar using the given variance to determine how the inferred type constrains the typevar.
crates/ty_python_semantic/src/types/generics.rs:3551
↓ 4 callersMethodadd_upper
(&mut self, provenance: ConstraintProvenance, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:3217
↓ 4 callersMethodalias
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1239
↓ 4 callersMethodaliased_class
(self)
crates/ty_python_semantic/src/types/special_form.rs:1005
↓ 4 callersFunctionall_members
List all members of a given type: anything that would be valid when accessed as an attribute on an object of the given type.
crates/ty_python_semantic/src/types/list_members.rs:930
↓ 4 callersFunctionall_modules
List all available modules, including all sub-modules, sorted in lexicographic order.
crates/ty_module_resolver/src/list.rs:7
↓ 4 callersFunctionambiguous_variable_name
E741
crates/ruff_linter/src/rules/pycodestyle/rules/ambiguous_variable_name.rs:49
↓ 4 callersMethodanalyze_matched_subject_arms
( &mut self, subject_ty: Type<'db>, preservation: OriginalSubjectPreservation,
crates/ty_python_semantic/src/types/narrow.rs:3311
↓ 4 callersMethodanalyze_pattern_subject_arms
( &mut self, subject_ty: Type<'db>, preservation: OriginalSubjectPreservation,
crates/ty_python_semantic/src/types/narrow.rs:3343
↓ 4 callersFunctionany_base_class
Return `true` if any base class matches an [`Expr`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:32
↓ 4 callersFunctionany_over_body
(body: &[Stmt], mut func: F)
crates/ruff_python_ast/src/helpers.rs:773
↓ 4 callersFunctionapi
( endpoint: str, *, method: str = "GET", body: str | None = None, missing_ok: bool = False
scripts/publish_pr_report.py:70
↓ 4 callersMethodappend
(self, t: _T)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP049_0.py:5
↓ 4 callersMethodapply_type_mapping_impl
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: TypeContext
crates/ty_python_semantic/src/types.rs:1833
↓ 4 callersMethodarbitrary_key_mutation_type
Returns the type that a value must be assignable to when mutating an arbitrary string key. A mutation may target any declared or extra item, so no su
crates/ty_python_semantic/src/types/typed_dict.rs:468
↓ 4 callersMethodargument_relations
Yields the effective formal and actual types for each matched argument-parameter pair. Gradual variadic parameters do not contribute constraints. For
crates/ty_python_semantic/src/types/call/bind.rs:6131
↓ 4 callersMethodas_bin_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1718
↓ 4 callersMethodas_concrete
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:648
↓ 4 callersMethodas_equivalence_checker
(&self)
crates/ty_python_semantic/src/types/relation.rs:3341
↓ 4 callersMethodas_expr_ref
(self)
crates/ruff_python_ast/src/generated.rs:6136
↓ 4 callersMethodas_int_like_literal
(self)
crates/ty_python_semantic/src/types.rs:3335
↓ 4 callersMethodas_named_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1681
↓ 4 callersMethodas_notebook
Returns the underlying notebook if this is a notebook file.
crates/ruff_db/src/source.rs:99
↓ 4 callersMethodas_number_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2421
↓ 4 callersMethodas_parameter
(self)
crates/ruff_python_ast/src/nodes.rs:3264
↓ 4 callersMethodas_property_instance
Returns the specialized Python property represented by this type.
crates/ty_python_semantic/src/types.rs:3071
↓ 4 callersMethodas_single_part_fstring
Returns the single [`FString`] if the f-string isn't implicitly concatenated, [`None`] otherwise.
crates/ruff_python_ast/src/nodes.rs:536
↓ 4 callersMethodas_single_part_tstring
Returns the single [`TString`] if the t-string isn't implicitly concatenated, [`None`] otherwise.
crates/ruff_python_ast/src/nodes.rs:841
↓ 4 callersMethodas_str
Yields the underlying [`str`] slice.
crates/ruff_db/src/files/path.rs:72
↓ 4 callersMethodas_tuple
(&self)
crates/ruff_linter/src/settings/types.rs:84
↓ 4 callersMethodas_type_alias
(self)
crates/ty_python_semantic/src/types.rs:3085
↓ 4 callersMethodas_usize
(self)
crates/ruff_linter/src/line_width.rs:288
↓ 4 callersFunctionascii
(arg)
crates/ruff_linter/resources/test/fixtures/ruff/RUF010.py:27
↓ 4 callersFunctionassert_absolute_path
(pattern: &str, relative_to: impl AsRef<SystemPath>, expected: &str)
crates/ty_project/src/glob/portable.rs:393
↓ 4 callersFunctionassert_bound_string_symbol
(db: &'db TestDb, symbol: Place<'db>)
crates/ty_python_semantic/src/place.rs:2901
↓ 4 callersFunctionassert_no_edits
(renames: &[(&str, &str)], sources: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:1982
↓ 4 callersFunctionassert_noncomparable
(left: &str, right: &str)
crates/ruff_python_ast_integration_tests/tests/comparable.rs:25
↓ 4 callersMethodassign_argument
( &mut self, argument_index: usize, argument: Argument<'a>, argument_type: Opt
crates/ty_python_semantic/src/types/call/bind.rs:5151
↓ 4 callersFunctionassignment_targets_from_expr
( expr: &'a Expr, dummy_variable_rgx: &'a Regex, )
crates/ruff_linter/src/rules/pylint/rules/redefined_loop_name.rs:288
↓ 4 callersMethodatom
(self)
crates/ty_python_core/src/reachability_constraints.rs:75
↓ 4 callersMethodatomic_constraint_source_order
(&mut self, constraint: AtomicConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1560
↓ 4 callersFunctionbench_project
( criterion: &mut Criterion, project: RealWorldProject<'_>, variants: &[ProjectVariant], )
crates/ruff_benchmark/benches/ty.rs:2798
↓ 4 callersFunctionbenchmark
(bencher: Bencher, project: &Project, args: &[&str], cached: bool)
crates/ruff_benchmark/benches/ruff_walltime.rs:92
↓ 4 callersMethodbind
(self, db: &'db dyn Db, scope: ScopeId<'db>, place: ScopedPlaceId)
crates/ty_python_semantic/src/types.rs:12842
↓ 4 callersFunctionbind_attribute_self_typevars
Bind an annotation using the selected lookup class and the original receiver. A constrained type variable has no single nominal class. The concrete l
crates/ty_python_semantic/src/types/attribute_write.rs:871
↓ 4 callersFunctionbind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured/rst.rs:846
↓ 4 callersMethodbindings
Returns a [`Bindings`] that can be used to analyze a call to this type. You must call [`match_parameters`][Bindings::match_parameters] and [`check_typ
crates/ty_python_semantic/src/types.rs:7038
↓ 4 callersMethodbindings_at_definition
( &self, definition: Definition<'db>, )
crates/ty_python_core/src/use_def.rs:1305
↓ 4 callersMethodbindings_for_place
( &self, place: ScopedPlaceId, )
crates/ty_python_core/src/lib.rs:162
↓ 4 callersMethodbinds_typevar
( self, db: &'db dyn Db, typevar: TypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/generics.rs:1005
↓ 4 callersMethodboolean_test
Read an already-inferred expression's type and truthiness using the requested [`ExpressionContext`]. Return a [`BooleanTest`] instance. Use short-cir
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:927
↓ 4 callersMethodbottom
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1662
↓ 4 callersMethodboundness_analysis
(&self)
crates/ty_python_core/src/use_def.rs:1553
↓ 4 callersMethodbranch_range_until_first_newline
Return a [`TextRange`] spanning from `branch_start` up to the offset of the first newline character after the start of `first_statement`. The newline
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1129
↓ 4 callersMethodbuild
The filter matches if any of the globs matches. See <https://github.com/BurntSushi/ripgrep/discussions/2927> for the error returned.
crates/ty_project/src/glob/include.rs:278
↓ 4 callersMethodbuild
(self)
crates/ruff_python_ast/src/name.rs:506
↓ 4 callersFunctionc3_merge
Implementation of the [C3-merge algorithm] for calculating a Python class's [method resolution order]. [C3-merge algorithm]: https://docs.python.org/
crates/ty_python_semantic/src/types/mro.rs:871
↓ 4 callersFunctioncached_vendored_root
Get the absolute root path of all cached vendored paths. This does not ensure that this path exists (this is only used for mapping cached paths back
crates/ty_ide/src/lib.rs:381
↓ 4 callersMethodcallables
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/method.rs:272
↓ 4 callersMethodcell_offsets
The [`CellOffsets`] for the current file, if it's a Jupyter notebook.
crates/ruff_linter/src/checkers/ast/mod.rs:565
↓ 4 callersFunctioncharacter
Find the character called `name`, or `None` if no such character exists. This searches case-insensitively. # Example ```rust assert_eq!(unicode_nam
crates/ruff_unicode_names2/src/lib.rs:308
↓ 4 callersMethodcheck_call
Evaluate a call to this known class, emit any diagnostics that are necessary as a result of the call, and return the type that results from the call.
crates/ty_python_semantic/src/types/class/known.rs:2068
↓ 4 callersMethodcheck_callable_signature_pair
( &self, db: &'db dyn Db, source: &CallableSignature<'db>, target: &CallableSi
crates/ty_python_semantic/src/types/signatures.rs:2692
↓ 4 callersMethodcheck_deprecated
Check if the given ty is `@deprecated` or not
crates/ty_python_semantic/src/types/infer/builder.rs:10690
↓ 4 callersMethodcheck_identifier
(&mut self, identifier: &ast::Identifier, kind: OccurrenceKind)
crates/ty_ide/src/references.rs:752
↓ 4 callersFunctioncheck_project
(db: &ProjectDatabase, project_name: &str)
crates/ruff_benchmark/src/real_world_projects.rs:31
↓ 4 callersMethodcheck_settings
Check if the project's settings have any issues
crates/ty_project/src/lib.rs:850
↓ 4 callersMethodcheck_type_pair
( &mut self, value_ty: Type<'db>, target_ty: Type<'db>, emit_diagnostics: bool
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:493
↓ 4 callersMethodcheck_types
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Con
crates/ty_python_semantic/src/types/call/bind.rs:331
↓ 4 callersMethodclass_context_of_current_method
If the current scope is a method inside an enclosing class, return `Some(class)` where `class` represents the enclosing class. If the current scope i
crates/ty_python_semantic/src/types/infer/builder.rs:2134
↓ 4 callersMethodclass_member
Look up an attribute in the MRO of the meta-type of `self`. This returns class-level attributes when called on an instance-like type, and metaclass at
crates/ty_python_semantic/src/types.rs:4478
↓ 4 callersMethodclass_object_member
Look up attributes stored in the namespace of a class object. Besides attributes present in the class MRO, this includes attributes assigned to insta
crates/ty_python_semantic/src/types.rs:4662
↓ 4 callersFunctionclass_pattern_coverage_target
Return the class expression type for coverage analysis.
crates/ty_python_semantic/src/types/match_pattern.rs:90
↓ 4 callersMethodclient_name
(&self)
crates/ty_server/src/session.rs:1489
↓ 4 callersMethodclose_file
(&mut self, file_id: FileHandle)
crates/ty_wasm/src/lib.rs:243
↓ 4 callersMethodcmp
(&self, other: &Self)
crates/ruff_diagnostics/src/edit.rs:99
↓ 4 callersMethodcmp
(&self, other: &Self)
crates/ruff/src/args.rs:1280
↓ 4 callersMethodcode_action_request
Send a `textDocument/codeAction` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:863
↓ 4 callersMethodcollect_publish_diagnostic_notifications
( &mut self, count: usize, )
crates/ruff_server/tests/e2e/main.rs:502
↓ 4 callersFunctioncollect_while_loop_place_names
(code: &str)
crates/ty_python_core/src/builder/loop_bindings_visitor.rs:205
↓ 4 callersMethodcombine
(self, other: Self)
crates/ty_combine/src/lib.rs:82
↓ 4 callersMethodcombine
(self, config: Self)
crates/ruff_workspace/src/configuration.rs:653
↓ 4 callersMethodcombine
Logically combine two `TypingReference`s into one. `TypingReference::Runtime` has the highest precedence, followed by `TypingReference::Future`, `Typ
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:102
← previousnext →3,001–3,100 of 31,562, ranked by callers