MCPcopy Create free account

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

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

↓ 4 callersMethodatom
(self)
crates/ty_python_core/src/reachability_constraints.rs:75
↓ 4 callersMethodatomic_constraint_source_order
(&mut self, constraint: AtomicConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1489
↓ 4 callersFunctionbench_project
( criterion: &mut Criterion, project: RealWorldProject<'_>, variants: &[ProjectVariant], )
crates/ruff_benchmark/benches/ty.rs:2884
↓ 4 callersFunctionbenchmark
(bencher: Bencher, project: &Project, args: &[&str], cached: bool)
crates/ruff_benchmark/benches/ruff_walltime.rs:92
↓ 4 callersMethodbind
(self, db: &'db dyn Db, scope: ScopeId<'db>, place: ScopedPlaceId)
crates/ty_python_semantic/src/types.rs:12918
↓ 4 callersFunctionbind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured/rst.rs:846
↓ 4 callersMethodbindings
Returns a [`Bindings`] that can be used to analyze a call to this type. You must call [`match_parameters`][Bindings::match_parameters] and [`check_typ
crates/ty_python_semantic/src/types.rs:7099
↓ 4 callersMethodbindings_at_definition
( &self, definition: Definition<'db>, )
crates/ty_python_core/src/use_def.rs:1305
↓ 4 callersMethodbindings_for_place
( &self, place: ScopedPlaceId, )
crates/ty_python_core/src/lib.rs:162
↓ 4 callersMethodbinds_typevar
( self, db: &'db dyn Db, typevar: TypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/generics.rs:974
↓ 4 callersMethodboolean_test
Read an already-inferred expression's type and truthiness using the requested [`ExpressionContext`]. Return a [`BooleanTest`] instance. Use short-cir
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:927
↓ 4 callersMethodboundness_analysis
(&self)
crates/ty_python_core/src/use_def.rs:1553
↓ 4 callersMethodbranch_range_until_first_newline
Return a [`TextRange`] spanning from `branch_start` up to the offset of the first newline character after the start of `first_statement`. The newline
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1129
↓ 4 callersMethodbuild
The filter matches if any of the globs matches. See <https://github.com/BurntSushi/ripgrep/discussions/2927> for the error returned.
crates/ty_project/src/glob/include.rs:278
↓ 4 callersMethodbuild
(self)
crates/ruff_python_ast/src/name.rs:506
↓ 4 callersFunctionc3_merge
Implementation of the [C3-merge algorithm] for calculating a Python class's [method resolution order]. [C3-merge algorithm]: https://docs.python.org/
crates/ty_python_semantic/src/types/mro.rs:871
↓ 4 callersFunctioncached_vendored_root
Get the absolute root path of all cached vendored paths. This does not ensure that this path exists (this is only used for mapping cached paths back
crates/ty_ide/src/lib.rs:381
↓ 4 callersMethodcallables
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/method.rs:272
↓ 4 callersMethodcell_offsets
The [`CellOffsets`] for the current file, if it's a Jupyter notebook.
crates/ruff_linter/src/checkers/ast/mod.rs:570
↓ 4 callersFunctioncharacter
Find the character called `name`, or `None` if no such character exists. This searches case-insensitively. # Example ```rust assert_eq!(unicode_nam
crates/ruff_unicode_names2/src/lib.rs:308
↓ 4 callersMethodcheck_call
Evaluate a call to this known class, emit any diagnostics that are necessary as a result of the call, and return the type that results from the call.
crates/ty_python_semantic/src/types/class/known.rs:2068
↓ 4 callersMethodcheck_callable_signature_pair
( &self, db: &'db dyn Db, source: &CallableSignature<'db>, target: &CallableSi
crates/ty_python_semantic/src/types/signatures.rs:2703
↓ 4 callersMethodcheck_deprecated
Check if the given ty is `@deprecated` or not
crates/ty_python_semantic/src/types/infer/builder.rs:10837
↓ 4 callersMethodcheck_identifier
(&mut self, identifier: &ast::Identifier, kind: OccurrenceKind)
crates/ty_ide/src/references.rs:759
↓ 4 callersFunctioncheck_project
(db: &ProjectDatabase, project_name: &str)
crates/ruff_benchmark/src/real_world_projects.rs:31
↓ 4 callersMethodcheck_settings
Check if the project's settings have any issues
crates/ty_project/src/lib.rs:860
↓ 4 callersMethodcheck_type_pair
( &mut self, value_ty: Type<'db>, target_ty: Type<'db>, emit_diagnostics: bool
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:495
↓ 4 callersMethodcheck_types
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Con
crates/ty_python_semantic/src/types/call/bind.rs:337
↓ 4 callersMethodclass_context_of_current_method
If the current scope is a method inside an enclosing class, return `Some(class)` where `class` represents the enclosing class. If the current scope i
crates/ty_python_semantic/src/types/infer/builder.rs:2154
↓ 4 callersMethodclass_member
Look up an attribute in the MRO of the meta-type of `self`. This returns class-level attributes when called on an instance-like type, and metaclass at
crates/ty_python_semantic/src/types.rs:4477
↓ 4 callersFunctionclass_member_with_symbol
( db: &'db dyn Db, scope: ScopeId<'db>, symbol: Option<ScopedSymbolId>, )
crates/ty_python_semantic/src/types/member.rs:74
↓ 4 callersMethodclass_object_member
Look up attributes stored in the namespace of a class object. Besides attributes present in the class MRO, this includes attributes assigned to insta
crates/ty_python_semantic/src/types.rs:4684
↓ 4 callersFunctionclass_pattern_coverage_target
Return the class expression type for coverage analysis.
crates/ty_python_semantic/src/types/match_pattern.rs:90
↓ 4 callersMethodclient_name
(&self)
crates/ty_server/src/session.rs:1517
↓ 4 callersMethodclose_file
(&mut self, file_id: FileHandle)
crates/ty_wasm/src/lib.rs:243
↓ 4 callersMethodcmp
(&self, other: &Self)
crates/ruff_diagnostics/src/edit.rs:99
↓ 4 callersMethodcmp
(&self, other: &Self)
crates/ruff_linter/src/line_width.rs:176
↓ 4 callersMethodcode_action_request
Send a `textDocument/codeAction` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:863
↓ 4 callersMethodcollect_publish_diagnostic_notifications
( &mut self, count: usize, )
crates/ruff_server/tests/e2e/main.rs:502
↓ 4 callersFunctioncollect_while_loop_place_names
(code: &str)
crates/ty_python_core/src/builder/loop_bindings_visitor.rs:205
↓ 4 callersMethodcombine
(self, config: Self)
crates/ruff_workspace/src/configuration.rs:618
↓ 4 callersMethodcombine
Logically combine two `TypingReference`s into one. `TypingReference::Runtime` has the highest precedence, followed by `TypingReference::Future`, `Typ
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:106
↓ 4 callersMethodcommand
Creates a pre-configured ruff command for testing. The command is set up with: - The correct ruff binary path - Working directory set to the test dir
crates/ruff/tests/cli/main.rs:216
↓ 4 callersMethodcommand_executor
(&self)
crates/ty_server/src/system.rs:296
↓ 4 callersMethodcomparators
Returns all operands after the initial operand (`[b, c]` in `a < b <= c`). # Panics Panics if there are no operands. See [`Self::first_operand`].
crates/ruff_python_ast/src/nodes.rs:156
↓ 4 callersMethodcompare
(self, a: &str, b: &str)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:40
↓ 4 callersMethodcomparison_semantics
( &self, ty: Type<'db>, operator: ComparisonOperator, )
crates/ty_python_semantic/src/types/equality.rs:544
↓ 4 callersMethodcompute_indentation
Return the slice of source code that represents the indentation of the docstring's opening quotes.
crates/ruff_linter/src/docstrings/mod.rs:45
↓ 4 callersMethodcompute_source_row
Returns the [`SourceRow`] for the given offset.
crates/ruff_linter/src/checkers/ast/mod.rs:438
↓ 4 callersMethodconcat_variadic_typevar
Concatenates an unpacked `TypeVarTuple` as the variable-length portion of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:3095
↓ 4 callersMethodconstructed_class_literal
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/bind/constructor.rs:712
↓ 4 callersMethodconsume_preformatted_line
Updates internal state to reflect the given line and returns whether or not the given line is contained within a preformatted block.
crates/ty_ide/src/docstring/document/preformatted.rs:81
↓ 4 callersMethodcontains
(&self, version: PythonVersion)
crates/ty_module_resolver/src/typeshed.rs:233
↓ 4 callersFunctioncontains_escaped_quote
Return `true` if the haystack contains an escaped quote.
crates/ruff_linter/src/rules/flake8_quotes/helpers.rs:11
↓ 4 callersMethodcontains_range
Returns `true` if the given range is inside a multiline string.
crates/ruff_python_index/src/multiline_ranges.rs:12
↓ 4 callersMethodcontext_mut
Returns a mutable reference to the context
crates/ruff_formatter/src/lib.rs:963
↓ 4 callersFunctionconvert_to_lsp_item
( db: &ProjectDatabase, item: ty_ide::CallHierarchyItem, encoding: PositionEncoding, )
crates/ty_server/src/server/api/requests/prepare_call_hierarchy.rs:79
↓ 4 callersFunctioncreate_constraint_set_with_bounds
( db: &'db TestDb, env: &ProgramEnvironment<'db>, builder: &'c ConstraintSetBuilder<'d
crates/ty_python_semantic/src/types/constraints.rs:5301
↓ 4 callersFunctioncreate_module_names
(raw_names: &[&str])
crates/ty_module_resolver/src/resolve.rs:2323
↓ 4 callersMethodcurrent_expression
Return the current [`Expr`].
crates/ruff_python_semantic/src/model.rs:1511
↓ 4 callersMethodcurrent_expression_grandparent
Return the grandparent [`Expr`] of the current [`Expr`], if any.
crates/ruff_python_semantic/src/model.rs:1521
↓ 4 callersMethodcurrent_function_definition
If the current scope is a (non-lambda) function, return that function's AST node. If the current scope is not a function (or it is a lambda function)
crates/ty_python_semantic/src/types/infer/builder.rs:2195
↓ 4 callersMethodcurrent_reachability_constraints_mut
(&mut self)
crates/ty_python_core/src/builder.rs:1088
↓ 4 callersMethodcurrent_scope_mut
Returns a mutable reference to the current top-most [`Scope`].
crates/ruff_python_semantic/src/model.rs:1574
↓ 4 callersMethodcut_indicator
Set the string used for when a long line is cut. The default for [`DecorStyle::Ascii`] is `...` (three `U+002E` characters).
crates/ruff_annotate_snippets/src/renderer/mod.rs:284
↓ 4 callersMethodcycle_normalized
Normalize for cycle recovery by combining with the previous value and removing divergent types introduced by the cycle. See [`Type::cycle_normalized`
crates/ty_python_semantic/src/types/typevar.rs:2462
↓ 4 callersMethoddangling_index
(&self)
crates/ruff_python_formatter/src/comments/map.rs:523
↓ 4 callersMethoddangling_range
(&self)
crates/ruff_python_formatter/src/comments/map.rs:480
↓ 4 callersMethoddeclaration
(&self)
crates/ty_python_core/src/use_def/place_state.rs:143
↓ 4 callersMethoddeclarations
( &self, owner: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:1424
↓ 4 callersMethoddeclarations_at_binding
( &self, binding: Definition<'db>, )
crates/ty_python_core/src/use_def.rs:1316
↓ 4 callersMethoddeclarations_iterator
( &'map self, declarations: &'map [LiveDeclaration], boundness_analysis: BoundnessAnal
crates/ty_python_core/src/use_def.rs:1479
↓ 4 callersFunctiondeduplicate_nested_paths
Deduplicates identical paths and removes nested paths. # Examples ```rust use ruff_db::system::{SystemPath, deduplicate_nested_paths};/// let paths
crates/ruff_db/src/system/path.rs:953
↓ 4 callersMethoddefault
()
crates/ruff_linter/src/rules/flake8_bandit/settings.rs:22
↓ 4 callersFunctiondefinite_match_pattern_type
Return the values that are guaranteed to match `kind`. Reachability and negative narrowing can only subtract this under-approximation.
crates/ty_python_semantic/src/types/match_pattern.rs:1350
↓ 4 callersMethoddefinitely_has_builtin_binding
Returns whether `name` refers to a standard builtin in the scope containing `node`. This method uses a simplified implementation of name resolution:
crates/ty_python_semantic/src/semantic_model.rs:107
↓ 4 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:625
↓ 4 callersMethoddepth
Returns the depth at which this entry was created relative to the root.
crates/ruff_db/src/system/walk_directory.rs:188
↓ 4 callersFunctiondetect_package_root
Return the package root for the given path to a directory with Python file.
crates/ruff_linter/src/packaging.rs:36
↓ 4 callersMethoddiagnostics_by_source
(self, source: Source)
scripts/conformance.py:310
↓ 4 callersFunctiondict_literal_key_value_types
Recover the key and value types of an immediately consumed dictionary literal, without promoting its elements. The dictionary and its elements must al
crates/ty_python_semantic/src/types/dict.rs:12
↓ 4 callersMethoddigits
Calculate the number of digits in `self`. This is primarily intended for computing the length of the string representation for formatted printing. #
crates/ruff_source_file/src/line_index.rs:659
↓ 4 callersMethoddisplay
Renders the hover to a string using the specified markup kind.
crates/ty_ide/src/hover.rs:336
↓ 4 callersMethoddocumentation_url
(&self)
crates/ty_python_semantic/src/lint.rs:126
↓ 4 callersFunctionduplicate_entry_in_dunder_all
RUF068 This routine checks whether `__all__` contains duplicated entries, and emits a violation if it does.
crates/ruff_linter/src/rules/ruff/rules/duplicate_entry_in_dunder_all.rs:122
↓ 4 callersMethoddyn_clone
(&self)
crates/ty_server/src/system.rs:303
↓ 4 callersFunctiondynamic
A dummy type that is used to generate a schema for `DocstringCodeLineWidth::Dynamic`.
crates/ruff_python_formatter/src/options.rs:456
↓ 4 callersFunctiondynamic_class_bases_argument
Returns the `bases` argument for a dynamic class constructor call. Dynamic class constructors accept `bases` either as the second positional argument
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:156
↓ 4 callersFunctiondynamic_class_header_range
Returns the source range of a call that creates a dynamic class. ```python Color = Enum("Color", "RED GREEN") # ^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
crates/ty_python_semantic/src/types/class.rs:110
↓ 4 callersMethodeat_char2
(&mut self, c1: char, c2: char)
crates/ruff_python_parser/src/lexer/cursor.rs:113
↓ 4 callersMethodeat_if
(&mut self, mut predicate: F)
crates/ruff_python_parser/src/lexer/cursor.rs:136
↓ 4 callersMethodeat_span
Consumes the closing run that matches the most recently returned `opening`. Returns `None` without advancing when no matching run exists.
crates/ty_ide/src/docstring/document/syntax.rs:364
↓ 4 callersMethodeat_whitespace
(&mut self)
crates/ruff_linter/src/noqa.rs:684
↓ 4 callersMethodeditor_settings
(&self)
crates/ruff_server/src/session/settings.rs:167
↓ 4 callersMethodeffective_extra_items
Returns the effective extra-items policy. An implicitly open `TypedDict` behaves like it has read-only extra items of type `object` for these purpose
crates/ty_python_semantic/src/types/typed_dict.rs:111
↓ 4 callersMethodeffective_lower
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, source: EvidenceSourc
crates/ty_python_semantic/src/types/constraints.rs:3503
↓ 4 callersFunctionelements
(n)
crates/ruff_linter/resources/test/fixtures/syntax_errors/async_comprehension.py:1
↓ 4 callersMethodenable
Enables `lint` and configures with the given `severity`. Overrides any previous configuration for the lint.
crates/ty_python_semantic/src/lint.rs:670
↓ 4 callersMethodenable_completion_snippets
Enable or disable the completion snippet capability.
crates/ty_server/tests/e2e/main.rs:1502
↓ 4 callersMethodenclosing_node_key
Return the node key of the given AST node, or the key of the outermost enclosing string literal, if the node originates from inside a stringified anno
crates/ty_python_semantic/src/types/infer/builder.rs:1054
← previousnext →3,101–3,200 of 31,766, ranked by callers