MCPcopy Create free account

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

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

↓ 2 callersMethodlocal_functions
Recover source methods for a class member, including retained property accessors. The exposed type and the source functions serve different purposes:
crates/ty_python_semantic/src/types/list_members.rs:817
↓ 2 callersMethodlocal_functions_from_type
Recover local functions retained in the exposed type, including aliases and property accessors. Unlike [`Self::local_functions`], this does not recove
crates/ty_python_semantic/src/types/list_members.rs:774
↓ 2 callersMethodlocal_position
Returns the position within this document. Only use [`Self::local_position`] when you already have a URI context and this position is guaranteed to b
crates/ty_server/src/document/range.rs:72
↓ 2 callersMethodlocal_symbol
(self, name: &str)
crates/ty_python_semantic/src/place_load.rs:1153
↓ 2 callersFunctionlocate_cmp_ops
Extract all [`CmpOp`] operators from an expression snippet, with appropriate ranges. This method iterates over the token stream and re-identifies [`C
crates/ruff_linter/src/rules/pyflakes/rules/invalid_literal_comparisons.rs:140
↓ 2 callersFunctionlocation_link_from_navigation_target
( target: &NavigationTarget, db: &dyn Db, position_encoding: PositionEncoding, source_range: O
crates/ty_wasm/src/lib.rs:1319
↓ 2 callersFunctionlogical_line
Return the index of the first logical line in a string.
crates/ruff_linter/src/rules/pydocstyle/helpers.rs:15
↓ 2 callersFunctionlogical_line_end
Returns the end of the logical line at `offset`, including its newline. A trailing backslash can extend the line beyond its last AST node's physical l
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1636
↓ 2 callersMethodlookup_attribute_in_scope
Lookup a qualified attribute in the certain scope.
crates/ruff_python_semantic/src/model.rs:1088
↓ 2 callersMethodlookup_class_literal
Look up a [`KnownClass`] in its canonical module. Lookup errors are logged when the cached query executes.
crates/ty_python_semantic/src/types/class/known.rs:1385
↓ 2 callersMethodlookup_dunder_new
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, policy: MemberLookupPo
crates/ty_python_semantic/src/types.rs:4448
↓ 2 callersFunctionlookup_member_on_union_element
Callers pass each union alternative as `element`. If a receiver is provided, this function intersects it with `element` before looking up the member.
crates/ty_python_semantic/src/types.rs:1211
↓ 2 callersFunctionlookup_override_member
Look up `__new__` on the class so generated and decorated callables retain `cls` until they are bound for the override comparison. Hashing ignores ins
crates/ty_python_semantic/src/types/overrides.rs:1403
↓ 2 callersMethodlower_bound_for
( self, db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/constraints/variables.rs:601
↓ 2 callersFunctionlsp_position_to_text_size
Helper function to convert an LSP Position to internal `TextSize`. This is used internally by the `PositionExt` trait and other helpers.
crates/ty_server/src/document/range.rs:274
↓ 2 callersFunctionmake_context
(path: Option<&Path>)
crates/ruff_unicode_names2_generator/src/lib.rs:376
↓ 2 callersMethodmake_python_source_kind
Generate a Python source kind used by the linter.
crates/ruff_server/src/session/index.rs:565
↓ 2 callersMethodmapLocation
( location: DiagnosticLocation, )
playground/ty/src/Editor/Editor.tsx:990
↓ 2 callersMethodmapNavigationTarget
(link: LocationLink)
playground/ty/src/Editor/Editor.tsx:957
↓ 2 callersMethodmap_argument_indices
Rewrites every stored argument index with the provided mapping function. This supports both simple offsets and sparse sub-call remapping. For a forwa
crates/ty_python_semantic/src/types/call/bind.rs:10528
↓ 2 callersMethodmap_definition_to_source
( &self, def: &ResolvedDefinition<'db>, )
crates/ty_ide/src/stub_mapping.rs:41
↓ 2 callersMethodmap_definitions
Map multiple `ResolvedDefinitions`, applying stub-to-source mapping to each. This is a convenience method that applies `map_definition` to each eleme
crates/ty_ide/src/stub_mapping.rs:52
↓ 2 callersMethodmap_flags
(self, func: impl FnOnce(LiteralFlags) -> LiteralFlags)
crates/ty_python_semantic/src/types/literal.rs:118
↓ 2 callersMethodmap_signatures
Transforms the public overloads and any separate implementation signatures.
crates/ty_python_semantic/src/types/function.rs:1360
↓ 2 callersFunctionmap_system_to_vendored
Maps an absolute system path to a vendored path. This is useful for normalizing file paths received from the LSP. Namely, the LSP might include a *sy
crates/ty_ide/src/lib.rs:398
↓ 2 callersMethodmap_type
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/signatures.rs:6446
↓ 2 callersMethodmap_value
(self, f: impl FnOnce(T) -> R)
crates/ruff_ranged_value/src/lib.rs:209
↓ 2 callersMethodmap_values
(&mut self, mut map: F)
crates/ty_python_core/src/frozen.rs:214
↓ 2 callersMethodmap_with
(self, f: &F)
crates/ty_python_semantic/src/types/call/bind.rs:1302
↓ 2 callersMethodmap_with_boundness
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mut transform_fn: impl
crates/ty_python_semantic/src/types/set_theoretic.rs:564
↓ 2 callersMethodmapping_pattern_arm
( &self, subject_ty: Type<'db>, key_types: &[Type<'db>], )
crates/ty_python_semantic/src/types/narrow.rs:2962
↓ 2 callersMethodmapping_pattern_key_types
(&self, kind: &MappingPatternPredicateKind<'db>)
crates/ty_python_semantic/src/types/narrow.rs:2954
↓ 2 callersMethodmark_constraint_used
( &mut self, storage: &mut ConstraintSetStorage<'_>, constraint: ConstraintId, )
crates/ty_python_semantic/src/types/constraints/owned.rs:60
↓ 2 callersMethodmark_declared
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/place.rs:453
↓ 2 callersMethodmark_failed_call
Records a reachable failed call even when its diagnostic is suppressed. A recovery type does not establish that speculative inference succeeded.
crates/ty_python_semantic/src/types/context.rs:281
↓ 2 callersMethodmark_formatted
(&self)
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1199
↓ 2 callersMethodmark_symbol_used
(&mut self, id: ScopedSymbolId)
crates/ty_python_core/src/builder.rs:1403
↓ 2 callersMethodmark_unformatted
Marks the comment as not-formatted
crates/ruff_python_formatter/src/comments/mod.rs:151
↓ 2 callersFunctionmarkdown_details
( summary: str, content: str | list[str], preface: str | None )
python/ruff-ecosystem/ruff_ecosystem/markdown.py:31
↓ 2 callersFunctionmarkdown_project_section
( title: str, content: str | list[str], options: CommandOptions, project: Project )
python/ruff-ecosystem/ruff_ecosystem/markdown.py:9
↓ 2 callersFunctionmatch_aliases
( names: &'a mut ImportNames<'b>, )
crates/ruff_linter/src/cst/matchers.rs:59
↓ 2 callersFunctionmatch_continuation
If the next token is a continuation (`\`), return its offset.
crates/ruff_python_importer/src/insertion.rs:381
↓ 2 callersMethodmatch_event
(&mut self, event: &ChangeEvent)
crates/ty/tests/file_watching.rs:338
↓ 2 callersFunctionmatch_file
( db: &dyn Db, file: File, python_version: PythonVersion, diagnostics: &[Diagnostic], opti
crates/mdtest/src/matcher.rs:95
↓ 2 callersMethodmatch_file
Returns `true` if the path to a file is definitely excluded and `false` otherwise.
crates/ty_project/src/glob/exclude.rs:38
↓ 2 callersFunctionmatch_import_from
( statement: &'a mut Statement<'b>, )
crates/ruff_linter/src/cst/matchers.rs:38
↓ 2 callersMethodmatch_included_paths
( &self, path: &SystemPath, mode: GlobFilterCheckMode, )
crates/ty_project/src/walk.rs:47
↓ 2 callersMethodmatch_keyword
( &mut self, argument_index: usize, argument: Argument<'a>, argument_type: Opt
crates/ty_python_semantic/src/types/call/bind.rs:5304
↓ 2 callersFunctionmatch_open_keywords
Match keyword arguments. Return keyword arguments to forward and mode.
crates/ruff_linter/src/rules/refurb/helpers.rs:362
↓ 2 callersMethodmatch_parameters_in_place
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, arguments: &CallA
crates/ty_python_semantic/src/types/call/bind.rs:1358
↓ 2 callersMethodmatch_pattern_subject_arms
Pair each original subject type with the union members used to test the pattern. An upper-bounded type variable uses its bound for matching, but each
crates/ty_python_semantic/src/types/narrow.rs:3447
↓ 2 callersMethodmatch_positional
( &mut self, argument_index: usize, argument: Argument<'a>, argument_type: Opt
crates/ty_python_semantic/src/types/call/bind.rs:5270
↓ 2 callersFunctionmatch_semicolon
If the next token is a semicolon, return its offset.
crates/ruff_python_importer/src/insertion.rs:369
↓ 2 callersFunctionmatch_subject_place_expressions
Return the expressions whose existing bindings a match pattern can narrow. In addition to the subject itself, matching an attribute or subscript can
crates/ty_python_core/src/place.rs:26
↓ 2 callersFunctionmatch_tuple
(expression: &'a Expression<'b>)
crates/ruff_linter/src/cst/matchers.rs:133
↓ 2 callersFunctionmatch_value
Given a target and value, find the value that's assigned to the given symbol.
crates/ruff_python_semantic/src/analyze/typing.rs:1289
↓ 2 callersMethodmatch_value_pattern_subject_type
Return the type of the subject when a value pattern succeeds. A value pattern uses Python equality, so a successful match does not always narrow to t
crates/ty_python_semantic/src/types/narrow.rs:2410
↓ 2 callersMethodmatched
Returns whether the given path (file or directory) matched a pattern in this gitignore matcher. `is_dir` should be true if the path refers to a direc
crates/ty_project/src/glob/exclude.rs:135
↓ 2 callersMethodmatched_argument_for_call_argument
Returns the matched-argument entry for a source call argument. [`CallableBinding`] prepends a synthetic bound receiver before matching bound methods,
crates/ty_python_semantic/src/types/call/bind.rs:8785
↓ 2 callersMethodmatches
(&self, path: &SystemPath, mode: GlobFilterCheckMode, directory: bool)
crates/ty_project/src/glob/exclude.rs:42
↓ 2 callersMethodmatches
Returns true when this answer matches the completion given.
crates/ty_completion_eval/src/main.rs:512
↓ 2 callersMethodmatches
(self, actual: i128, expected: i64)
crates/ty_python_semantic/src/types/narrow.rs:1665
↓ 2 callersMethodmatches
(self, db: &'db dyn Db, class: ClassLiteral<'db>)
crates/ty_python_semantic/src/types/class.rs:299
↓ 2 callersFunctionmatches_module_prefix
(module: &str, prefix: &str)
crates/ruff_workspace/src/options.rs:2327
↓ 2 callersMethodmatching_literals
( self, db: &'db dyn Db, kind: LiteralComparisonKind, )
crates/ty_python_semantic/src/types/literal.rs:507
↓ 2 callersMethodmatching_overload_index
Returns the index of the matching overload in the form of [`MatchingOverloadIndex`].
crates/ty_python_semantic/src/types/call/bind.rs:4637
↓ 2 callersMethodmatching_type_annotation
Find a definition's annotation if it matches the type inferred at the use site.
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:924
↓ 2 callersMethodmaterialization_equivalence
(&self)
crates/ty_python_semantic/src/types.rs:576
↓ 2 callersMethodmaterialization_kind
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:482
↓ 2 callersMethodmaterialize_narrowing
( &self, pending: &mut PendingPlaceState, target: PendingReachabilityId, narro
crates/ty_python_core/src/use_def.rs:1832
↓ 2 callersMethodmaterialize_ref_at_use
Returns the place state needed to resolve a use. Pending narrowing gates are only needed to preserve path correlations across a later place change or
crates/ty_python_core/src/use_def.rs:1919
↓ 2 callersFunctionmax_empty_lines
Counts the number of empty lines in `contents`.
crates/ruff_python_formatter/src/comments/placement.rs:2382
↓ 2 callersMethodmax_remaining_fuel_for
Returns the greatest remaining fuel for any derivation of `assignment` on this path.
crates/ty_python_semantic/src/types/constraints/paths.rs:610
↓ 2 callersMethodmay_affect_source
Returns whether the source may need edits for these module name changes.
crates/ty_ide/src/will_rename.rs:275
↓ 2 callersMethodmay_contain_name
Returns whether or not this directory might contain the given entry.
crates/ty_module_resolver/src/path.rs:399
↓ 2 callersMethodmay_have_comment
(&self, node: impl Into<AnyNodeRef<'a>>)
crates/ruff_python_formatter/src/comments/mod.rs:267
↓ 2 callersMethodmay_resolve_to_member
(&self, expr: &Expr, member: &str)
crates/ruff_python_semantic/src/model.rs:1185
↓ 2 callersFunctionmaybe_add_undefined_reveal_clarification
( diagnostic: &Diagnostic, original: std::fmt::Arguments, )
crates/mdtest/src/matcher.rs:237
↓ 2 callersMethodmaybe_flush
Flush any pending reports if streaming diagnostics. Note: The flush is throttled when streaming.
crates/ty_server/src/server/api/requests/workspace_diagnostic.rs:498
↓ 2 callersMethodmaybe_grow_stack
(&mut self, f: impl FnOnce(&mut Self) -> T)
crates/ruff_python_parser/src/parser/mod.rs:959
↓ 2 callersFunctionmaybe_lowercase
Lowercase the given string, if it contains any uppercase characters.
crates/ruff_linter/src/rules/isort/sorting.rs:184
↓ 2 callersFunctionmdtest_analysis_settings
(options: Option<&Analysis>)
crates/ty_test/src/db.rs:297
↓ 2 callersFunctionmdtest_lint_registry
Includes a no-op rule for testing renamed rules in suppression comments.
crates/ty_test/src/db.rs:356
↓ 2 callersMethodmember_id
( &self, members: &IndexVec<ScopedMemberId, Member>, member: &MemberExprRef<'_>, )
crates/ty_python_core/src/member.rs:502
↓ 2 callersFunctionmember_lookup_or_fall_back_to
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, result: MemberLookupResult<'db>, fallback_fn
crates/ty_python_semantic/src/types.rs:1262
↓ 2 callersMethodmember_mut
(&mut self, id: ScopedMemberId)
crates/ty_python_core/src/place.rs:359
↓ 2 callersMethodmember_promotability
(&self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/equality/enums.rs:578
↓ 2 callersFunctionmember_type
(name: &str, settings: &Settings)
crates/ruff_linter/src/rules/isort/sorting.rs:19
↓ 2 callersMethodmember_type
(&self, db: &'db dyn Db, name: &Name, promotable: bool)
crates/ty_python_semantic/src/types/equality/enums.rs:688
↓ 2 callersMethodmember_types
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1951
↓ 2 callersMethodmember_with_augmented_bindings
Pair an ordinary member lookup with augmented assignments that first read their target. ```python class Counter: value = 0 def increment(self): self
crates/ty_python_semantic/src/types/class.rs:2327
↓ 2 callersMethodmembers
Iterator over all members in this scope.
crates/ty_python_core/src/place.rs:235
↓ 2 callersMethodmemoized
Returns a formattable object that memoizes the result of `Format` by cloning. Mainly useful if the same sub-tree can appear twice in the formatted out
crates/ruff_formatter/src/format_extensions.rs:57
↓ 2 callersMethodmerge
(&mut self, snapshot: ExceptionCheckpointSnapshot)
crates/ty_python_core/src/use_def/exception_checkpoint.rs:66
↓ 2 callersMethodmerge
(self, other: Self)
crates/ty_python_semantic/src/place.rs:71
↓ 2 callersMethodmerge
Merge this generic context with another, returning a new generic context that contains type variables from both contexts.
crates/ty_python_semantic/src/types/generics.rs:492
↓ 2 callersMethodmerge_ambiguous_return_types
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:4556
↓ 2 callersMethodmerge_column
(&self, types: impl Iterator<Item = Type<'db>>)
crates/ty_python_semantic/src/types/call/ambiguous.rs:103
↓ 2 callersMethodmerge_constraint_or
Merge two constraints with OR semantics (union/disjunction).
crates/ty_python_semantic/src/types/narrow.rs:1292
↓ 2 callersFunctionmerge_constraints_or
Merge constraints with OR semantics (union/disjunction). When we have `constraint1 OR constraint2`, we simply concatenate the disjuncts from both con
crates/ty_python_semantic/src/types/narrow.rs:1461
← previousnext →6,401–6,500 of 31,766, ranked by callers