MCPcopy Create free account

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

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

↓ 4 callersFunctionindent_with_suffix
Returns the indentation of the given line and everything following it.
crates/ruff_python_formatter/src/string/docstring.rs:1863
↓ 4 callersMethodindex
Returns a reference to the index. # Panics Panics if there's a mutable reference to the index via [`index_mut`]. [`index_mut`]: Session::index_mut
crates/ty_server/src/session.rs:1475
↓ 4 callersMethodindex
(&self, index: I)
crates/ruff_index/src/slice.rs:146
↓ 4 callersMethodinfer_comprehensions
(&mut self, comprehensions: &[ast::Comprehension])
crates/ty_python_semantic/src/types/infer/builder.rs:8992
↓ 4 callersMethodinfer_extra_items_kwarg
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:811
↓ 4 callersMethodinfer_first_comprehension_iter
Infer the type of the `iter` expression of the first comprehension.
crates/ty_python_semantic/src/types/infer/builder.rs:8598
↓ 4 callersFunctioninfer_function_default_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:470
↓ 4 callersFunctioninfer_scope_types
Infer all types for a [`ScopeId`], including all definitions and expressions in that scope. Use when checking a scope, or needing to provide a type fo
crates/ty_python_semantic/src/types/infer.rs:526
↓ 4 callersMethodinfer_silent
Infer the expression silently, with diagnostics disabled. This method may be called an unlimited number of times.
crates/ty_python_semantic/src/types/infer/builder.rs:13178
↓ 4 callersMethodinfer_subscript_type_expression
( &mut self, subscript: &ast::ExprSubscript, value_ty: Type<'db>, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2029
↓ 4 callersFunctioninherited_class_body_declaration
( db: &'db dyn Db, scope: ScopeId<'db>, symbol: ScopedSymbolId, )
crates/ty_python_semantic/src/types/member.rs:153
↓ 4 callersFunctioninline
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/comments9.py:86
↓ 4 callersFunctioninner
(expr: &Expr, func: &mut dyn FnMut(&Expr) -> bool)
crates/ruff_python_ast/src/helpers.rs:261
↓ 4 callersMethodinsert
insert the value given by the sequence `it`, returning a tuple (is this a substring already in the tree, was this exact sequence previously inserted).
crates/ruff_unicode_names2_generator/src/trie.rs:37
↓ 4 callersMethodinsert_print_mode
(&mut self, group_id: GroupId, mode: PrintMode)
crates/ruff_formatter/src/printer/mod.rs:926
↓ 4 callersMethodinsert_type
( &mut self, index: usize, tcx: impl Into<TypeContext<'db>>, ty: Type<'db>,
crates/ty_python_semantic/src/types/call/arguments.rs:726
↓ 4 callersMethodinstance_fallback
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1797
↓ 4 callersMethodinstance_type
(self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:754
↓ 4 callersMethodintern_declarations
(&mut self, declarations: Declarations)
crates/ty_python_core/src/use_def.rs:412
↓ 4 callersMethodinterpolated_string_ranges
Returns the byte offset ranges of interpolated strings.
crates/ruff_python_index/src/indexer.rs:111
↓ 4 callersMethodintersects_range_filter
(&self, range: TextRange)
crates/ty_ide/src/folding_range.rs:117
↓ 4 callersMethodinto_accesses
(self)
crates/ruff_linter/src/rules/pylint/helpers.rs:89
↓ 4 callersMethodinto_bindings
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13227
↓ 4 callersMethodinto_diagnostic
Create a new guard. This initializes a new diagnostic using the given message along with the ID and severity used to create this builder. The diagno
crates/ty_python_semantic/src/suppression.rs:355
↓ 4 callersMethodinto_document
Consumes `self` and returns the formatted document.
crates/ruff_formatter/src/lib.rs:315
↓ 4 callersMethodinto_error_context
Return the collected error context, or an empty tree if collection was disabled.
crates/ty_python_semantic/src/types/relation.rs:1854
↓ 4 callersMethodinto_file_path
(self)
crates/ty_server/src/document.rs:132
↓ 4 callersMethodinto_iter
(self)
crates/ty/src/args.rs:348
↓ 4 callersMethodinto_iter
(self)
crates/ruff_formatter/src/format_element.rs:405
↓ 4 callersMethodinto_lower_bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:875
↓ 4 callersMethodinto_navigation_targets
Convert these semantic definitions to editor-facing navigation targets.
crates/ty_ide/src/goto.rs:408
↓ 4 callersMethodinto_path
(self)
crates/ruff_db/src/system.rs:358
↓ 4 callersMethodinto_path
(self)
crates/ty_site_packages/src/lib.rs:72
↓ 4 callersMethodinto_string
(self)
crates/ruff_db/src/system/path.rs:592
↓ 4 callersMethodinto_syntax
Consumes the [`Parsed`] output and returns the contained syntax node.
crates/ruff_python_parser/src/lib.rs:424
↓ 4 callersMethodinto_upper_bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:994
↓ 4 callersMethodinto_vec
Consumes the buffer and returns the written [`FormatElement]`s as a vector.
crates/ruff_formatter/src/buffer.rs:195
↓ 4 callersFunctioninvalid_end_tag
(end_tag: TagKind, start_tag: Option<TagKind>)
crates/ruff_formatter/src/printer/mod.rs:1569
↓ 4 callersMethodis_alias_like
Whether this type wraps an alias body that can be unfolded.
crates/ty_python_semantic/src/types.rs:2737
↓ 4 callersFunctionis_available_definition
Returns whether `definition` remains bound in its defining scope and may exist at runtime.
crates/ty_python_semantic/src/types/dedicated/pytest.rs:18
↓ 4 callersMethodis_binding
True if this definition assigns a value to the place. False only for annotated assignments without a RHS.
crates/ty_python_core/src/definition.rs:918
↓ 4 callersMethodis_bool
(self)
crates/ty_python_semantic/src/types/literal.rs:248
↓ 4 callersMethodis_byte_string
Does the string have a `b` or `B` prefix?
crates/ruff_python_ast/src/nodes.rs:2511
↓ 4 callersMethodis_callable_type
Returns `true` if `self` is [`Type::Callable`].
crates/ty_python_semantic/src/types.rs:2631
↓ 4 callersFunctionis_camelcase
(name: &str)
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:8
↓ 4 callersMethodis_class_literal
(&self)
crates/ty_python_semantic/src/types.rs:3210
↓ 4 callersFunctionis_class_object_type
(ty: Type<'_>)
crates/ty_python_semantic/src/types/protocol_class.rs:2622
↓ 4 callersMethodis_classmethod
Returns true if this overload is decorated with `@classmethod`, or if it is implicitly a classmethod.
crates/ty_python_semantic/src/types/function.rs:370
↓ 4 callersMethodis_classmethod
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:47
↓ 4 callersMethodis_compare_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2170
↓ 4 callersMethodis_constrained
Returns whether this type variable has constraints without evaluating a lazy bound.
crates/ty_python_semantic/src/types/typevar.rs:368
↓ 4 callersMethodis_declared
(self)
crates/ty_python_core/src/place.rs:125
↓ 4 callersMethodis_definitely_defined
(&self)
crates/ty_python_semantic/src/place.rs:190
↓ 4 callersMethodis_definitely_non_data_descriptor
Returns whether this type is known not to be a data descriptor. Descriptor uncertainty propagates through outer unions, intersections, and aliases. `
crates/ty_python_semantic/src/types.rs:5609
↓ 4 callersFunctionis_discarded_dict_key_assignment
Returns `true` if the definition refers to a dictionary-key binding that should be discarded. For example, inference synthesizes an `x["a"] = "bad"`
crates/ty_python_semantic/src/types/infer.rs:295
↓ 4 callersMethodis_dynamic
(&self)
crates/ty_python_semantic/src/types.rs:2799
↓ 4 callersMethodis_eager_assignability
(&self)
crates/ty_python_semantic/src/types/relation.rs:1428
↓ 4 callersMethodis_empty
(&self)
crates/ty_ide/src/will_rename.rs:225
↓ 4 callersFunctionis_empty_f_string
Returns `true` if the expression definitely resolves to the empty string, when used as an f-string expression.
crates/ruff_python_ast/src/helpers.rs:1605
↓ 4 callersMethodis_equivalent_to_materialization
( &self, db: &'db dyn Db, left: Type<'db>, right: Type<'db>, )
crates/ty_python_semantic/src/types.rs:669
↓ 4 callersMethodis_fixable
(self, diagnostic: &Diagnostic)
crates/ty_python_semantic/src/fixes.rs:378
↓ 4 callersMethodis_generic
(self)
crates/ty_python_semantic/src/types/class.rs:1211
↓ 4 callersMethodis_generic_alias
(&self)
crates/ty_python_semantic/src/types.rs:2758
↓ 4 callersFunctionis_init
Returns `true` if a function is an `__init__`.
crates/ruff_python_semantic/src/analyze/visibility.rs:127
↓ 4 callersMethodis_int
(self)
crates/ty_python_semantic/src/types/literal.rs:244
↓ 4 callersMethodis_invalid_syntax
Returns `true` if `self` is a syntax error message.
crates/ruff_db/src/diagnostic/mod.rs:475
↓ 4 callersMethodis_keyword_only
Returns `true` if this is a keyword-only parameter.
crates/ty_python_semantic/src/types/signatures.rs:6262
↓ 4 callersMethodis_kw_only_sentinel
Returns true if this field is a `dataclasses.KW_ONLY` sentinel. <https://docs.python.org/3/library/dataclasses.html#dataclasses.KW_ONLY>
crates/ty_python_semantic/src/types/class.rs:2834
↓ 4 callersMethodis_last_top_level_statement
Returns `true` if this is the last top-level statement in the module.
crates/ruff_python_formatter/src/context.rs:244
↓ 4 callersMethodis_lazy
Returns `true` if the import laziness is [`Self::Lazy`].
crates/ruff_python_semantic/src/model.rs:2576
↓ 4 callersMethodis_lint
(self)
crates/ty_python_semantic/src/suppression.rs:601
↓ 4 callersMethodis_lint_named
Returns `true` if this `DiagnosticId` represents a lint with the given name.
crates/ruff_db/src/diagnostic/mod.rs:1089
↓ 4 callersMethodis_list_element
(self, p: &Parser)
crates/ruff_python_parser/src/parser/mod.rs:1472
↓ 4 callersFunctionis_lowercase
Return `true` if a string is lowercase. A string is lowercase if all alphabetic characters in the string are lowercase. ## Examples ```rust use ruf
crates/ruff_python_stdlib/src/str.rs:21
↓ 4 callersMethodis_match
(&self, name: &str)
crates/ty_ide/src/completion.rs:1628
↓ 4 callersMethodis_match_symbol_name
(&self, symbol_name: &str)
crates/ty_ide/src/symbols.rs:75
↓ 4 callersFunctionis_model
Returns whether `class` is a subclass of Django's `Model`.
crates/ty_python_semantic/src/types/dedicated/django.rs:20
↓ 4 callersMethodis_module
(self)
crates/ty_python_core/src/scope.rs:269
↓ 4 callersMethodis_named_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1652
↓ 4 callersMethodis_nominal_instance
(self)
crates/ty_python_semantic/src/types/instance.rs:137
↓ 4 callersFunctionis_non_exported
( db: &'db dyn Db, declaration: Definition<'db>, requires_explicit_reexport: RequiresExplicitReExp
crates/ty_python_semantic/src/place.rs:2308
↓ 4 callersFunctionis_non_logical_token
Returns `true` if the given `token` is a non-logical token. Unlike [`TokenKind::is_trivia`], this function also considers the indent, dedent and newl
crates/ruff_linter/src/rules/pycodestyle/helpers.rs:12
↓ 4 callersMethodis_notebook
(&self, file: &UnifiedFile)
crates/ruff_db/src/diagnostic/render.rs:797
↓ 4 callersFunctionis_or_contains_typeddict
Return true if the given type is a `TypedDict` or a union or intersection that includes at least one `TypedDict` (even if other types are also present
crates/ty_python_semantic/src/types/narrow.rs:5563
↓ 4 callersMethodis_primary
(&self)
crates/ruff_annotate_snippets/src/renderer/render.rs:2493
↓ 4 callersFunctionis_printable
According to python following categories aren't printable: Cc (Other, Control) Cf (Other, Format) Cs (Other, Surrogate) Co (Other, Private Use) Cn (Ot
crates/ruff_python_literal/src/char.rs:12
↓ 4 callersMethodis_private_declaration
Return `true` if this [`Binding`] represents an private declaration (e.g., `_x` in `_x = "private variable"`)
crates/ruff_python_semantic/src/binding.rs:127
↓ 4 callersMethodis_property_instance
(&self)
crates/ty_python_semantic/src/types.rs:3250
↓ 4 callersMethodis_pydantic
(self)
crates/ty_python_semantic/src/types/class.rs:337
↓ 4 callersMethodis_qualifier_only
(&self)
crates/ty_python_semantic/src/place.rs:905
↓ 4 callersFunctionis_range_reachable
Check whether a diagnostic emitted at `range` is in reachable code, considering both scope reachability and statement-level reachability within the sc
crates/ty_python_semantic/src/reachability.rs:2107
↓ 4 callersMethodis_range_reachable
Check whether a diagnostic emitted at `range` is in reachable code. This checks both whether the scope itself is reachable and whether the specific s
crates/ty_python_semantic/src/types/context.rs:421
↓ 4 callersMethodis_raw_string
Does the string have an `r` or `R` prefix?
crates/ruff_python_ast/src/nodes.rs:2498
↓ 4 callersMethodis_raw_string
Returns `true` if the current f-string is a raw f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:70
↓ 4 callersFunctionis_reachable_implementation_definition
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/ide_support.rs:809
↓ 4 callersMethodis_reassigned
(&self)
crates/ty_python_core/src/symbol.rs:127
↓ 4 callersMethodis_recursive_divergent
(&self)
crates/ty_python_semantic/src/types.rs:2479
↓ 4 callersMethodis_return_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:444
↓ 4 callersMethodis_root
(&self)
crates/ruff_workspace/src/resolver.rs:786
↓ 4 callersMethodis_soft_keyword
(self)
crates/ruff_python_ast/src/token.rs:370
← previousnext →3,301–3,400 of 31,766, ranked by callers