MCPcopy Create free account

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

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

↓ 1,541 callersMethodto_string
(&self)
crates/ruff_python_literal/src/escape.rs:142
↓ 1,465 callersFunctiondefault
(other: str = Depends(something_else))
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:161
↓ 868 callersMethodmap
( self, db: &'db dyn Db, transform_fn: impl FnMut(&Type<'db>) -> Type<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:2190
↓ 753 callersMethodreport_diagnostic
Report a diagnostic if the associated rule is enabled.
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:723
↓ 724 callersMethodmap
Return this reformatted line, but with the given function applied to the text of the line.
crates/ruff_python_formatter/src/string/docstring.rs:664
↓ 657 callersFunctionprint
(s: str)
crates/ruff_linter/resources/test/fixtures/ruff/RUF030.py:98
↓ 619 callersMethodsemantic
The [`SemanticModel`], built up over the course of the AST traversal.
crates/ruff_linter/src/checkers/ast/mod.rs:543
↓ 601 callersMethodexpect
Eat the current token if its of the expected kind, otherwise adds an appropriate error.
crates/ruff_python_parser/src/parser/mod.rs:618
↓ 558 callersMethodstart
(self)
crates/ruff_text_size/src/range.rs:121
↓ 493 callersMethodclone
(&self)
crates/ty_project/src/parallel.rs:73
↓ 478 callersMethodunwrap_or
(self, fallback: T)
crates/ty_python_semantic/src/types/recursive.rs:771
↓ 477 callersMethodend
(self)
crates/ruff_text_size/src/range.rs:127
↓ 458 callersFunctioncursor_test
A way to create a simple single-file (named `main.py`) cursor test. Use cases that require multiple files with a `<CURSOR>` marker in a file other th
crates/ty_ide/src/lib.rs:429
↓ 452 callersMethodjoin
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:357
↓ 419 callersMethodis_none
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:2720
↓ 411 callersMethodand_then
(self, other: impl FnOnce() -> Self)
crates/ty_python_core/src/lib.rs:1068
↓ 409 callersMethodfilter
(self, db: &'db dyn Db, f: impl FnMut(&Type<'db>) -> bool)
crates/ty_python_semantic/src/types/set_theoretic.rs:535
↓ 402 callersMethodas_ref
(&self)
crates/ruff_db/src/vendored.rs:354
↓ 400 callersMethodsource
( &mut self, path: impl Into<SystemPathBuf>, contents: impl AsRef<str>,
crates/ty_ide/src/lib.rs:595
↓ 373 callersMethodany
()
crates/ty_python_semantic/src/types.rs:2442
↓ 366 callersMethodunwrap_or_else
(self, fallback: impl FnOnce() -> T)
crates/ty_python_semantic/src/types/recursive.rs:762
↓ 364 callersMethoddb
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:934
↓ 348 callersMethodas_ref
(&self)
crates/ty_python_core/src/member.rs:201
↓ 343 callersFunctioncompletion_test_builder
A way to create a simple single-file (named `main.py`) completion test builder. Use cases that require multiple files with a `<CURSOR>` marker in a f
crates/ty_ide/src/completion.rs:11532
↓ 327 callersMethodset_fix
(&mut self, fix: Fix)
crates/ruff_linter/src/checkers/ast/mod.rs:3901
↓ 326 callersFunctiontest_path
( path: impl AsRef<Path>, settings: &LinterSettings, )
crates/ruff_linter/src/test.rs:126
↓ 324 callersMethodbuild
(&self)
crates/ty_ide/src/lib.rs:521
↓ 320 callersMethoditer
This is not an IntoIterator implementation because I have no desire to try to name the iterator type.
crates/ty_python_semantic/src/types/typevar.rs:2026
↓ 310 callersMethodany
(&self, rules: &[Rule])
crates/ruff_linter/src/registry/rule_set.rs:256
↓ 292 callersMethodis_empty
(&self)
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:374
↓ 277 callersMethodok
(self)
crates/ruff_linter/resources/test/fixtures/pylint/self_or_cls_assignment.py:28
↓ 274 callersMethodclone
(&self)
crates/ruff_db/src/system/test.rs:32
↓ 274 callersMethodto_string
Returns the text representation of this goto target. Returns `None` if no meaningful string representation can be provided. This is used by the "refer
crates/ty_ide/src/goto.rs:912
↓ 266 callersMethoditer
(&'a self)
crates/ruff_linter/src/rules/isort/block.rs:115
↓ 261 callersMethodcontains
( self, db: &'db dyn Db, bound_typevar: BoundTypeVarIdentity<'db>, )
crates/ty_python_semantic/src/types/generics.rs:568
↓ 260 callersMethodcollect
(mut self, module: &Mod)
crates/ruff_graph/src/collector.rs:36
↓ 259 callersMethodcollect
Append deprecations without discarding earlier union alternatives when a non-deprecated intersection member suppresses the current alternative's warni
crates/ty_python_semantic/src/types/call/bind.rs:983
↓ 252 callersFunctiondefault
(path: &Path)
crates/ruff_linter/src/rules/isort/mod.rs:384
↓ 251 callersMethodload
Loads an [`OwnedConstraintSet`] into this builder. The BDD structure inside a builder depends on the ordering of constraints and typevars in the buil
crates/ty_python_semantic/src/types/constraints.rs:1258
↓ 250 callersMethodresolve_qualified_name
Resolves the [`Expr`] to a fully-qualified symbol-name, if `value` resolves to an imported or builtin symbol. E.g., given: ```python from sys impor
crates/ruff_python_semantic/src/model.rs:1197
↓ 249 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:926
↓ 244 callersMethodpush
(&mut self, element: T)
crates/ty_python_semantic/src/types/tuple.rs:2972
↓ 242 callersMethodspan
Annotate a byte span within [`Snippet`]
crates/ruff_annotate_snippets/src/snippet.rs:434
↓ 241 callersFunctionsetup_db
()
crates/ty_python_semantic/src/db.rs:338
↓ 238 callersMethodelement
Append an [`Element`] that adds context to the [`Title`]
crates/ruff_annotate_snippets/src/snippet.rs:84
↓ 233 callersMethoddecor_style
Set the character set used for rendering decor
crates/ruff_annotate_snippets/src/renderer/mod.rs:176
↓ 230 callersFunctionparsed_module
(db: &dyn Db, file: PythonFile<'_>)
crates/ruff_db/src/parsed.rs:35
↓ 224 callersMethodprimary_title
For the primary, or root cause, [`Group`][crate::Group] (the first) in a [`Report`][crate::Report] See [`Group::with_title`][crate::Group::with_title
crates/ruff_annotate_snippets/src/level.rs:82
↓ 223 callersMethodlocator
The [`Locator`] for the current file, which enables extraction of source code from byte offsets.
crates/ruff_linter/src/checkers/ast/mod.rs:518
↓ 221 callersMethodannotation
Highlight and describe a span of text within the [`source`][Self::source]
crates/ruff_annotate_snippets/src/snippet.rs:319
↓ 221 callersMethodcollect
Append deprecated implementations, preserving earlier entries if a non-deprecated intersection alternative suppresses this accessor's deprecations.
crates/ty_python_semantic/src/types.rs:5073
↓ 218 callersMethodinto_diagnostic
Create a new lint diagnostic guard. This initializes a new diagnostic using the given message along with the ID and severity derived from the `LintMe
crates/ty_python_semantic/src/types/context.rs:744
↓ 214 callersFunctionflakes
(contents: &str, expected: &[Rule])
crates/ruff_linter/src/rules/pyflakes/mod.rs:986
↓ 213 callersMethodbuild
Build the test server
crates/ty_server/tests/e2e/main.rs:1651
↓ 211 callersMethodelements
Returns an iterator over all the [`InterpolatedStringElement`] contained in this value. An f-string element is what makes up an [`FString`] i.e., it
crates/ruff_python_ast/src/nodes.rs:642
↓ 210 callersMethodwait_until_workspaces_are_initialized
(mut self)
crates/ty_server/tests/e2e/main.rs:326
↓ 205 callersFunctionplain
(a: T, b: T)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/generics_wrapping.py:1
↓ 205 callersMethodprogram
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:76
↓ 203 callersMethodpush_str
(&mut self, literal: &str)
crates/ty_python_semantic/src/types/infer/builder.rs:13293
↓ 199 callersFunctionrange
(x: ops::Range<u32>)
crates/ruff_text_size/tests/main.rs:10
↓ 197 callersMethodas_path
(&self)
crates/ruff_db/src/system/path.rs:597
↓ 197 callersMethodpush
(&mut self, definition: Definition<'db>)
crates/ty_python_core/src/definition.rs:286
↓ 195 callersMethodmap
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/infer/type_context.rs:96
↓ 195 callersMethodslice
(&self, ranged: T)
crates/ruff_linter/src/locator.rs:101
↓ 191 callersMethodchars
Returns an iterator over the [`char`]s of each string literal part.
crates/ruff_python_ast/src/nodes.rs:1636
↓ 189 callersMethodpush
(self, item: T)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI059.py:12
↓ 188 callersMethodand_then
Combine two [`Terminal`] operators, with one appearing after the other.
crates/ruff_python_semantic/src/analyze/terminal.rs:182
↓ 188 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_type_checking/imports.rs:23
↓ 188 callersMethodsettings
The [`LinterSettings`] for the current analysis, including the enabled rules.
crates/ruff_linter/src/checkers/ast/mod.rs:548
↓ 188 callersFunctionwith_files
Creates a file system with the given files. The content of all files will be empty.
crates/ruff_db/src/system/memory_fs.rs:753
↓ 186 callersMethodjoin
(mut self)
crates/ty_server/src/server/schedule/thread.rs:88
↓ 182 callersMethodpath
The location of the [`source`][Self::source] (e.g. a path) <div class="warning"> Text passed to this function is considered "untrusted input", as su
crates/ruff_annotate_snippets/src/snippet.rs:295
↓ 177 callersMethodwith_workspace
Add a workspace to the test server with the given root path and options. An existing file can also be used to model clients that send file-valued work
crates/ty_server/tests/e2e/main.rs:1393
↓ 174 callersMethodinsert
( &mut self, base: DisjointBase<'db>, node_index: usize, class: ClassLiteral<'
crates/ty_python_semantic/src/types/diagnostic.rs:3659
↓ 172 callersFunctionlen
(db: &dyn salsa::Database, input: Input)
crates/ruff_db/src/testing.rs:241
↓ 171 callersMethodbuild
Use this builder to construct a `Completion`. `env` is any information about the position of the cursor in the source code that could impact the rele
crates/ty_ide/src/completion.rs:492
↓ 169 callersMethodrange
Return the range of the overlong portion of the line.
crates/ruff_linter/src/rules/pycodestyle/overlong.rs:93
↓ 167 callersMethoditer
Returns an iterator over the banned aliases.
crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs:57
↓ 166 callersFunctiondedent
(content: &Content)
crates/ruff_formatter/src/builders.rs:786
↓ 163 callersMethodannotate
Add an annotation to this diagnostic. Annotations for a diagnostic are optional, but if any are added, callers should strive to make at least one of
crates/ruff_db/src/diagnostic/mod.rs:146
↓ 162 callersMethoditer
(&self)
crates/ty_ide/src/goto.rs:475
↓ 159 callersMethodmap_err
( &self, result: Result<T, Self::Error<E1>>, _map_err: impl FnOnce(E1) -> E2, )
crates/ty_module_resolver/src/strategy.rs:135
↓ 159 callersFunctionsystem_path_to_file
(db: &dyn Db, path: impl AsRef<SystemPath>)
crates/ruff_db/src/files.rs:37
↓ 157 callersMethodwith_file
Write a file to the test directory
crates/ty_server/tests/e2e/main.rs:1623
↓ 156 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:13072
↓ 156 callersMethodlabel
Describe the reason the span is highlighted This will be styled according to the [`AnnotationKind`] <div class="warning"> Text passed to this funct
crates/ruff_annotate_snippets/src/snippet.rs:378
↓ 155 callersMethodcontains
(&self, expected: &str)
crates/ty_ide/src/completion.rs:11771
↓ 155 callersMethodlen
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:377
↓ 154 callersFunctionhover_test
(source: &str)
crates/ty_ide/src/hover.rs:518
↓ 152 callersMethodall
Creates a new rule selection from all known lints in the registry, including lints that are default by default. Lints that are disabled by default use
crates/ty_python_semantic/src/lint.rs:619
↓ 149 callersFunctiondefault
(path: &Path, filename: &Path)
crates/ruff_linter/src/rules/flake8_no_pep420/mod.rs:26
↓ 142 callersMethodopen_text_document
Send a `textDocument/didOpen` notification
crates/ty_server/tests/e2e/main.rs:875
↓ 142 callersFunctionsemantic_index
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:77
↓ 141 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/callable.rs:1202
↓ 140 callersMethodlast
(&self)
crates/ruff_index/src/slice.rs:49
↓ 139 callersMethoddb
(&self)
crates/ty_python_semantic/src/types/context.rs:245
↓ 138 callersMethoditer
Iterates over each comparison as `(left, operator, right)`. For `a < b <= c`, yields `(a, <, b)` followed by `(b, <=, c)`.
crates/ruff_python_ast/src/nodes.rs:158
↓ 137 callersMethodall
Returns all code actions kinds that the server currently supports.
crates/ruff_server/src/server.rs:310
↓ 136 callersMethodor_else
(self, other: impl Fn() -> Self)
crates/ty_python_core/src/lib.rs:1094
↓ 135 callersMethodas_str
Returns a human-readable name for this variance, matching the keyword argument names used in `TypeVar(covariant=True)` / `TypeVar(contravariant=True)`
crates/ty_python_semantic/src/types/variance.rs:200
next →1–100 of 31,562, ranked by callers