MCPcopy Create free account

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

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

↓ 2 callersMethodleave_node
(&mut self, node: AnyNodeRef<'ast>)
crates/ruff_python_formatter/src/range.rs:240
↓ 2 callersMethodlegacy_aliases
(&self)
crates/ty_python_semantic/src/types/infer.rs:393
↓ 2 callersMethodlegacy_generic_context
Returns the generic context from the first subscripted `Generic` or `Protocol` base. Returns `None` if no such base exists or the first such base int
crates/ty_python_semantic/src/types/class/static_literal.rs:460
↓ 2 callersFunctionlegacy_type_alias_definition
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:64
↓ 2 callersFunctionlegacy_type_alias_parameters
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:420
↓ 2 callersMethodlegacy_type_alias_reference
( &mut self, value_ty: Type<'db>, definition: Option<Definition<'db>>, referen
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:61
↓ 2 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/abstract_methods.rs:238
↓ 2 callersMethodlen
(&self)
crates/ruff_linter/src/directives.rs:363
↓ 2 callersMethodlex_codes
(&mut self)
crates/ruff_linter/src/noqa.rs:579
↓ 2 callersMethodlex_decimal_number
Lex a normal number, that is, no octal, hex or binary number.
crates/ruff_python_parser/src/lexer.rs:1023
↓ 2 callersMethodlex_directive
Collect codes in `noqa` comment.
crates/ruff_linter/src/noqa.rs:531
↓ 2 callersFunctionlex_jupyter_source
(source: &str)
crates/ruff_python_parser/src/lexer.rs:1810
↓ 2 callersMethodlex_string
Lex a string literal.
crates/ruff_python_parser/src/lexer.rs:873
↓ 2 callersMethodlex_unicode_identifier
Continues from the cursor after the identifier's first non-ASCII character.
crates/ruff_python_parser/src/lexer.rs:684
↓ 2 callersFunctionlexical_name_path_component_for_node
Computes a lexical name path component for an enclosing scope. See [`lexical_name_path_for_definition`][] for details.
crates/ty_python_semantic/src/lexical_name_path.rs:51
↓ 2 callersFunctionlexical_name_path_for_definition
Returns the module-relative lexical name path to `definition`. For example, the path to `method` here is `["Outer", "method"]`: ```python class Outer
crates/ty_python_semantic/src/lexical_name_path.rs:17
↓ 2 callersMethodlimit_tuple_addition_result
Bound tuple alternatives produced by addition while preserving other operator results.
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:108
↓ 2 callersMethodline_column
Returns the line and column number for an UTF-8 byte offset. The `column` number is the nth-character of the line, except for the first line where it
crates/ruff_source_file/src/line_index.rs:117
↓ 2 callersFunctionline_number
(char_index: TextSize, source: &str)
crates/mdtest/src/parser.rs:1069
↓ 2 callersFunctionline_start
(tokens: &ruff_python_ast::token::Tokens, offset: TextSize)
crates/ty_python_semantic/src/suppression/add_ignore.rs:222
↓ 2 callersMethodline_start
Returns the [byte offset](TextSize) for the `line` with the given index.
crates/ruff_source_file/src/line_index.rs:261
↓ 2 callersMethodline_width
(&self)
crates/ruff_formatter/src/lib.rs:268
↓ 2 callersMethodline_width
(&self)
crates/ruff_formatter/src/format_element/document.rs:242
↓ 2 callersMethodlineno_offset
Add an offset used for aligning the header sigil (`-->`) with the line number separators. For normal diagnostics this is computed automatically based
crates/ruff_annotate_snippets/src/snippet.rs:104
↓ 2 callersFunctionlint_documentation_url
(lint_name: LintName)
crates/ty_python_semantic/src/lint.rs:147
↓ 2 callersFunctionlint_path
Lint the source code at the given `Path`.
crates/ruff/src/diagnostics.rs:182
↓ 2 callersMethodlint_registry
(&self)
crates/ty_test/src/db.rs:166
↓ 2 callersMethodlint_registry
(&self)
crates/ty_python_semantic/src/db.rs:195
↓ 2 callersMethodlint_unmerged
Lint options from one source, such as `ty.toml`, `pyproject.toml`, CLI arguments, or editor settings. When resolving project settings, lint each sour
crates/ty_project/src/metadata/options.rs:593
↓ 2 callersFunctionlist_alias
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, argument: Type<'db>, )
crates/ty_python_semantic/src/types/tests.rs:287
↓ 2 callersFunctionlist_root_modules
( db: &'db dyn Db, resolver_environment: ResolverEnvironment<'db>, )
crates/ty_module_resolver/src/resolve/search.rs:67
↓ 2 callersFunctionliteral_fallthrough_prelude
(guarded_any: bool)
crates/ruff_benchmark/benches/ty.rs:1846
↓ 2 callersFunctionliteral_match_fallthrough_code
(guarded_any: bool)
crates/ruff_benchmark/benches/ty.rs:1889
↓ 2 callersFunctionliteral_sequence
Describes literal positions for both inference and diagnostics. A starred literal is expanded recursively; other starred expressions contribute the sh
crates/ty_python_semantic/src/types/unpacker.rs:620
↓ 2 callersFunctionliteral_sequence_elements
( expression: &ast::Expr, promote: bool, )
crates/ty_python_semantic/src/types/unpacker.rs:642
↓ 2 callersFunctionload
Parse TOML from a binary file object.
crates/ruff_benchmark/resources/tomllib/_parser.py:57
↓ 2 callersFunctionload_reports_from_directory
Load all JSON memory reports from a directory.
scripts/memory_report.py:144
↓ 2 callersMethodload_with_provenance
Loads an owned constraint set, replacing the provenance of every constraint.
crates/ty_python_semantic/src/types/constraints.rs:1270
↓ 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:1638
↓ 2 callersMethodlookup_attribute_in_scope
Lookup a qualified attribute in the certain scope.
crates/ruff_python_semantic/src/model.rs:1103
↓ 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:4449
↓ 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:1210
↓ 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:1404
↓ 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:10341
↓ 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:6543
↓ 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:1287
↓ 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:546
↓ 2 callersMethodmapping_pattern_arm
( &self, subject_ty: Type<'db>, key_types: &[Type<'db>], )
crates/ty_python_semantic/src/types/narrow.rs:2960
↓ 2 callersMethodmapping_pattern_key_types
(&self, kind: &MappingPatternPredicateKind<'db>)
crates/ty_python_semantic/src/types/narrow.rs:2952
↓ 2 callersMethodmark_as_unmatched_overload
Mark this overload binding as an unmatched overload.
crates/ty_python_semantic/src/types/call/bind.rs:9633
↓ 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_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:337
↓ 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:43
↓ 2 callersMethodmatch_keyword
( &mut self, argument_index: usize, argument: Argument<'a>, argument_type: Opt
crates/ty_python_semantic/src/types/call/bind.rs:5234
↓ 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:1343
↓ 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:3445
↓ 2 callersMethodmatch_positional
( &mut self, argument_index: usize, argument: Argument<'a>, argument_type: Opt
crates/ty_python_semantic/src/types/call/bind.rs:5200
↓ 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:2408
↓ 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:8668
↓ 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:1663
↓ 2 callersMethodmatches
(self, db: &'db dyn Db, class: ClassLiteral<'db>)
crates/ty_python_semantic/src/types/class.rs:296
← previousnext →6,301–6,400 of 31,562, ranked by callers