MCPcopy Create free account

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

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

↓ 3 callersFunctionis_reexported
Returns `true` if the `definition` is re-exported. This will first check if the definition is using the "redundant alias" pattern like `import foo as
crates/ty_python_semantic/src/place.rs:2321
↓ 3 callersMethodis_reexported
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:108
↓ 3 callersMethodis_relevant_for_partial_application
Returns whether this error is relevant to `functools.partial(...)` construction. These errors are used both to filter incompatible wrapped overloads
crates/ty_python_semantic/src/types/call/bind.rs:10481
↓ 3 callersFunctionis_root_model
(db: &'db dyn Db, class: StaticClassLiteral<'db>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:722
↓ 3 callersMethodis_single
Returns whether both delimiters consist of one backtick.
crates/ty_ide/src/docstring/document/syntax.rs:305
↓ 3 callersMethodis_single
Returns true if this is a single callable (not a union or intersection).
crates/ty_python_semantic/src/types/call/bind.rs:1493
↓ 3 callersMethodis_single_paramspec
( &self, )
crates/ty_python_semantic/src/types/signatures.rs:566
↓ 3 callersMethodis_singleton
(self)
crates/ruff_python_ast/src/token.rs:446
↓ 3 callersMethodis_singleton
Is this class a singleton class? A singleton class is a class where it is known that only one instance can ever exist at runtime.
crates/ty_python_semantic/src/types/class/known.rs:1675
↓ 3 callersFunctionis_special_cased_condition_expression
Return `true` if `expression` is recognized as "tainted" by being defined (directly or indirectly) with respect to `sys.version_info`, `sys.platform`,
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:334
↓ 3 callersMethodis_specialized_generic
Returns whether this type represents a specialization of a generic type. For example, whereas `<class 'list'>` is a generic type, `<class 'list[int]'
crates/ty_python_semantic/src/types.rs:2766
↓ 3 callersMethodis_standard_library_stub
(&self)
crates/ty_module_resolver/src/path.rs:38
↓ 3 callersFunctionis_staticmethod
Returns `true` if a function is a "static method".
crates/ruff_python_semantic/src/analyze/visibility.rs:16
↓ 3 callersMethodis_staticmethod_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:902
↓ 3 callersMethodis_string_literal
(&self)
crates/ty_python_semantic/src/types.rs:3369
↓ 3 callersMethodis_subclass_of
(&self)
crates/ty_python_semantic/src/types.rs:3206
↓ 3 callersFunctionis_subject_to_liskov_substitution_principle
Return `true` if this function is subject to the Liskov Substitution Principle. Type checkers will check nearly all methods for compliance with the L
crates/ruff_python_semantic/src/analyze/function_type.rs:54
↓ 3 callersMethodis_subset_of
Whether every constraint in `self` has an equivalent constraint in `other`. For example, `(int, str)` is a subset of `(int, str, bytes)`, but `(bool,
crates/ty_python_semantic/src/types/typevar.rs:2326
↓ 3 callersMethodis_suppression_off_comment
(&self, text: &str)
crates/ruff_python_formatter/src/comments/mod.rs:169
↓ 3 callersMethodis_terminal
(self)
crates/ty_python_semantic/src/reachability.rs:1056
↓ 3 callersMethodis_todo
(&self)
crates/ty_python_semantic/src/types.rs:2745
↓ 3 callersMethodis_triple_quoted
Is the string triple-quoted, i.e., does it begin and end with three consecutive quote characters?
crates/ruff_python_ast/src/nodes.rs:998
↓ 3 callersMethodis_triple_quoted_string
Returns `true` if the current token is a triple-quoted string of any kind. # Panics If it isn't a string or any f/t-string tokens.
crates/ruff_python_ast/src/token.rs:58
↓ 3 callersMethodis_trivially_always_satisfied
(&self)
crates/ty_python_semantic/src/types/signatures.rs:749
↓ 3 callersMethodis_tuple
Returns whether this class is `builtins.tuple` exactly
crates/ty_python_semantic/src/types/class.rs:859
↓ 3 callersMethodis_type_alias_annotation
Returns whether `annotation` declares a PEP 613 type alias.
crates/ty_python_semantic/src/semantic_model.rs:630
↓ 3 callersMethodis_type_alias_definition
Returns whether `definition` defines a PEP 613 or PEP 695 type alias.
crates/ty_python_semantic/src/semantic_model.rs:638
↓ 3 callersMethodis_type_param
(self)
crates/ruff_python_ast/src/generated.rs:7410
↓ 3 callersMethodis_typed_dict
(&self)
crates/ty_python_semantic/src/types.rs:3228
↓ 3 callersMethodis_unbound
(self)
crates/ty_python_core/src/use_def/place_state.rs:76
↓ 3 callersMethodis_unfolded_and
(self, predicate: impl FnOnce(T) -> bool)
crates/ty_python_semantic/src/types/recursive.rs:731
↓ 3 callersMethodis_unformatted
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:160
↓ 3 callersMethodis_unparenthesized_named_expr
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3050
↓ 3 callersMethodis_used
(&self, suppression_id: FileSuppressionId)
crates/ty_python_semantic/src/types/diagnostic.rs:1739
↓ 3 callersMethodis_user_defined
(self)
crates/ty_python_semantic/src/types/enums.rs:106
↓ 3 callersMethodis_variable
(self)
crates/ty_python_semantic/src/types/tuple.rs:54
↓ 3 callersMethodis_variadic
(self)
crates/ruff_python_ast/src/nodes.rs:3288
↓ 3 callersFunctionis_warn_on_unknown_selectors_enabled
https://github.com/astral-sh/ruff/pull/26113
crates/ruff_linter/src/preview.rs:355
↓ 3 callersFunctionis_wrapped_in_markdown_code_span
Returns whether `text` is wrapped in a Markdown code span. For example, this returns `true` for ``"`value`"`` and `false` for ``"`value` trailing"``.
crates/ty_ide/src/docstring/document/syntax.rs:65
↓ 3 callersFunctionis_wsl
Returns `true` if the current process is running under WSL. Adapted from is-wsl by Sean Larkin, MIT License.
crates/ruff_linter/src/rules/flake8_executable/helpers.rs:18
↓ 3 callersMethodis_yes
(self)
crates/ruff_python_ast/src/str.rs:79
↓ 3 callersFunctionisort_settings_with_all_headings
Helper to create a standard isort Settings with all section headings and `known_modules` configured for `my_first_party`.
crates/ruff_linter/src/rules/isort/mod.rs:1329
↓ 3 callersMethoditer
Returns an iterator over the rules in this set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let set = RuleSet::from_rules(&[Ru
crates/ruff_linter/src/registry/rule_set.rs:280
↓ 3 callersMethoditer
(&self)
crates/ruff_linter/src/docstrings/sections.rs:242
↓ 3 callersMethoditer
(&self)
crates/ruff_index/src/slice.rs:69
↓ 3 callersMethoditer_bases
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/newtype.rs:101
↓ 3 callersMethoditer_chunks
(&self)
crates/ty_python_semantic/src/types/constraints/support.rs:73
↓ 3 callersMethoditer_evidence
( &self, source: EvidenceSource, )
crates/ty_python_semantic/src/types/constraints.rs:1896
↓ 3 callersMethoditer_matching
( &self, include: impl Fn(ConstraintProvenance) -> bool + Clone, )
crates/ty_python_semantic/src/types/constraints.rs:1883
↓ 3 callersMethoditer_with_context
Returns an iterator over all the tokens that provides context.
crates/ruff_python_ast/src/token/tokens.rs:21
↓ 3 callersMethodkey
(&self)
crates/ty_server/src/session.rs:1980
↓ 3 callersMethodkey
Returns the annotation pattern in definition order. A repeated symbol shadows an earlier parameter, so the annotation pattern alone cannot describe th
crates/ty_python_core/src/use_def.rs:904
↓ 3 callersFunctionkey_in_dict
SIM118
crates/ruff_linter/src/rules/flake8_simplify/rules/key_in_dict.rs:60
↓ 3 callersMethodkey_membership_truthiness
Returns whether a literal string key must, cannot, or might be present. An undeclared key can still exist in an implicitly open `TypedDict` or one wi
crates/ty_python_semantic/src/types/typed_dict.rs:401
↓ 3 callersMethodkind
(&self)
crates/ruff_source_file/src/line_index.rs:69
↓ 3 callersMethodkind
(&self)
crates/ruff_diagnostics/src/edit.rs:69
↓ 3 callersMethodkind
(&self)
crates/ruff_python_trivia/src/tokenizer.rs:198
↓ 3 callersMethodkind
(self)
crates/ty_python_core/src/member.rs:738
↓ 3 callersMethodkind
(self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:758
↓ 3 callersMethodknown_function_decorators
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/class/static_literal.rs:847
↓ 3 callersMethodlanguage_id
(&self)
crates/ty_server/src/session/index.rs:252
↓ 3 callersMethodlanguage_id
(&self)
crates/ruff_server/src/edit/text_document.rs:80
↓ 3 callersMethodlast_definition
Returns the [`Definition`] for the last overload or implementation in this function.
crates/ty_python_semantic/src/types/function.rs:1650
↓ 3 callersMethodlast_definition_raw_signature
Typed externally-visible "raw" signature of the last overload or implementation of this function. The `return_callable_typevar_scope` controls whether
crates/ty_python_semantic/src/types/function.rs:1044
↓ 3 callersMethodlazy_import_context
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:347
↓ 3 callersFunctionleading_comments
Formats the passed comments as leading comments
crates/ruff_python_formatter/src/comments/format.rs:25
↓ 3 callersMethodleading_trailing
Returns an iterator over the [leading](self#leading-comments) and [trailing comments](self#trailing-comments) of `node`.
crates/ruff_python_formatter/src/comments/mod.rs:355
↓ 3 callersMethodleading_whitespace
Returns the whitespace and whitespace byte-length *before* the `token`
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:200
↓ 3 callersMethodlen
(&self)
crates/ty_python_semantic/src/suppression.rs:967
↓ 3 callersMethodlen
(&self)
crates/ruff_linter/src/docstrings/sections.rs:238
↓ 3 callersMethodlen
(&self)
crates/ruff_index/src/slice.rs:59
↓ 3 callersMethodlevel
Returns the verbosity level based on the number of `-v` and `-q` flags. Returns `None` if the user did not specify any verbosity flags.
crates/ty/src/logging.rs:46
↓ 3 callersFunctionlex_invalid
(source: &str, mode: Mode)
crates/ruff_python_parser/src/lexer.rs:1788
↓ 3 callersFunctionlex_valid
(source: &str, mode: Mode, start_offset: TextSize)
crates/ruff_python_parser/src/lexer.rs:1772
↓ 3 callersMethodline_count
(&self)
crates/ruff_source_file/src/lib.rs:89
↓ 3 callersMethodline_end
(&self, offset: TextSize)
crates/ruff_source_file/src/line_ranges.rs:368
↓ 3 callersMethodline_index
(&self)
crates/ty_python_semantic/src/semantic_model.rs:94
↓ 3 callersMethodline_text
(&self, index: OneIndexed)
crates/ruff_source_file/src/lib.rs:77
↓ 3 callersFunctionlines_before
Returns the number of newlines between `offset` and the first non whitespace character in the source code.
crates/ruff_python_trivia/src/tokenizer.rs:41
↓ 3 callersMethodlines_range
Computes the range of all lines that this `range` covers. The range starts at the beginning of the line at `range.start()` and goes up to, but exclud
crates/ruff_source_file/src/line_ranges.rs:225
↓ 3 callersMethodlines_str
Returns the text of all lines that include `range`. See [`LineRanges::lines_str`].
crates/ruff_linter/src/locator.rs:139
↓ 3 callersFunctionlint_fix
Generate `Diagnostic`s from source code content, iteratively fixing until stable.
crates/ruff_linter/src/linter.rs:519
↓ 3 callersFunctionlint_fix_toml
Generate [`Diagnostic`]s for a TOML configuration file, iteratively fixing until stable.
crates/ruff_linter/src/toml.rs:50
↓ 3 callersMethodlint_suppressions
Returns applicable suppressions for `id`, with inline suppressions in reverse source order.
crates/ty_python_semantic/src/suppression.rs:410
↓ 3 callersFunctionlist_submodules
(db: &'db dyn Db, module: Module<'db>)
crates/ty_module_resolver/src/resolve/search.rs:77
↓ 3 callersMethodloaded_symbol_name
Returns the loaded symbol's name, or `None` when the loaded place is a member. For example, this returns a name for `value`, but not for `value.attr`
crates/ty_python_semantic/src/place_load.rs:863
↓ 3 callersMethodlog_warning
(&self)
crates/ruff_linter/src/rule_selector.rs:103
↓ 3 callersMethodloop_header
(&self, id: LoopHeaderId)
crates/ty_python_core/src/use_def.rs:1051
↓ 3 callersMethodloop_header_id
(&self)
crates/ty_python_core/src/definition.rs:1651
↓ 3 callersFunctionmake_cell_uri
(path: &Path, index: usize)
crates/ruff_server/tests/e2e/notebook.rs:442
↓ 3 callersMethodmap_leave_aliases
A version of [`UnionType::map`] that does not unpack type aliases.
crates/ty_python_semantic/src/types/set_theoretic.rs:421
↓ 3 callersMethodmap_range
Maps a metadata range to its corresponding range in the Python source.
crates/ruff_python_ast/src/script.rs:190
↓ 3 callersMethodmap_receiver_constraints
( &self, db: &'db dyn Db, type_mapping: &TypeMapping<'_, 'db>, tcx: TypeContex
crates/ty_python_semantic/src/types/signatures.rs:2112
↓ 3 callersFunctionmap_targets_to_links
( db: &dyn Db, targets: RangedValue<NavigationTargets>, source: &SourceText, index: &LineIndex
crates/ty_wasm/src/lib.rs:828
↓ 3 callersMethodmap_types
Maps the specialization's types, returning [`Cow::Borrowed`] without allocating if every type is unchanged and [`Cow::Owned`] otherwise.
crates/ty_python_semantic/src/types/generics.rs:1278
↓ 3 callersMethodmargin
(&self)
crates/ruff_annotate_snippets/src/renderer/mod.rs:343
↓ 3 callersMethodmark_as_unmatched_overload
Mark this overload binding as an unmatched overload.
crates/ty_python_semantic/src/types/call/bind.rs:9818
↓ 3 callersMethodmark_definition_ids_used
( &mut self, definition_ids: impl IntoIterator<Item = ScopedDefinitionId>, )
crates/ty_python_core/src/use_def.rs:3145
↓ 3 callersMethodmark_global
(&mut self)
crates/ty_python_core/src/symbol.rs:135
↓ 3 callersMethodmark_invalid_type_form
Records an invalid type form even when its diagnostic is suppressed or inferred separately.
crates/ty_python_semantic/src/types/context.rs:296
← previousnext →4,301–4,400 of 31,766, ranked by callers