MCPcopy Create free account

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

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

↓ 12 callersMethodwith_definition
Create a new signature with the given definition.
crates/ty_python_semantic/src/types/signatures.rs:2516
↓ 12 callersFunctionworkspace_case
()
crates/ty/tests/cli/uv_workspace.rs:18
↓ 12 callersMethodwrite
(&self, f: &mut std::fmt::Formatter, start_range: bool)
crates/ruff/src/args.rs:1325
↓ 12 callersMethodwrite_element
(&mut self, element: FormatElement)
crates/ruff_formatter/src/buffer.rs:139
↓ 11 callersMethodadd_or_constraint
( &mut self, a: ScopedNarrowingConstraint, b: ScopedNarrowingConstraint, )
crates/ty_python_core/src/narrowing_constraints.rs:295
↓ 11 callersMethodadd_symbol
Add a symbol to the place table and the use-def map. Return the [`ScopedPlaceId`] that uniquely identifies the symbol in both.
crates/ty_python_core/src/builder.rs:1374
↓ 11 callersMethodadd_token
( &mut self, ranged: impl Ranged, token_type: SemanticTokenType, modifiers: Se
crates/ty_ide/src/semantic_tokens.rs:333
↓ 11 callersMethodall_end_of_scope_symbol_declarations
( &'map self, )
crates/ty_python_core/src/use_def.rs:1430
↓ 11 callersFunctionapply_changes_and_synchronize_project
Applies watcher events, requests any resulting uv project refresh, and waits for pending uv synchronizations to finish.
crates/ty/tests/file_watching.rs:4518
↓ 11 callersMethodapply_type_mapping_impl
( &self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: TypeContex
crates/ty_python_semantic/src/types/signatures.rs:291
↓ 11 callersMethodas_char
Get the character used to represent this quote.
crates/ruff_linter/src/rules/flake8_quotes/settings.rs:75
↓ 11 callersMethodas_paramspec_with_prefix
Returns the prefix parameters and bound `ParamSpec` if this parameter list is either `P` or `Concatenate[<prefix-params>, P]`. For the narrower bare-
crates/ty_python_semantic/src/types/signatures.rs:5318
↓ 11 callersMethodas_single_part_string
Return `Some(literal)` if the string only consists of a single `StringLiteral` part (indicating that it is not implicitly concatenated). Otherwise, re
crates/ruff_python_ast/src/nodes.rs:1510
↓ 11 callersMethodas_str
(self)
crates/ty_ide/src/completion.rs:773
↓ 11 callersFunctionassert_no_match
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:382
↓ 11 callersMethodassignability_error_context
Re-run the assignability check with error context collection enabled. This should normally be called when `is_assignable_to` has returned `false` and
crates/ty_python_semantic/src/types/relation.rs:506
↓ 11 callersMethodbind_self_typevars
Bind `Self` type variables in this type to a concrete self type. Uses MRO-based matching: a `Self` typevar is only bound if its owner class is in the
crates/ty_python_semantic/src/types.rs:2612
↓ 11 callersMethodcallable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:316
↓ 11 callersMethodcell
Returns the (raw) cell number (1-based) for the given row (1-based).
crates/ruff_notebook/src/index.rs:29
↓ 11 callersFunctioncheck_types
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/types.rs:202
↓ 11 callersMethodclass_member_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, po
crates/ty_python_semantic/src/types.rs:4486
↓ 11 callersMethodcmp
Group diagnostics by file and sort them in source order. For diagnostics at the same location, fall back to severity (with fatal messages sorting befo
crates/ruff_db/src/diagnostic/mod.rs:528
↓ 11 callersFunctioncode_actions_at
( server: &TestServer, diagnostics: DocumentDiagnosticReport, file: &SystemPath, range: Range,
crates/ty_server/tests/e2e/code_actions.rs:6
↓ 11 callersMethodcommand
(&self)
crates/ty/tests/common/mod.rs:149
↓ 11 callersMethodcontext
Return the [`LintContext`] for the current analysis. Note that you should always prefer calling methods like `settings`, `report_diagnostic`, or `is_
crates/ruff_linter/src/checkers/ast/mod.rs:694
↓ 11 callersMethodcreate_directory_all
Creates a directory at `path`. All enclosing directories are created if they don't exist.
crates/ruff_db/src/system/memory_fs.rs:324
↓ 11 callersMethoddataclass_transformer_params
(self)
crates/ty_python_semantic/src/types/class.rs:309
↓ 11 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:324
↓ 11 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:223
↓ 11 callersMethoddefinition
Returns the [`Definition`] of this function. ## Warning This uses the semantic index to find the definition of the function. This means that if the
crates/ty_python_semantic/src/types/function.rs:462
↓ 11 callersMethoddid_change_watched_files
Send a `workspace/didChangeWatchedFiles` notification with the given file events
crates/ty_server/tests/e2e/main.rs:949
↓ 11 callersMethoddisplay
(self, python_version: PythonVersion)
crates/ty_python_semantic/src/types/class/known.rs:1230
↓ 11 callersMethoddomain
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1137
↓ 11 callersMethodedits
Return a slice of the [`Edit`] elements in the [`Fix`], sorted by [`Edit::start`] in ascending order.
crates/ruff_diagnostics/src/fix.rs:149
↓ 11 callersMethodenv_clear
Clears the inherited environment and any variables previously set on this command.
crates/ruff_db/src/system/command.rs:49
↓ 11 callersMethodfallback_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/literal.rs:268
↓ 11 callersMethodfields
Returns a list of all annotated attributes defined in this class, or any of its superclasses. See [`StaticClassLiteral::own_fields`] for more details
crates/ty_python_semantic/src/types/class/static_literal.rs:2603
↓ 11 callersMethodfile
(&self)
crates/ty_python_semantic/src/semantic_model.rs:70
↓ 11 callersFunctionfile_system
()
crates/ty_vendored/src/lib.rs:18
↓ 11 callersMethodfile_uri
(&self, path: impl AsRef<Path>)
crates/ruff_server/tests/e2e/main.rs:666
↓ 11 callersMethodfiles
(&self)
crates/ruff_db/src/lib.rs:200
↓ 11 callersMethodfirst
(&self)
crates/ruff_linter/src/suppression.rs:188
↓ 11 callersMethodfirst_operand
Returns the initial operand (`a` in `a < b <= c`). # Panics Panics if there are no operands. The parser always produces at least two operands, synth
crates/ruff_python_ast/src/nodes.rs:125
↓ 11 callersMethodfocus_range
(&self)
crates/ty_ide/src/lib.rs:157
↓ 11 callersMethodhas_starred_annotation
Return `true` if this parameter has an unpacked variadic annotation, e.g. `*args: *Ts`, `*args: Unpack[Ts]`, or `*args: *tuple[int, *tuple[str, ...],
crates/ty_python_semantic/src/types/signatures.rs:6343
↓ 11 callersMethodheader_range
Returns the range of the class's "header". For static classes, this is the class name and any arguments passed to the `class` statement. For dynamic
crates/ty_python_semantic/src/types/class.rs:903
↓ 11 callersMethodhide_severity
Whether to hide a diagnostic's severity or not.
crates/ruff_db/src/diagnostic/mod.rs:1507
↓ 11 callersMethodhover_request
Send a `textDocument/hover` request for the document at the given path and position.
crates/ty_server/tests/e2e/main.rs:1091
↓ 11 callersMethodignore_possibly_undefined
Returns the type of the place, ignoring possible undefinedness. If the place is *definitely* undefined, this function will return `None`. Otherwise,
crates/ty_python_semantic/src/place.rs:292
↓ 11 callersMethodinto_unfolded
(self)
crates/ty_python_semantic/src/types/recursive.rs:718
↓ 11 callersMethodis_absolute
(&self)
crates/ruff_db/src/system/path.rs:82
↓ 11 callersMethodis_assignability
(self)
crates/ty_python_semantic/src/types/relation.rs:176
↓ 11 callersMethodis_assignment
(&self, expr: &Expr)
crates/ruff_linter/src/rules/pylint/helpers.rs:98
↓ 11 callersMethodis_bound
(self)
crates/ty_python_core/src/place.rs:132
↓ 11 callersFunctionis_const_true
Return `true` if an [`Expr`] is a literal `True`.
crates/ruff_python_ast/src/helpers.rs:838
↓ 11 callersMethodis_data_descriptor
Returns whether this type is a data descriptor, i.e. defines `__set__` or `__delete__`. If this type is a union, requires all elements of union to be
crates/ty_python_semantic/src/types.rs:5590
↓ 11 callersFunctionis_dict
Test whether the given binding can be considered a dictionary. For this, we check what value might be associated with it through it's initialization,
crates/ruff_python_semantic/src/analyze/typing.rs:1053
↓ 11 callersFunctionis_dunder
(id: &str)
crates/ruff_python_ast/src/helpers.rs:780
↓ 11 callersMethodis_empty
(&self)
crates/mdtest/src/matcher.rs:52
↓ 11 callersMethodis_empty
Returns `true` if there are no deferred nodes.
crates/ruff_linter/src/checkers/ast/deferred.rs:20
↓ 11 callersMethodis_future_import
Returns `true` if this import statement is a `__future__` import for the given Python version. In Python < 3.13, relative imports from `.__future__`
crates/ruff_python_ast/src/nodes.rs:56
↓ 11 callersFunctionis_keyword_only_argument_non_default
(arguments: &Arguments, name: &str)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:9
↓ 11 callersMethodis_local
Is the symbol defined in this scope, vs referring to some enclosing scope? There are three common cases where a name refers to an enclosing scope: 1
crates/ty_python_core/src/symbol.rs:123
↓ 11 callersMethodis_nonlocal
Is the symbol `nonlocal` its containing scope?
crates/ty_python_core/src/symbol.rs:86
↓ 11 callersMethodis_read_only
(&self)
crates/ty_python_semantic/src/types/class.rs:2823
↓ 11 callersMethodis_trivially_always_satisfied
Returns `true` if this constraint set's root is the `always` terminal. This is only a cheap sufficient check. A nonterminal constraint set can also b
crates/ty_python_semantic/src/types/constraints.rs:307
↓ 11 callersMethodis_vendored_path
(&self)
crates/ruff_db/src/files/path.rs:58
↓ 11 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1760
↓ 11 callersMethodjoin
Combine occurrences without discarding symbolic dependencies at `Invariant`. Only evaluation can short-circuit there: later terms can still connect a
crates/ty_python_semantic/src/types/variance/equations.rs:46
↓ 11 callersMethodjoin_comma_separated
( &'fmt mut self, sequence_end: TextSize, )
crates/ruff_python_formatter/src/builders.rs:75
↓ 11 callersMethodjoin_with
Joins the objects by placing the specified separator between every two items. ## Examples Joining different tokens by separating them with a comma a
crates/ruff_formatter/src/formatter.rs:110
↓ 11 callersMethodkind
(&self)
crates/ruff_db/src/vendored.rs:313
↓ 11 callersMethodkind
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:328
↓ 11 callersMethodlast_component
(&self)
crates/ty_module_resolver/src/module_name.rs:114
↓ 11 callersMethodleading_dangling_trailing
Returns an iterator over the [leading](self#leading-comments), [dangling](self#dangling-comments), and [trailing](self#trailing) comments of `node`.
crates/ruff_python_formatter/src/comments/mod.rs:364
↓ 11 callersMethodlen
(&self)
crates/ty_project/src/files.rs:215
↓ 11 callersMethodline_end
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:67
↓ 11 callersMethodmark_formatted
Marks the comment as formatted
crates/ruff_python_formatter/src/comments/mod.rs:146
↓ 11 callersMethodmember_lookup_with_policy_and_receiver
Perform member lookup while optionally binding descriptors and `Self` to a more precise receiver than the type whose members are being searched. Inte
crates/ty_python_semantic/src/types.rs:6049
↓ 11 callersMethodname
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:892
↓ 11 callersMethodnext
(&mut self)
crates/ruff_python_trivia/src/tokenizer.rs:801
↓ 11 callersMethodnormalize_path
(&self, path: &'a SystemPath)
crates/ty_test/src/db.rs:489
↓ 11 callersMethodparameter_documentation
Extract parameter documentation from popular docstring formats. Returns a map of parameter names to their documentation.
crates/ty_ide/src/docstring.rs:39
↓ 11 callersMethodparent_statement_id
Given a [`NodeId`], return the [`NodeId`] of the parent statement, if any.
crates/ruff_python_semantic/src/model.rs:1677
↓ 11 callersFunctionparenthesized
Formats `content` enclosed by the `left` and `right` parentheses. The implementation also ensures that expanding the parenthesized expression (or any
crates/ruff_python_formatter/src/expression/parentheses.rs:109
↓ 11 callersMethodpartition
(self)
crates/ruff/src/args.rs:90
↓ 11 callersMethodpath
The full path that this entry represents.
crates/ruff_db/src/system/walk_directory.rs:172
↓ 11 callersMethodquote
(&self)
crates/ruff_python_codegen/src/stylist.rs:23
↓ 11 callersMethodrange
(&self)
crates/ty_project/src/metadata/value.rs:60
↓ 11 callersMethodrange
(&self)
crates/ruff_python_parser/src/semantic_errors.rs:1568
↓ 11 callersMethodrestore
Restore the semantic model to the given [`Snapshot`].
crates/ruff_python_semantic/src/model.rs:2094
↓ 11 callersMethodreverse
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1391
↓ 11 callersMethodrules
Return the rules in this category.
crates/ruff_linter/src/codes.rs:185
↓ 11 callersMethodrun
(self, username)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S602.py:34
↓ 11 callersMethodsettings
(&self)
crates/ty_test/src/db.rs:57
↓ 11 callersMethodseverity
Returns the severity of this diagnostic. Note that this may be different than the severity of sub-diagnostics.
crates/ruff_db/src/diagnostic/mod.rs:288
↓ 11 callersMethodshow_error_message
Sends a request to display an error to the client with a formatted message. The error is sent in a `window/showMessage` notification. Logs an error i
crates/ruff_server/src/session/client.rs:198
↓ 11 callersMethodsignature
(&self, db: &'db dyn Db, signature: &Signature<'db>)
crates/ty_python_semantic/src/types/constraints/resolution.rs:155
↓ 11 callersMethodslice
Returns the location of the comment in the original source code. Allows retrieving the text of the comment.
crates/ruff_python_formatter/src/comments/mod.rs:137
↓ 11 callersFunctionsource_text_slice
Emits a text as it is written in the source document. Optimized to avoid allocations.
crates/ruff_formatter/src/builders.rs:376
← previousnext →1,401–1,500 of 31,766, ranked by callers