MCPcopy Create free account

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

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

↓ 1 callersFunctionmay_be_tuple
Return whether the outer type may be a tuple, without searching nested arguments or members. A recursion cutoff conservatively counts as a possible tu
crates/ty_python_semantic/src/types/tuple/promotion.rs:19
↓ 1 callersMethodmay_contain_configuration
(&self, directory: &SystemPath, project_root: &SystemPath)
crates/ty_project/src/db/changes.rs:499
↓ 1 callersFunctionmay_contain_signature_typevar
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, signature: &Signature<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/attribute_write.rs:1340
↓ 1 callersFunctionmay_contain_typevar_from
Whether a type may depend on variables from a generic context, including in lazy attributes. Recursive definitions can keep changing their specializa
crates/ty_python_semantic/src/types/visitor.rs:689
↓ 1 callersMethodmay_explain_relation_to
A `false` result guarantees that an eager comparison of these callables would produce an empty error context. The checker suppresses notes while tryi
crates/ty_python_semantic/src/types/signatures.rs:624
↓ 1 callersMethodmay_not
Emit a diagnostic that is uncertain that `iterable_type` is not iterable. `because` should explain why `iterable_type` is likely not iterable.
crates/ty_python_semantic/src/types/iteration.rs:831
↓ 1 callersMethodmay_overlap
(&self, other: &Self)
crates/ty_python_semantic/src/types/equality/enums.rs:1022
↓ 1 callersMethodmay_prefer_declared_type
Returns `true` if this type may contain preferred type mappings when provided as type context during generic call inference. This is the case for any
crates/ty_python_semantic/src/types.rs:2935
↓ 1 callersMethodmay_produce_abstract_method
(&self)
crates/ty_python_semantic/src/types/infer.rs:401
↓ 1 callersMethodmay_share_identity
(&self, db: &'db dyn Db, other: &Self)
crates/ty_python_semantic/src/types/cyclic.rs:819
↓ 1 callersMethodmaybe_apply_argument_index_offset
(mut self, offset: Option<usize>)
crates/ty_python_semantic/src/types/call/bind.rs:10308
↓ 1 callersFunctionmaybe_calling_io_operation
(attr: &str)
crates/ruff_linter/src/rules/flake8_async/rules/blocking_path_methods.rs:207
↓ 1 callersFunctionmaybe_parenthesize_value
Like [`maybe_parenthesize_expression`] but with special handling for lambdas.
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1353
↓ 1 callersMethodmaybe_remap_argument_indices
Remaps any argument index in this error when a remapping table is available. This is used when propagating errors from a synthetic sub-call back to t
crates/ty_python_semantic/src/types/call/bind.rs:10320
↓ 1 callersMethodmaybe_store_exception
Store `exception` if its qualified name does not correspond to one of the exempt types.
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:946
↓ 1 callersFunctionmeasure
Returns the width of a given string, accounting for the tab size.
crates/ruff_linter/src/rules/pycodestyle/overlong.rs:166
↓ 1 callersFunctionmember_has_unknown_value
Whether the value is a bare ellipsis literal (`A = ...`) or a casted one (`A = cast(SomeType, ...)`).
crates/ruff_linter/src/rules/flake8_pie/rules/non_unique_enums.rs:115
↓ 1 callersFunctionmember_implementation_definition
Normalize a member definition to the implementation target that should be navigated to.
crates/ty_python_semantic/src/types/ide_support.rs:684
↓ 1 callersFunctionmember_implementations_for_file
Finds member implementations contributed by subclasses of `roots` defined in `file`.
crates/ty_python_semantic/src/types/ide_support.rs:503
↓ 1 callersMethodmember_is_property
(self, db: &'db dyn Db, name: &str)
crates/ty_python_semantic/src/types/protocol_class.rs:684
↓ 1 callersFunctionmember_lookup_for_enum_complement
Perform full member lookup for an enum complement while preserving the caller's policy. This mirrors `instance_member_for_enum_complement`, but route
crates/ty_python_semantic/src/types/enums.rs:436
↓ 1 callersFunctionmember_pattern_is_exhaustive
Return whether `name` is definitely bound and `pattern` consumes its entire static member type.
crates/ty_python_semantic/src/types/match_pattern.rs:572
↓ 1 callersMethodmember_type
Return the type of a member attribute for all enum literals remaining in this complement. This handles `.name`, `.value`, `._name_`, and `._value_` b
crates/ty_python_semantic/src/types/enums.rs:857
↓ 1 callersMethodmember_value_may_be_transformed
Returns whether the declared value cannot be used as the precise type of `.value`. Standard-library data types are trusted because their value normal
crates/ty_python_semantic/src/types/enums.rs:148
↓ 1 callersFunctionmembers_filter
(tarfile)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S202.py:48
↓ 1 callersFunctionmerge
()
crates/ty_python_core/src/use_def/place_state.rs:920
↓ 1 callersFunctionmerge
This merges symbols within a package hierarchy, preferring symbols in the top-most module for a particular package. The implementation works by ident
crates/ty_ide/src/all_symbols.rs:238
↓ 1 callersMethodmerge
Uses `environment` as a base without replacing explicit changes.
crates/ruff_db/src/system/command.rs:145
↓ 1 callersMethodmerge
Possibly merge the symbols in this group and return them. The iterator returned may not contain all symbols in this group. Some of them may have been
crates/ty_ide/src/all_symbols.rs:381
↓ 1 callersMethodmerge
Add the distinct contributions from another successful pattern arm.
crates/ty_python_semantic/src/types/narrow.rs:364
↓ 1 callersMethodmerge
Merge `other` into this config, with values from `other` taking precedence.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:458
↓ 1 callersFunctionmerge_ambiguous_returns
Retains the shared structure of ambiguous overload return types. For example, `dict[str, list[int]]` and `dict[str, list[bytes]]` become `dict[str, l
crates/ty_python_semantic/src/types/call/ambiguous.rs:17
↓ 1 callersMethodmerge_branch_into
Merge the current branch's mutations into `parent` and switch to it.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:239
↓ 1 callersFunctionmerge_branches
Generate a [`Fix`] to merge two [`IfElifBranch`] branches.
crates/ruff_linter/src/rules/flake8_simplify/rules/if_with_same_arms.rs:110
↓ 1 callersFunctionmerge_class_preserving_decorator_result
Merge a class-preserving decorator result into the public binding. If earlier decorators already exposed extra members through an intersection, keep
crates/ty_python_semantic/src/types/infer/builder/class.rs:630
↓ 1 callersMethodmerge_classes
(&self, aliases: &[GenericAlias<'db>])
crates/ty_python_semantic/src/types/call/ambiguous.rs:181
↓ 1 callersMethodmerge_cycle_recovery
Merge two cycle iterations that specialize the same class origin. A semantic union of these class objects is not a valid class base. Keep the shared
crates/ty_python_semantic/src/types/class.rs:412
↓ 1 callersFunctionmerge_disjoint_exclusions
Fold `(T & ~A) | (T & ~B)` to `T` when `A` and `B` are disjoint. The common part can itself contain exclusions. For example, `(Unknown & ~str & ~A) |
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:150
↓ 1 callersMethodmerge_field_call
( &mut self, db: &'db dyn Db, definition: ScopedDefinition<'db>, call: &ExprCa
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:328
↓ 1 callersMethodmerge_interpolated_string_elements
For f-strings and t-strings, only consider the quotes inside string-literals but ignore quotes inside expressions (except inside the format spec). Thi
crates/ruff_python_formatter/src/string/normalize.rs:426
↓ 1 callersFunctionmerge_overlapping_ranges
(mut ranges: Vec<UnreachableRange>)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:72
↓ 1 callersFunctionmerge_overrides
(db: &dyn Db, overrides: Vec<Arc<InnerOverrideOptions>>, _: ())
crates/ty_project/src/metadata/settings.rs:203
↓ 1 callersMethodmerge_place_states
Merges an alternative branch's place states into the current control-flow path. States shared by both branches only need their path constraints merge
crates/ty_python_core/src/use_def.rs:2035
↓ 1 callersFunctionmerge_profiles
( profiler: Path, profiles: list[Path], destination: Path, *, environment: dict[str, str],
scripts/build_ruff_pgo.py:323
↓ 1 callersMethodmerge_singleton
Merge a pair accepted by [`Self::singleton_merge_inputs`] after applying both branches' pending paths. Each path applies the same reachability constra
crates/ty_python_core/src/use_def/place_state.rs:738
↓ 1 callersMethodmerge_structure
(&self, types: &[Type<'db>])
crates/ty_python_semantic/src/types/call/ambiguous.rs:107
↓ 1 callersFunctionmerge_truthiness_guarded_pair
Try to merge a complementary guarded pair into an unguarded core. e.g. - `(A & ~AlwaysTruthy, A & ~AlwaysFalsy)` -> `Some(A)` - `(A & ~AlwaysTruthy,
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:118
↓ 1 callersMethodmerge_tuples
(&self, tuples: &[Cow<'db, TupleSpec<'db>>])
crates/ty_python_semantic/src/types/call/ambiguous.rs:221
↓ 1 callersFunctionmerge_unpacked_key_definitions
( existing: Option<Definition<'db>>, new: Option<Definition<'db>>, )
crates/ty_python_semantic/src/types/typed_dict.rs:2123
↓ 1 callersFunctionmergeable_child
Returns the nested `with` when it is the sole body statement and can be merged with `outer` (same async/sync, neither side an exempt standalone manage
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_with.rs:113
↓ 1 callersMethodmerged_dataclass_params
Returns dataclass params for this class, sourced from both dataclass params and dataclass transform params
crates/ty_python_semantic/src/types/class/static_literal.rs:1160
↓ 1 callersFunctionmerged_membership_test
Generate a string like `obj in (a, b, c)` or `obj not in (a, b, c)`. If `all_hashable` is `true`, the string will use a set instead of a tuple.
crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs:271
↓ 1 callersMethodmessage
Returns the error without its optional recovery guidance.
crates/ty_project/src/metadata/pyproject.rs:141
↓ 1 callersMethodmessage
(&self)
crates/ruff_linter/src/violation.rs:106
↓ 1 callersMethodmessage
(&self)
crates/ruff_linter/src/rules/ruff/rules/invalid_pyproject_toml.rs:50
↓ 1 callersMethodmessage_formats
()
crates/ruff_linter/src/rules/pycodestyle/rules/errors.rs:79
↓ 1 callersMethodmeta_class_no_type_fallback
Exclude attributes defined on `type` when looking up meta-class-attributes.
crates/ty_python_semantic/src/types.rs:1418
↓ 1 callersMethodmeta_member
Looks up a member guaranteed to exist on every inhabitant of `type[Protocol]`. Methods retain their unbound signatures and `ClassVar`s retain their c
crates/ty_python_semantic/src/types/protocol_class.rs:664
↓ 1 callersMethodmeta_write_requirement
Returns the effective write requirement exposed by `type[Protocol]` attribute lookup.
crates/ty_python_semantic/src/types/subclass_of.rs:157
↓ 1 callersMethodmetaclass
Return the metaclass of this class, or `type[Unknown]` if the metaclass cannot be inferred.
crates/ty_python_semantic/src/types/class/static_literal.rs:1295
↓ 1 callersFunctionmetaclass_abcmeta
FURB180
crates/ruff_linter/src/rules/refurb/rules/metaclass_abcmeta.rs:70
↓ 1 callersMethodmetaclass_bases
Iterate over the explicit bases that contribute to metaclass selection.
crates/ty_python_semantic/src/types/class/static_literal.rs:773
↓ 1 callersFunctionmetaclass_namespace_members
( db: &'db dyn Db, metaclass: ClassType<'db>, )
crates/ty_python_semantic/src/types/infer/builder/post_inference/static_class.rs:1216
↓ 1 callersMethodmetadata
(&self)
crates/ruff_dev/src/generate_options.rs:88
↓ 1 callersMethodmetadata_for_path
(&mut self, path: &NormalizedVendoredPath)
crates/ruff_db/src/vendored.rs:382
↓ 1 callersMethodmetadata_target
(&self)
crates/ty_project/src/uv/service.rs:173
↓ 1 callersMethodmethod
Multiline method docstring
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:6
↓ 1 callersMethodmethod
(self)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI049.py:34
↓ 1 callersMethodmethod
(self)
crates/ruff_linter/resources/test/fixtures/ruff/RUF066.py:14
↓ 1 callersMethodmethod_expr
Return a new method call expression on `self.string` with `args` like `self.string.method(args...)`
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:345
↓ 1 callersFunctionmethod_receiver_default
RUF077 — Method receiver parameter should not have a default value
crates/ruff_linter/src/rules/ruff/rules/method_receiver_default.rs:73
↓ 1 callersFunctionmethod_visibility
Infer the [`Visibility`] of a method from its name and decorators.
crates/ruff_python_semantic/src/analyze/visibility.rs:199
↓ 1 callersMethodmight_be_equivalent_to_never
Returns `false` for types we can cheaply distinguish from `Never`. A single such member rules out an entire union without resolving the other members.
crates/ty_python_semantic/src/types/relation.rs:960
↓ 1 callersFunctionmight_be_explicitly_abstract
(db: &'db dyn Db, definition: Definition<'db>)
crates/ty_python_semantic/src/types/abstract_methods.rs:385
↓ 1 callersFunctionmight_be_generic
Returns true if a class might be generic. A class is considered generic if at least one of its direct bases is subscripted with a `TypeVar`-like, or
crates/ruff_python_semantic/src/analyze/class.rs:455
↓ 1 callersFunctionmight_be_old_style_typevar_like
(name: &ExprName, semantic: &SemanticModel)
crates/ruff_python_semantic/src/analyze/class.rs:493
↓ 1 callersMethodmight_contain
(&self, node: AnyNodeRef<'_>)
crates/ruff_python_formatter/src/comments/mod.rs:522
↓ 1 callersFunctionminimize_failure
( seed: Seed, bug: Bug, args: ResolvedCliArgs, deadline: float | None, cancelled: threadin
python/py-fuzzer/fuzz.py:411
↓ 1 callersFunctionmismatch
Returns `true` if the parameter name does not match its type variance.
crates/ruff_linter/src/rules/pylint/rules/type_name_incorrect_variance.rs:145
↓ 1 callersFunctionmisplaced_bare_raise
PLE0704
crates/ruff_linter/src/rules/pylint/rules/misplaced_bare_raise.rs:56
↓ 1 callersFunctionmissing_copyright_notice
CPY001
crates/ruff_linter/src/rules/flake8_copyright/rules/missing_copyright_notice.rs:35
↓ 1 callersMethodmissing_dependency
Check whether `importing_file` is allowed to import `imported_module`. Use the script's own declarations or the nearest containing project's declarat
crates/ty_python_semantic/src/dependency.rs:170
↓ 1 callersFunctionmissing_direct_dependency
( db: &'db dyn Db, importing_file: ProgramFile<'db>, imported_module: Module<'db>, )
crates/ty_python_semantic/src/dependency.rs:20
↓ 1 callersFunctionmissing_fstring_syntax
RUF027
crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs:85
↓ 1 callersFunctionmissing_maxsplit_arg
PLC0207
crates/ruff_linter/src/rules/pylint/rules/missing_maxsplit_arg.rs:91
↓ 1 callersMethodmissing_newline_hint
(&mut self, missing_newline_hint: bool)
crates/ruff_linter/src/source_kind.rs:310
↓ 1 callersFunctionmissing_whitespace
E231
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/missing_whitespace.rs:45
↓ 1 callersFunctionmissing_whitespace_after_keyword
E275
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/missing_whitespace_after_keyword.rs:46
↓ 1 callersFunctionmissing_whitespace_around_operator
E225, E226, E227, E228
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/missing_whitespace_around_operator.rs:169
↓ 1 callersMethodmixed_forward_approximation
( &self, start: usize, stop: ForwardSliceStop, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1947
↓ 1 callersMethodmixed_forward_slice_plan
( &self, start: Option<i32>, stop: Option<i32>, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1833
↓ 1 callersFunctionmixed_spaces_and_tabs
E101
crates/ruff_linter/src/rules/pycodestyle/rules/mixed_spaces_and_tabs.rs:42
↓ 1 callersFunctionmock_patch_count
Returns the number of parameters supplied by `unittest.mock.patch`.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:644
↓ 1 callersMethodmode_argument
(&self)
crates/ruff_linter/src/rules/pylint/rules/unspecified_encoding.rs:155
↓ 1 callersFunctionmodel_config_from_dict
(db: &dyn Db, definition: Definition<'_>, dict: &ExprDict)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:887
↓ 1 callersFunctionmodel_init_accepts_extra
Return `true` if `class` should accept extra keywords in its synthesized constructor.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1438
↓ 1 callersFunctionmodel_init_behavior
(db: &dyn Db, class: StaticClassLiteral<'_>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1385
↓ 1 callersFunctionmodel_init_discards_extra
Return `true` if extra keywords passed to `class` are silently discarded by Pydantic.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1453
↓ 1 callersFunctionmodel_input_type
Return the input type accepted for an ordinary Pydantic model field. By default, Pydantic accepts either an instance of the model or a mapping of str
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1311
↓ 1 callersFunctionmodel_metadata
(db: &'db dyn Db, class: StaticClassLiteral<'db>)
crates/ty_python_semantic/src/types/dedicated/django.rs:160
← previousnext →11,601–11,700 of 31,562, ranked by callers