MCPcopy Create free account

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

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

↓ 1,500 callersMethodto_string
(&self)
crates/ruff_python_literal/src/escape.rs:90
↓ 1,223 callersFunctiondefault
(other: str = Depends(something_else))
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:161
↓ 744 callersMethodreport_diagnostic
Report a diagnostic if the associated rule is enabled.
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:722
↓ 656 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
↓ 642 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
↓ 547 callersMethodstart
(self)
crates/ruff_text_size/src/range.rs:121
↓ 530 callersMethodexpect
Eat the current token if its of the expected kind, otherwise adds an appropriate error.
crates/ruff_python_parser/src/parser/mod.rs:652
↓ 458 callersMethodand_then
Combine two [`Terminal`] operators, with one appearing after the other.
crates/ruff_python_semantic/src/analyze/terminal.rs:182
↓ 452 callersMethodend
(self)
crates/ruff_text_size/src/range.rs:127
↓ 427 callersMethodjoin
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:343
↓ 422 callersMethodmap
(self, transform: impl FnOnce(T) -> U)
crates/ty_python_semantic/src/types.rs:1059
↓ 388 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:591
↓ 329 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:10738
↓ 324 callersMethodset_fix
(&mut self, fix: Fix)
crates/ruff_linter/src/checkers/ast/mod.rs:3718
↓ 324 callersFunctiontest_path
( path: impl AsRef<Path>, settings: &LinterSettings, )
crates/ruff_linter/src/test.rs:127
↓ 313 callersMethodclone
(&self)
crates/ty_project/src/parallel.rs:73
↓ 298 callersMethodany
(&self, rules: &[Rule])
crates/ruff_linter/src/registry/rule_set.rs:260
↓ 289 callersMethodbuild
(&self)
crates/ty_ide/src/lib.rs:514
↓ 289 callersMethodfilter
(self, db: &'db dyn Db, f: impl FnMut(&Type<'db>) -> bool)
crates/ty_python_semantic/src/types/set_theoretic.rs:268
↓ 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
↓ 281 callersMethoddb
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:768
↓ 258 callersMethodclone
(&self)
crates/ruff_db/src/system/test.rs:32
↓ 255 callersMethodmap
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/infer.rs:617
↓ 254 callersMethoditer
(&'a self)
crates/ruff_linter/src/rules/isort/block.rs:115
↓ 252 callersMethodcollect
(mut self, module: &Mod)
crates/ruff_graph/src/collector.rs:36
↓ 251 callersMethodas_ref
(&self)
crates/ty_python_core/src/member.rs:201
↓ 247 callersFunctiondefault
(path: &Path)
crates/ruff_linter/src/rules/isort/mod.rs:380
↓ 236 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:309
↓ 231 callersMethodany
()
crates/ty_python_semantic/src/types.rs:1123
↓ 224 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
↓ 222 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
↓ 198 callersMethodmap
(self, f: &F)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:195
↓ 197 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
↓ 195 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:1013
↓ 195 callersMethodslice
(&self, ranged: T)
crates/ruff_linter/src/locator.rs:112
↓ 193 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:515
↓ 190 callersMethodpush
(self, item: T)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI059.py:12
↓ 182 callersMethodcontains
( self, db: &'db dyn Db, bound_typevar: BoundTypeVarIdentity<'db>, )
crates/ty_python_semantic/src/types/generics.rs:530
↓ 180 callersMethodsettings
The [`LinterSettings`] for the current analysis, including the enabled rules.
crates/ruff_linter/src/checkers/ast/mod.rs:529
↓ 179 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
↓ 173 callersMethodcollect
( db: &'db dyn Db, ty: Type<'db>, visitor: &StringLiteralCandidatesVisitor
crates/ty_python_semantic/src/semantic_model.rs:541
↓ 172 callersFunctionparsed_module
(db: &dyn Db, file: File)
crates/ruff_db/src/parsed.rs:35
↓ 172 callersMethodpush_str
(&mut self, literal: &str)
crates/ty_python_semantic/src/types/infer/builder.rs:11726
↓ 170 callersMethodtext_len
(&self)
crates/ruff_linter/src/locator.rs:126
↓ 169 callersMethodcollect
( db: &'db dyn Db, ty: Type<'db>, domains: &mut Vec<EnumValueSet<'db>>,
crates/ty_python_semantic/src/types/equality/enums.rs:459
↓ 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
↓ 161 callersMethodpush
(&mut self, element: Type<'db>)
crates/ty_python_semantic/src/types/tuple.rs:2773
↓ 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:453
↓ 154 callersFunctionlen
(db: &dyn salsa::Database, input: Input)
crates/ruff_db/src/testing.rs:235
↓ 154 callersMethodlen
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:377
↓ 150 callersMethodis_none
(&self)
crates/ruff_annotate_snippets/src/renderer/display_list.rs:1022
↓ 149 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
↓ 148 callersMethodcontains
(&self, expected: &str)
crates/ty_ide/src/completion.rs:10975
↓ 147 callersFunctiondefault
(path: &Path, filename: &Path)
crates/ruff_linter/src/rules/flake8_no_pep420/mod.rs:26
↓ 144 callersMethodinsert
(&mut self, value: T)
crates/ty_python_semantic/src/types/visitor.rs:335
↓ 140 callersMethoditer
(&self)
crates/ruff_python_ast/src/nodes.rs:202
↓ 139 callersMethodis_none
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1303
↓ 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
↓ 135 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
↓ 133 callersFunctiondedent
(content: &Content)
crates/ruff_formatter/src/builders.rs:780
↓ 132 callersMethodbuild
Build the test server
crates/ty_server/tests/e2e/main.rs:1431
↓ 130 callersMethodwait_until_workspaces_are_initialized
(mut self)
crates/ty_server/tests/e2e/main.rs:316
↓ 128 callersMethodpush
(&mut self, component: &str)
crates/ty_module_resolver/src/path.rs:61
↓ 127 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
↓ 124 callersMethoditer
(&self)
crates/ty_ide/src/goto.rs:414
↓ 123 callersMethodlast
(&self)
crates/ruff_index/src/slice.rs:49
↓ 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
↓ 114 callersFunctionisinstance
(a, b)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM101.py:46
↓ 114 callersMethodlen
Returns the length of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:833
↓ 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:1236
↓ 113 callersMethodas_slice
(&self)
crates/ruff_index/src/vec.rs:52
↓ 111 callersMethodjoin
(mut self)
crates/ty_server/src/server/schedule/thread.rs:88
↓ 111 callersFunctionsetup_db
()
crates/ty_python_semantic/src/db.rs:256
↓ 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:809
↓ 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
↓ 108 callersMethodsegments
(&self)
crates/ruff_python_ast/src/name.rs:355
↓ 105 callersMethodclone
(&self)
crates/ruff_python_ast/src/node_index.rs:233
↓ 105 callersMethodsplit
(self, sep=None, maxsplit=-1)
crates/ruff_linter/resources/test/fixtures/pylint/missing_maxsplit_arg.py:6
↓ 104 callersMethoditer
Returns an iterator over the [`Code`]s in the `noqa` directive.
crates/ruff_linter/src/noqa.rs:128
↓ 104 callersMethodreport_lint
( &'ctx self, lint: &'static LintMetadata, ranged: T, )
crates/ty_python_semantic/src/types/call/bind.rs:101
↓ 104 callersMethodtry_set_fix
(&mut self, func: impl FnOnce() -> anyhow::Result<Fix>)
crates/ruff_linter/src/checkers/ast/mod.rs:3733
↓ 104 callersMethodwith_file
Write a file to the test directory
crates/ty_server/tests/e2e/main.rs:1402
↓ 103 callersMethodcontext
(&self)
crates/ruff_python_semantic/src/model.rs:3019
↓ 103 callersMethoddb
(&self)
crates/ty_python_semantic/src/types/context.rs:100
↓ 103 callersFunctionempty
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:118
↓ 103 callersMethodreplace
(&mut self, other: Self, set_to: bool)
crates/ty_python_semantic/src/types/infer.rs:1897
↓ 101 callersMethodas_ref
(&self)
crates/ruff_python_ast/src/name.rs:109
next →1–100 of 27,807, ranked by callers