MCPcopy Create free account

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

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

↓ 5 callersMethodis_callable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:443
↓ 5 callersFunctionis_compound_statement
Return `true` if the `Stmt` is a compound statement (as opposed to a simple statement).
crates/ruff_python_ast/src/helpers.rs:21
↓ 5 callersMethodis_definition_generic
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:364
↓ 5 callersMethodis_deprecated
(&self)
crates/ty_python_semantic/src/lint.rs:226
↓ 5 callersMethodis_dict_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1837
↓ 5 callersMethodis_empty
(&self)
crates/ty_project/src/metadata/options.rs:1377
↓ 5 callersMethodis_empty
Returns `true` if the given range is an empty comment.
crates/ruff_python_trivia/src/comment_ranges.rs:244
↓ 5 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:856
↓ 5 callersMethodis_enum
(self)
crates/ty_python_semantic/src/types/literal.rs:260
↓ 5 callersFunctionis_enumeration
Return `true` if `class_def` is a class that has one or more enum classes in its mro
crates/ruff_python_semantic/src/analyze/class.rs:289
↓ 5 callersMethodis_equivalence
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:860
↓ 5 callersMethodis_file
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:103
↓ 5 callersFunctionis_file_descriptor
Returns `true` if the given expression looks like a file descriptor, i.e., if it is an integer.
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:114
↓ 5 callersMethodis_final
Is this class final?
crates/ty_python_semantic/src/types/class/static_literal.rs:880
↓ 5 callersMethodis_flat
(&self)
crates/ruff_formatter/src/format_element/tag.rs:192
↓ 5 callersMethodis_frozen_dataclass
Returns the effective frozen status of this class if it's a dataclass-like class. Returns `Some(true)` for a frozen dataclass-like class, `Some(false
crates/ty_python_semantic/src/types/class/static_literal.rs:1207
↓ 5 callersMethodis_function_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:370
↓ 5 callersMethodis_generator_function
(self, index: &SemanticIndex)
crates/ty_python_core/src/scope.rs:116
↓ 5 callersMethodis_global
(&self)
crates/ty_python_core/src/builder.rs:191
↓ 5 callersFunctionis_guarded_by_try_except
( expr: &Expr, module: &str, name: &str, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/airflow/helpers.rs:80
↓ 5 callersMethodis_import
(&self)
crates/ty_python_core/src/definition.rs:986
↓ 5 callersMethodis_import_from_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:999
↓ 5 callersMethodis_include
Returns `true` if the match result is [`ModuleNameMatch::Include`].
crates/ty_module_resolver/src/module_glob.rs:212
↓ 5 callersMethodis_invalid
Returns `true` if the parser deemed the string literal invalid.
crates/ruff_python_ast/src/nodes.rs:1837
↓ 5 callersMethodis_lint_disabled
(&self, lint: &'static LintMetadata)
crates/ty_python_semantic/src/suppression.rs:283
↓ 5 callersMethodis_multiline
(&self, range: TextRange)
crates/ty_ide/src/folding_range.rs:253
↓ 5 callersMethodis_never_satisfied
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:203
↓ 5 callersMethodis_notebook
Returns `true` if this is a notebook source file.
crates/ruff_db/src/source.rs:107
↓ 5 callersMethodis_parameter_section
(self)
crates/ty_ide/src/docstring/document.rs:156
↓ 5 callersMethodis_pure_redundant_with
Return `true` if `self` is redundant with `other` under the pure redundancy relation. Unlike [`Self::is_redundant_with`], this does not apply shortcu
crates/ty_python_semantic/src/types/relation.rs:849
↓ 5 callersFunctionis_reachable
( db: &'db dyn Db, use_def: &UseDefMap<'db>, reachability: ScopedReachabilityConstraintId, )
crates/ty_python_semantic/src/reachability.rs:2131
↓ 5 callersFunctionis_same_expression
Returns `true` if the given argument is the "same" as the given expression. For example, if the argument has a default, it is not considered the same
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:467
↓ 5 callersMethodis_singleton
Return `true` when this complement represents exactly one enum literal. Complements with rest components are not singletons, because those positive i
crates/ty_python_semantic/src/types/enums.rs:779
↓ 5 callersMethodis_stub
(self)
crates/ruff_python_ast/src/lib.rs:145
↓ 5 callersFunctionis_sys_version_block
Returns `true` if the [`ast::StmtIf`] is a version-checking block (e.g., `if sys.version_info >= ...:`).
crates/ruff_python_semantic/src/analyze/typing.rs:456
↓ 5 callersMethodis_unbound
Return `true` if this [`Binding`] represents an unbound variable (e.g., `x` in `x = 1; del x`).
crates/ruff_python_semantic/src/binding.rs:118
↓ 5 callersMethodis_uninhabited
(self)
crates/ty_python_core/src/lib.rs:997
↓ 5 callersMethodis_unparenthesized_starred_expr
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3045
↓ 5 callersFunctionis_valid_default_value_with_annotation
( default: &Expr, allow_container: bool, locator: &Locator, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:293
↓ 5 callersMethodis_workspace
Returns `true` if the diagnostic mode is set to check all files in the workspace.
crates/ty_server/src/session/options.rs:465
↓ 5 callersMethodis_yes
Returns `true` if the parenthesized value is `Yes`.
crates/ruff_python_parser/src/parser/mod.rs:1156
↓ 5 callersMethodis_yes
(self)
crates/ty_python_semantic/src/types/constraints.rs:3745
↓ 5 callersMethoditer
(&self)
crates/ruff_python_ast/src/comparable.rs:388
↓ 5 callersMethoditer
Returns an iterator over the starting rows of each cell (1-based). This yields one entry per Python cell (skipping over Markdown cell).
crates/ruff_notebook/src/index.rs:43
↓ 5 callersMethoditer
(&self)
crates/ty_ide/src/hover.rs:353
↓ 5 callersMethoditer
(&self)
crates/ruff_linter/src/linter.rs:77
↓ 5 callersMethoditer_callable_items_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1065
↓ 5 callersMethoditer_constructor_items_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1082
↓ 5 callersFunctioniter_parent_enum_classes
Iterates over parent enum classes in the MRO, skipping known enum infrastructure classes but including `IntEnum`, `Flag`, and `IntFlag` which declare
crates/ty_python_semantic/src/types/enums.rs:1376
↓ 5 callersMethodkind
(&self)
crates/ruff_python_parser/src/typing.rs:26
↓ 5 callersMethodkind
Returns the section kind.
crates/ty_ide/src/docstring/document.rs:68
↓ 5 callersMethodlen
The number of characters this line ending occupies in bytes.
crates/ruff_annotate_snippets/src/renderer/source_map.rs:714
↓ 5 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:3731
↓ 5 callersMethodline_start
(&self, offset: TextSize)
crates/ruff_source_file/src/line_ranges.rs:339
↓ 5 callersMethodline_str
Returns the text of the `offset`'s line. See [`LineRanges::line_str`].
crates/ruff_linter/src/locator.rs:132
↓ 5 callersMethodlint_registry
(&self)
crates/ty_project/src/db.rs:627
↓ 5 callersMethodlinter_version
Return the [`PythonVersion`] to use for version-dependent lint rules. This will either be the Python version specified by the user or the default Pyt
crates/ruff_linter/src/settings/mod.rs:916
↓ 5 callersMethodliteral_fallback_instance
Returns the fallback instance type that a literal is an instance of, or `None` if the type is not a literal.
crates/ty_python_semantic/src/types.rs:3702
↓ 5 callersMethodmap
(self, operation: impl FnOnce(T) -> U)
crates/ty_python_semantic/src/types/recursive.rs:753
↓ 5 callersMethodmap
(self, db: &'db dyn Db, mut f: impl FnMut(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/method.rs:86
↓ 5 callersMethodmap
(self, mut f: impl FnMut(CallableType<'db>) -> CallableType<'db>)
crates/ty_python_semantic/src/types/callable.rs:1159
↓ 5 callersMethodmap_type
Transform the member's value type without changing its property accessor deprecations.
crates/ty_python_semantic/src/types.rs:1159
↓ 5 callersMethodmap_with_boundness_and_qualifiers
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mut transform_fn: impl
crates/ty_python_semantic/src/types/typevar.rs:2372
↓ 5 callersFunctionmapping_pattern_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/match_pattern.rs:80
↓ 5 callersFunctionmatch_call
Match that the given expression is `func(x, y, z, ...)`.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:377
↓ 5 callersMethodmatched_subject_type
Return the type established when `pattern` matches `subject_ty`. This analysis is independent of binding inference. In particular, every `or`-pattern
crates/ty_python_semantic/src/types/narrow.rs:2329
↓ 5 callersFunctionmax_parallelism
()
crates/ruff_db/src/lib.rs:105
↓ 5 callersMethodmaximum
Returns the maximum length of this tuple, if any.
crates/ty_python_semantic/src/types/tuple.rs:73
↓ 5 callersMethodmay_match
Returns whether `source` may contain the configured identifier or keyword. The literal search checks for boundaries at bytes other than ASCII letters
crates/ruff_python_trivia/src/name_matcher.rs:50
↓ 5 callersMethodmay_share_type_identity
Returns `false` if `self` and `other` cannot have the same [`TypeIdentity`]. A `true` result is only a candidate match and must be confirmed with [`T
crates/ty_python_semantic/src/types/cyclic.rs:66
↓ 5 callersMethodmerge
(self, other: Self)
crates/ruff_python_ast/src/helpers.rs:65
↓ 5 callersMethodmerge
(&self, types: &[Type<'db>])
crates/ty_python_semantic/src/types/call/ambiguous.rs:59
↓ 5 callersMethodmessage
(&self)
crates/ty_ide/src/hints.rs:17
↓ 5 callersFunctionmethod
Check a method for unused arguments.
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:320
↓ 5 callersMethodmissing_node_range
(&self)
crates/ruff_python_parser/src/parser/mod.rs:343
↓ 5 callersFunctionmodule_for_mode
(db: &'db TestDb, name: &str, mode: ModuleResolveMode)
crates/ty_module_resolver/src/resolve.rs:3564
↓ 5 callersMethodmost_flat
Returns the least expanded variant # Panics When the number of variants is less than two.
crates/ruff_formatter/src/format_element.rs:376
↓ 5 callersMethodmro_no_object_fallback
Exclude attributes defined on `object` when looking up attributes.
crates/ty_python_semantic/src/types.rs:1412
↓ 5 callersMethodname
Name of the parameter (if it has one).
crates/ty_python_semantic/src/types/signatures.rs:6358
↓ 5 callersMethodname
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:570
↓ 5 callersMethodnarrow
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, base_type: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:5767
↓ 5 callersFunctionnearest_enclosing_function
Returns the type of the nearest enclosing function for the given scope. This function walks up the ancestor scopes starting from the given scope, and
crates/ty_python_semantic/src/types/infer.rs:967
↓ 5 callersMethodnext
(self, end_position: TextSize)
crates/ruff_python_formatter/src/builders.rs:109
↓ 5 callersMethodnext
Move to the next parameter in both the `source` and `target` parameter iterators, [`None`] if both iterators are exhausted.
crates/ty_python_semantic/src/types/signatures.rs:3157
↓ 5 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:430
↓ 5 callersMethodnominal_origin_instance
Returns the nominal instance of a protocol's origin without asserting nominal subtyping.
crates/ty_python_semantic/src/types/instance.rs:1796
↓ 5 callersMethodnotebook_document
Returns the LSP [`NotebookDocument`] corresponding to `File` or `None` if the file isn't open in the editor or if it isn't a notebook.
crates/ty_server/src/db.rs:16
↓ 5 callersMethodnotebook_index
(&self, file: &UnifiedFile)
crates/ruff_db/src/diagnostic/render.rs:785
↓ 5 callersFunctionnotebook_path
Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory.
crates/ruff_notebook/src/notebook.rs:521
↓ 5 callersMethodoffset
(&self)
crates/ruff_python_parser/src/lexer.rs:1390
↓ 5 callersMethodopen
(self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:226
↓ 5 callersFunctionoptional_parentheses
Wraps an expression in parentheses only if it still does not fit after expanding all expressions that start or end with a parentheses (`()`, `[]`, `{}
crates/ruff_python_formatter/src/expression/parentheses.rs:201
↓ 5 callersMethodordering
Defines the ordering of the variables in a constraint set BDD. If we only care about _correctness_, we can choose any ordering that we want, as long
crates/ty_python_semantic/src/types/constraints.rs:2137
↓ 5 callersMethodoverlaps_with
Returns whether this support contains any type variables in common with `other`.
crates/ty_python_semantic/src/types/constraints/support.rs:108
↓ 5 callersMethodown_instance_member
A helper function for `instance_member` that looks up the `name` attribute only on this class, not on its superclasses.
crates/ty_python_semantic/src/types/class.rs:2277
↓ 5 callersMethodown_tuple_spec
If this type is an *exact* tuple type (*not* a subclass of `tuple`), returns the tuple spec. You usually don't want to use this method, as you usuall
crates/ty_python_semantic/src/types/instance.rs:382
↓ 5 callersFunctionpad_end
Like [`pad_expression`], but only pads the end of the expression.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:375
↓ 5 callersMethodparameter_definition
(&'db self, parameter_name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4437
↓ 5 callersMethodparameter_types
Returns the bound types for each parameter, in parameter source order, or `None` if no argument was matched to that parameter.
crates/ty_python_semantic/src/types/call/bind.rs:9621
↓ 5 callersMethodparameters
The identities of this definition's formal parameters, in declaration order.
crates/ty_python_semantic/src/types/cyclic.rs:340
← previousnext →2,801–2,900 of 31,766, ranked by callers