MCPcopy Create free account

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

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

↓ 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:400
↓ 3 callersMethodkind
(&self)
crates/ruff_source_file/src/line_index.rs:69
↓ 3 callersMethodkind
Determine whether this module is a single-file module or a package
crates/ty_module_resolver/src/module.rs:135
↓ 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:778
↓ 3 callersMethodknown_function_decorators
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/class/static_literal.rs:848
↓ 3 callersMethodlanguage_id
(&self)
crates/ty_server/src/session/index.rs:254
↓ 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:342
↓ 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:403
↓ 3 callersMethodmap_range
Maps a metadata range to its corresponding range in the Python source.
crates/ruff_python_ast/src/script.rs:180
↓ 3 callersMethodmap_receiver_constraints
( &self, db: &'db dyn Db, type_mapping: &TypeMapping<'_, 'db>, tcx: TypeContex
crates/ty_python_semantic/src/types/signatures.rs:2132
↓ 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:1266
↓ 3 callersMethodmargin
(&self)
crates/ruff_annotate_snippets/src/renderer/mod.rs:343
↓ 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:277
↓ 3 callersMethodmark_nonlocal
(&mut self)
crates/ty_python_core/src/symbol.rs:139
↓ 3 callersMethodmark_place_bound
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/builder.rs:1393
↓ 3 callersMethodmark_place_declared
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/builder.rs:1398
↓ 3 callersMethodmark_support_used
(&mut self, _storage: &mut ConstraintSetStorage<'_>, support: SupportId)
crates/ty_python_semantic/src/types/constraints/owned.rs:79
↓ 3 callersFunctionmask
(kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:33
↓ 3 callersFunctionmatch_function_def
( statement: &'a mut Statement<'b>, )
crates/ruff_linter/src/cst/matchers.rs:179
↓ 3 callersFunctionmatch_head
Return the [`ast::ExprName`] at the head of the expression, if any.
crates/ruff_linter/src/rules/airflow/helpers.rs:207
↓ 3 callersFunctionmatch_open_mode
Match open mode to see if it is supported.
crates/ruff_linter/src/rules/refurb/helpers.rs:408
↓ 3 callersMethodmatches
(&self, candidate: &str)
crates/ruff_linter/src/settings/types.rs:684
↓ 3 callersFunctionmatches_password_name
(string: &str)
crates/ruff_linter/src/rules/flake8_bandit/helpers.rs:18
↓ 3 callersMethodmatching_overloads_mut
Returns an iterator over all the mutable overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4711
↓ 3 callersMethodmaterialize
Apply a generator's materialization with the variance of each operation.
crates/ty_python_semantic/src/types.rs:2419
↓ 3 callersMethodmaterialize_reachability
( &self, pending: &'a mut PendingPlaceState, target: PendingReachabilityId, re
crates/ty_python_core/src/use_def.rs:1863
↓ 3 callersMethodmaterialized
(self, kind: MaterializationKind)
crates/ty_python_semantic/src/types.rs:11915
↓ 3 callersMethodmay_be_data_descriptor
Returns whether this type should be considered a possible data descriptor. If this type is a union, returns true if _any_ element is a data descriptor
crates/ty_python_semantic/src/types.rs:5556
↓ 3 callersMethodmay_be_false
(self)
crates/ty_python_core/src/lib.rs:1009
↓ 3 callersMethodmay_have_unbounded_specialization
Whether revisiting this constructor can keep changing its type arguments.
crates/ty_python_semantic/src/types/cyclic.rs:128
↓ 3 callersFunctionmaybe_anonymized
(renderer: &Renderer, line_num: usize, max_line_num_len: usize)
crates/ruff_annotate_snippets/src/renderer/render.rs:2289
↓ 3 callersFunctionmdtest_rule_selection
(rules: Option<&Rules>, required_rule: Option<&str>)
crates/ty_test/src/db.rs:375
↓ 3 callersMethodmeasure_mode
(self)
crates/ruff_formatter/src/printer/call_stack.rs:46
↓ 3 callersMethodmember
(&self, id: ScopedMemberId)
crates/ty_python_core/src/place.rs:282
↓ 3 callersFunctionmember_contract
Resolve an owner's declaration as seen through the receiver being checked. Keep the owner's generic specialization, but bind `Self` and descriptor ac
crates/ty_python_semantic/src/types/overrides/attributes.rs:135
↓ 3 callersMethodmember_count
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/protocol_class.rs:490
↓ 3 callersMethodmember_name
For example, given `import foo`, returns `"foo"`.
crates/ruff_python_semantic/src/binding.rs:763
↓ 3 callersMethodmerge
Merges the quotes metadata of different literals. ## Raw and triple quoted strings Merging raw and triple quoted strings is only correct if all liter
crates/ruff_python_formatter/src/string/normalize.rs:370
↓ 3 callersMethodmerge
(&mut self, other: Self)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:484
↓ 3 callersFunctionmerge_constraints_and
Merge constraints with AND semantics (intersection/conjunction). When we have `constraint1 & constraint2`, we need to distribute AND over the OR in t
crates/ty_python_semantic/src/types/narrow.rs:1430
↓ 3 callersFunctionmethod_override_types
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, subclass_type: Type<'db>, superclass_type: T
crates/ty_python_semantic/src/types/overrides.rs:1609
↓ 3 callersMethodmethod_shadowing_contract
Return a type that represents the "contract" that a callable must satisfy when attempting to shadow a method on an instance. For example: ```python c
crates/ty_python_semantic/src/types/callable.rs:128
↓ 3 callersMethodmiddle_token
(self)
crates/ruff_python_parser/src/string.rs:58
↓ 3 callersMethodmodify_with_manual_index
A private function for overriding how we update the line index by default.
crates/ruff_server/src/edit/text_document.rs:149
↓ 3 callersMethodmodule
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1437
↓ 3 callersMethodmodule_dependency_kind
(mut self, kind: ModuleDependencyKind)
crates/ty_ide/src/completion.rs:638
↓ 3 callersMethodmodule_type_from_name
(&self, module_name: &ModuleName)
crates/ty_python_semantic/src/types/infer/builder.rs:5636
↓ 3 callersMethodmultiline_ranges
Returns the byte offset ranges of multiline strings.
crates/ruff_python_index/src/indexer.rs:116
↓ 3 callersMethodname
(&self)
crates/ruff_dev/src/generate_ty_options.rs:125
↓ 3 callersMethodname
(&self)
crates/mdtest/src/parser.rs:143
↓ 3 callersMethodname_matches
(&self, expr: &Expr)
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:88
↓ 3 callersMethodnarrow_targets
If the declared type is a union, returns the target elements that it can be narrowed to.
crates/ty_python_semantic/src/types/infer/type_context.rs:110
↓ 3 callersMethodnarrowing_constraints
(&self)
crates/ty_python_core/src/use_def.rs:1616
↓ 3 callersFunctionnecessary_match_pattern_type
Return a type that contains every value that can match `pattern`. For example, given: ```python def f(x: list[object]): match x: case [int(real=0)]:
crates/ty_python_semantic/src/types/narrow.rs:1572
↓ 3 callersMethodneeds_self_mapping
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, parameters: &[Paramet
crates/ty_python_semantic/src/types/signatures.rs:2325
↓ 3 callersMethodnegate
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:3454
↓ 3 callersFunctionnested_workspace_server
Creates a test server for the following temporary workspace: ```text <temp_dir>/ ├── .ruff.toml # exclude or extend-exclude = ["sub"] ├─
crates/ruff_server/tests/e2e/workspace.rs:247
↓ 3 callersMethodnew
(file: File, range: TextRange)
crates/ruff_db/src/files.rs:679
↓ 3 callersMethodnext
(&mut self)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:726
↓ 3 callersMethodnext
(&mut self)
crates/ruff_python_formatter/src/verbatim.rs:576
↓ 3 callersMethodnext
(&mut self)
crates/ty_python_core/src/member.rs:807
↓ 3 callersMethodnext
(&mut self)
crates/ruff_unicode_names2/src/lib.rs:138
↓ 3 callersMethodnext
(&mut self)
crates/ruff_linter/src/docstrings/sections.rs:273
↓ 3 callersFunctionnext_auto_value
Compute the next auto-assigned value based on the previous member's value. Used for dict-form and tuple/list-form functional enums where `auto()` val
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:192
↓ 3 callersMethodnext_back
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:256
← previousnext →4,301–4,400 of 31,562, ranked by callers