MCPcopy Create free account

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

Functions27,349 in github.com/astral-sh/ruff

↓ 1,493 callersMethodto_string
(&self)
crates/ruff_python_literal/src/escape.rs:90
↓ 1,198 callersFunctiondefault
(other: str = Depends(something_else))
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:161
↓ 741 callersMethodreport_diagnostic
Report a diagnostic if the associated rule is enabled.
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:722
↓ 654 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
↓ 639 callersMethodmap
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/infer.rs:607
↓ 637 callersFunctionprint
(s: str)
crates/ruff_linter/resources/test/fixtures/ruff/RUF030.py:98
↓ 624 callersMethodsemantic
The [`SemanticModel`], built up over the course of the AST traversal.
crates/ruff_linter/src/checkers/ast/mod.rs:524
↓ 543 callersMethodstart
(self)
crates/ruff_text_size/src/range.rs:121
↓ 525 callersMethodexpect
Eat the current token if its of the expected kind, otherwise adds an appropriate error.
crates/ruff_python_parser/src/parser/mod.rs:581
↓ 480 callersMethodjoin
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:343
↓ 441 callersMethodend
(self)
crates/ruff_text_size/src/range.rs:127
↓ 439 callersMethodand_then
Combine two [`Terminal`] operators, with one appearing after the other.
crates/ruff_python_semantic/src/analyze/terminal.rs:182
↓ 387 callersMethodas_ref
(&self)
crates/ruff_db/src/vendored.rs:349
↓ 381 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:422
↓ 351 callersMethodsource
( &mut self, path: impl Into<SystemPathBuf>, contents: impl AsRef<str>,
crates/ty_ide/src/lib.rs:586
↓ 328 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:10693
↓ 325 callersFunctiontest_path
( path: impl AsRef<Path>, settings: &LinterSettings, )
crates/ruff_linter/src/test.rs:127
↓ 320 callersMethodset_fix
(&mut self, fix: Fix)
crates/ruff_linter/src/checkers/ast/mod.rs:3705
↓ 308 callersMethodclone
(&self)
crates/ty_project/src/parallel.rs:73
↓ 296 callersMethodany
(&self, rules: &[Rule])
crates/ruff_linter/src/registry/rule_set.rs:260
↓ 289 callersMethodbuild
(&self)
crates/ty_ide/src/lib.rs:514
↓ 285 callersMethodis_empty
(&self)
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:372
↓ 282 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:1158
↓ 272 callersMethodfilter
(self, db: &'db dyn Db, f: impl FnMut(&Type<'db>) -> bool)
crates/ty_python_semantic/src/types/set_theoretic.rs:253
↓ 271 callersMethoddb
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:640
↓ 256 callersMethodclone
(&self)
crates/ruff_db/src/system/test.rs:32
↓ 253 callersMethoditer
(&'a self)
crates/ruff_linter/src/rules/isort/block.rs:115
↓ 251 callersMethodcollect
(mut self, module: &Mod)
crates/ruff_graph/src/collector.rs:36
↓ 245 callersFunctiondefault
(path: &Path)
crates/ruff_linter/src/rules/isort/mod.rs:380
↓ 234 callersMethodas_ref
(&self)
crates/ty_python_core/src/member.rs:205
↓ 227 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/generics.rs:307
↓ 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:499
↓ 221 callersMethodok
(self)
crates/ruff_linter/resources/test/fixtures/pylint/self_or_cls_assignment.py:28
↓ 221 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:818
↓ 214 callersFunctionflakes
(contents: &str, expected: &[Rule])
crates/ruff_linter/src/rules/pyflakes/mod.rs:1012
↓ 209 callersMethodany
()
crates/ty_python_semantic/src/types.rs:1044
↓ 200 callersMethodas_path
(&self)
crates/ruff_db/src/system/path.rs:583
↓ 196 callersFunctionrange
(x: ops::Range<u32>)
crates/ruff_text_size/tests/main.rs:10
↓ 193 callersMethodslice
(&self, ranged: T)
crates/ruff_linter/src/locator.rs:123
↓ 191 callersMethodmap
(self, f: &F)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:164
↓ 191 callersMethodpush
(self, item: T)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI059.py:12
↓ 186 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:846
↓ 185 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:504
↓ 184 callersMethodreport_lint
Optionally return a builder for a lint diagnostic guard. If the current context believes a diagnostic should be reported for the given lint, then a b
crates/ty_python_semantic/src/types/context.rs:150
↓ 182 callersMethodsettings
The [`LinterSettings`] for the current analysis, including the enabled rules.
crates/ruff_linter/src/checkers/ast/mod.rs:529
↓ 180 callersMethodchars
Returns an iterator over the [`char`]s of each string literal part.
crates/ruff_python_ast/src/nodes.rs:1440
↓ 174 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_type_checking/imports.rs:23
↓ 170 callersMethodcontains
( self, db: &'db dyn Db, bound_typevar: BoundTypeVarIdentity<'db>, )
crates/ty_python_semantic/src/types/generics.rs:518
↓ 169 callersFunctionparsed_module
(db: &dyn Db, file: File)
crates/ruff_db/src/parsed.rs:35
↓ 168 callersMethodtext_len
(&self)
crates/ruff_linter/src/locator.rs:137
↓ 166 callersMethodcollect
( db: &'db dyn Db, ty: Type<'db>, visitor: &StringLiteralCandidatesVisitor
crates/ty_python_semantic/src/semantic_model.rs:539
↓ 166 callersMethoditer
Returns an iterator over the banned aliases.
crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs:56
↓ 162 callersMethodrange
Return the range of the overlong portion of the line.
crates/ruff_linter/src/rules/pycodestyle/overlong.rs:98
↓ 158 callersMethodcollect
( db: &'db dyn Db, ty: Type<'db>, domains: &mut Vec<EnumValueSet<'db>>,
crates/ty_python_semantic/src/types/equality/enums.rs:463
↓ 154 callersMethodbuild
Use this builder to construct a `Completion`. `ctx` is any information about the position of the cursor in the source code that could impact the rele
crates/ty_ide/src/completion.rs:443
↓ 154 callersFunctionlen
(db: &dyn salsa::Database, input: Input)
crates/ruff_db/src/testing.rs:234
↓ 153 callersMethodlen
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:377
↓ 151 callersMethodpush
(&mut self, element: Type<'db>)
crates/ty_python_semantic/src/types/tuple.rs:2452
↓ 150 callersMethodis_none
(&self)
crates/ruff_annotate_snippets/src/renderer/display_list.rs:1022
↓ 148 callersMethodcontains
(&self, expected: &str)
crates/ty_ide/src/completion.rs:10930
↓ 147 callersFunctiondefault
(path: &Path, filename: &Path)
crates/ruff_linter/src/rules/flake8_no_pep420/mod.rs:26
↓ 144 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:581
↓ 140 callersMethoditer
(&self)
crates/ruff_python_ast/src/nodes.rs:202
↓ 139 callersMethodinsert
(&mut self, value: T)
crates/ty_python_semantic/src/types/visitor.rs:332
↓ 137 callersFunctionhover_test
(source: &str)
crates/ty_ide/src/hover.rs:410
↓ 136 callersMethodall
Returns all code actions kinds that the server currently supports.
crates/ruff_server/src/server.rs:274
↓ 132 callersMethodbuild
Build the test server
crates/ty_server/tests/e2e/main.rs:1445
↓ 132 callersMethodis_none
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1218
↓ 130 callersFunctiondedent
(content: &Content)
crates/ruff_formatter/src/builders.rs:780
↓ 130 callersMethodwait_until_workspaces_are_initialized
(mut self)
crates/ty_server/tests/e2e/main.rs:319
↓ 130 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:732
↓ 126 callersMethoditer
(&self)
crates/ty_ide/src/goto.rs:414
↓ 125 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
↓ 125 callersMethodlast
(&self)
crates/ruff_index/src/slice.rs:49
↓ 124 callersMethodpush
(&mut self, component: &str)
crates/ty_module_resolver/src/path.rs:61
↓ 120 callersMethodcomment_ranges
Returns the [`CommentRanges`] for the parsed source code.
crates/ruff_linter/src/checkers/ast/mod.rs:428
↓ 119 callersMethodbinding
(&self, id: BindingId)
crates/ruff_python_semantic/src/model.rs:230
↓ 119 callersMethodmap_err
( &self, result: Result<T, Self::Error<E1>>, _map_err: impl FnOnce(E1) -> E2, )
crates/ty_module_resolver/src/strategy.rs:135
↓ 118 callersMethodpush_str
(&mut self, s: &str)
crates/ruff_python_ast/src/name.rs:47
↓ 114 callersFunctionisinstance
(a, b)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM101.py:46
↓ 114 callersMethodwith_workspace
Add a workspace to the test server with the given root path and options. This option will be used to respond to the `workspace/configuration` request
crates/ty_server/tests/e2e/main.rs:1250
↓ 113 callersMethodas_slice
(&self)
crates/ruff_index/src/vec.rs:52
↓ 110 callersMethodintersects
Returns true if `self` and `other` contain at least one common rule. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let set_1 = Ru
crates/ruff_linter/src/registry/rule_set.rs:141
↓ 109 callersFunctioninlay_hint_test
(source: &str)
crates/ty_ide/src/inlay_hints.rs:808
↓ 109 callersMethodjoin
(mut self)
crates/ty_server/src/server/schedule/thread.rs:88
↓ 109 callersMethodsegments
(&self)
crates/ruff_python_ast/src/name.rs:292
↓ 109 callersMethodtokens
Returns all tokens of the line, including comments and trailing new lines.
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:208
↓ 105 callersMethodclone
(&self)
crates/ruff_python_ast/src/node_index.rs:233
↓ 105 callersMethodlen
Returns the length of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:664
↓ 104 callersMethodtry_set_fix
(&mut self, func: impl FnOnce() -> anyhow::Result<Fix>)
crates/ruff_linter/src/checkers/ast/mod.rs:3720
↓ 104 callersMethodwith_file
Write a file to the test directory
crates/ty_server/tests/e2e/main.rs:1416
↓ 103 callersMethodcontext
(&self)
crates/ruff_python_semantic/src/model.rs:3019
↓ 103 callersFunctionempty
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:118
↓ 103 callersMethodsplit
(self, sep=None, maxsplit=-1)
crates/ruff_linter/resources/test/fixtures/pylint/missing_maxsplit_arg.py:6
↓ 102 callersMethoditer
Returns an iterator over the [`Code`]s in the `noqa` directive.
crates/ruff_linter/src/noqa.rs:115
↓ 101 callersMethoddb
(&self)
crates/ty_python_semantic/src/types/context.rs:100
↓ 101 callersMethodreplace
(&mut self, other: Self, set_to: bool)
crates/ty_python_semantic/src/types/infer.rs:1881
↓ 99 callersMethodwrite_str
(&mut self, s: &str)
crates/ruff_python_ast/src/name.rs:59
↓ 98 callersMethodas_ref
(&self)
crates/ruff_python_ast/src/name.rs:67
↓ 98 callersMethodcomments
(&self)
crates/ruff_python_formatter/src/context.rs:77
next →1–100 of 27,349, ranked by callers