MCPcopy Create free account

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

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

↓ 101 callersMethodwrite_str
(&mut self, s: &str)
crates/mdtest/src/lib.rs:276
↓ 100 callersMethodinfo
Adds an "info" sub-diagnostic with the given message. If callers want to add an "info" sub-diagnostic with annotations, then create a [`SubDiagnostic
crates/ruff_db/src/diagnostic/mod.rs:168
↓ 100 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:11785
↓ 99 callersFunctiononce
()
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:92
↓ 99 callersMethodtypevar
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/bound_super.rs:31
↓ 98 callersMethodcomments
(&self)
crates/ruff_python_formatter/src/context.rs:77
↓ 97 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:497
↓ 96 callersMethodas_std_path
(&self)
crates/ruff_db/src/system/path.rs:382
↓ 96 callersMethodor_else
(self, other: impl Fn() -> Self)
crates/ty_python_core/src/lib.rs:988
↓ 96 callersFunctionsystem_path_to_file
(db: &dyn Db, path: impl AsRef<SystemPath>)
crates/ruff_db/src/files.rs:37
↓ 95 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:561
↓ 94 callersMethodcontains
(&self, rule: Rule)
crates/ruff_linter/src/registry/rule_set.rs:249
↓ 94 callersMethodstarts_with
(&self, base: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:121
↓ 93 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:105
↓ 93 callersMethodstrip_prefix
( &self, base: impl AsRef<SystemPath>, )
crates/ruff_db/src/system/path.rs:323
↓ 92 callersMethodbuild
(self)
crates/ty_module_resolver/src/testing.rs:209
↓ 92 callersMethodlen
(&self)
crates/ruff_python_ast/src/nodes.rs:206
↓ 92 callersMethodto_path_buf
Converts the path to an owned [`SystemPathBuf`].
crates/ruff_db/src/system/path.rs:370
↓ 91 callersMethodhighlight_file
Get semantic tokens for the entire file
crates/ty_ide/src/semantic_tokens.rs:4710
↓ 91 callersMethodset_primary_message
Set the message on the primary annotation for this diagnostic. If a message already exists on the primary annotation, then this overwrites the existi
crates/ty_python_semantic/src/types/context.rs:292
↓ 90 callersMethodargs
(mut self, args: impl IntoIterator<Item = &'a str>)
crates/ruff/tests/integration_test.rs:66
↓ 89 callersMethodkind
(self)
crates/ty_python_semantic/src/types/literal.rs:175
↓ 89 callersMethodopen_text_document
Send a `textDocument/didOpen` notification
crates/ty_server/tests/e2e/main.rs:794
↓ 89 callersMethodseen_module
Return `true` if the [`Module`] was "seen" anywhere in the semantic model. This is used as a fast path to avoid unnecessary work when resolving symbol
crates/ruff_python_semantic/src/model.rs:1712
↓ 89 callersMethodvalue
(self)
crates/ty_python_semantic/src/types/typevar.rs:718
↓ 88 callersMethodget
Returns the type that a typevar is mapped to, or None if the typevar isn't part of this mapping.
crates/ty_python_semantic/src/types/generics.rs:1281
↓ 88 callersMethodlen
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:157
↓ 88 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
↓ 88 callersMethodstart
(&self)
crates/ty_ide/src/importer.rs:503
↓ 87 callersMethodbuild
Generate a [`Command`] for the `ruff check` command.
crates/ruff/tests/integration_test.rs:72
↓ 87 callersMethodfirst
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1135
↓ 87 callersFunctionsemantic_index
(db: &dyn Db, file: File)
crates/ty_python_core/src/lib.rs:69
↓ 86 callersMethodas_str
(self)
crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs:107
↓ 86 callersMethodis_rule_enabled
(&self, rule: Rule)
crates/ruff_linter/src/checkers/ast/mod.rs:552
↓ 86 callersMethodrange
(&self)
crates/ruff_linter/src/rules/pylint/rules/non_slot_assignment.rs:96
↓ 85 callersMethodexpr
Returns the expression contained in this parsed output.
crates/ruff_python_parser/src/lib.rs:540
↓ 85 callersMethodflatten
Flattens the hierarchical binary expression into a flat operand, operator, operand... sequence. See [`FlatBinaryExpressionSlice`] for an in depth exp
crates/ruff_python_formatter/src/expression/binary_like.rs:34
↓ 85 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1340
↓ 84 callersMethodrange
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:533
↓ 83 callersMethodclone
(this: &Self)
crates/ty_server/src/session/request_queue.rs:153
↓ 83 callersMethodinfer_expression
(&mut self, expression: &ast::Expr, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:5877
↓ 83 callersMethodto_str
Returns the concatenated string value as a [`str`]. Note that this will perform an allocation on the first invocation if the string value is implicit
crates/ruff_python_ast/src/nodes.rs:1448
↓ 82 callersMethodends_with
(&self, child: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:145
↓ 82 callersMethodnode_range
(&self, start: TextSize)
crates/ruff_python_parser/src/parser/mod.rs:321
↓ 82 callersMethodto_instance
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/class/known.rs:1033
↓ 81 callersMethodfind
Recognizes the beginning of a fenced code block if one is present on the given line.
crates/ty_ide/src/docstring/document/preformatted.rs:19
↓ 80 callersMethodmatch_builtin_expr
Return `true` if `expr` is a reference to `builtins.$target`, i.e. either `object` (where `object` is not overridden in the global scope), or `builtin
crates/ruff_python_semantic/src/model.rs:405
↓ 79 callersMethodas_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2680
↓ 79 callersMethodfind_keyword
Return the [`Keyword`] with the given name, or `None` if no such [`Keyword`] exists.
crates/ruff_python_ast/src/nodes.rs:3556
↓ 79 callersMethodmessage
(&self)
crates/ty_wasm/src/lib.rs:889
↓ 78 callersMethodfold
Hide lines without [`Annotation`]s
crates/ruff_annotate_snippets/src/snippet.rs:139
↓ 78 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/callable.rs:761
↓ 78 callersMethodtitle
(self, title: &str)
crates/ruff_annotate_snippets/src/snippet.rs:190
↓ 76 callersFunctionopen
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC230.py:75
↓ 76 callersFunctionwrite
( output: &mut dyn Buffer<Context = Context>, args: Arguments<Context>, )
crates/ruff_formatter/src/lib.rs:859
↓ 75 callersMethodgenerator
Create a [`Generator`] to generate source code based on the current AST state.
crates/ruff_linter/src/checkers/ast/mod.rs:337
↓ 75 callersMethodintersects
Returns `true` if the given range intersects with any comment range.
crates/ruff_python_trivia/src/comment_ranges.rs:79
↓ 75 callersFunctionparse_suite
(source: &str)
crates/ruff_python_parser/src/string.rs:544
↓ 75 callersFunctionplain
(a: T, b: T)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/generics_wrapping.py:1
↓ 75 callersMethodsaturating_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:123
↓ 75 callersFunctionsource_text
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:16
↓ 74 callersMethodmemory_file_system
Returns the memory file system. ## Panics If the underlying test system isn't the [`InMemorySystem`].
crates/ruff_db/src/system/test.rs:79
↓ 74 callersFunctionstr
(s)
crates/ruff_linter/resources/test/fixtures/ruff/RUF065_0.py:37
↓ 73 callersMethodclass_literal
Returns the underlying class literal for this class, ignoring any specialization. For a non-generic class, this returns the class literal directly. F
crates/ty_python_semantic/src/types/class.rs:1065
↓ 73 callersMethodfind_argument_value
Return the value for the argument with the given name or at the given position, or `None` if no such argument exists. Used to retrieve argument values
crates/ruff_python_ast/src/nodes.rs:3574
↓ 73 callersMethodis_enabled
(self)
crates/ruff_linter/src/settings/flags.rs:15
↓ 72 callersMethodbuild
(self)
crates/ty_python_semantic/src/types/tuple.rs:2989
↓ 72 callersMethodis_assignable_to
Return true if this type is assignable to type `target`. See `TypeRelation::Assignability` for more details.
crates/ty_python_semantic/src/types/relation.rs:364
↓ 72 callersMethoditer
(&self)
crates/ty_python_core/src/place.rs:333
↓ 71 callersMethodbump
Bumps the current token assuming it is of the given kind. # Panics If the current token is not of the given kind.
crates/ruff_python_parser/src/parser/mod.rs:446
↓ 71 callersMethodcontents
The contents of the docstring, including the opening and closing quotes.
crates/ruff_linter/src/docstrings/mod.rs:30
↓ 71 callersMethodsnippet
(mut self, slice: Snippet<'a>)
crates/ruff_annotate_snippets/src/snippet.rs:46
↓ 71 callersMethodvalue_type
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:393
↓ 70 callersMethodfind
(&self, policy: &NameMatchPolicy)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:152
↓ 70 callersMethodjoin
(&self, component: &str)
crates/ty_module_resolver/src/path.rs:904
↓ 70 callersMethodwrite_file
Writes a file to the test directory. Parent directories are created automatically if they don't exist. Content is dedented to remove common leading w
crates/ruff/tests/cli/main.rs:148
↓ 69 callersMethodadd_error
(&mut self, error: ParseErrorType, ranged: T)
crates/ruff_python_parser/src/parser/mod.rs:668
↓ 69 callersMethodis_stub
Returns `true` if the file should be analyzed as a type stub.
crates/ruff_db/src/files.rs:567
↓ 68 callersFunctionassert_lexed_ranges_match_slices
( directive: Result<Option<NoqaLexerOutput>, LexicalError>, source: &str, )
crates/ruff_linter/src/noqa.rs:1487
↓ 68 callersMethodhas_builtin_binding
Return `true` if `member` is bound as a builtin *in the scope we are currently visiting*. Note that a "builtin binding" does *not* include explicit l
crates/ruff_python_semantic/src/model.rs:357
↓ 68 callersFunctionlist
(*args, **kwargs)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C400.py:31
↓ 68 callersMethodsymbol_id
Returns the [`ScopedSymbolId`] of the place named `name`.
crates/ty_python_core/src/place.rs:242
↓ 68 callersMethodtarget_version
Return the [`PythonVersion`] to use for version-related lint rules. If the user did not provide a target version, this defaults to the lowest support
crates/ruff_linter/src/checkers/ast/mod.rs:622
↓ 67 callersMethodas_str
(self)
crates/ruff_linter/src/rules/pylint/rules/if_stmt_min_max.rs:206
↓ 67 callersMethodcurrent_scope
Returns the current top-most [`Scope`].
crates/ruff_python_semantic/src/model.rs:1539
↓ 67 callersMethodfind
Returns the [`ParameterWithDefault`] with the given name, or `None` if no such [`ParameterWithDefault`] exists.
crates/ruff_python_ast/src/nodes.rs:3140
↓ 67 callersMethodinsert
( &mut self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, value: Expr
crates/ty_python_semantic/src/types/infer/builder.rs:11352
↓ 67 callersMethodname
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/class/known.rs:880
↓ 67 callersMethodstarts_with
(&self, other: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:154
↓ 66 callersMethodas_call_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2236
↓ 66 callersFunctionset
(*args, **kwargs)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C401.py:49
↓ 64 callersMethodidentity
Get the identity of this bound typevar occurrence. This includes the source-level typevar, binding context, `ParamSpec` attribute, and freshness nonc
crates/ty_python_semantic/src/types/typevar.rs:930
↓ 64 callersMethodis_empty
(&self)
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1191
↓ 64 callersMethodmatch_typing_expr
Return `true` if the `Expr` is a reference to `typing.${target}`.
crates/ruff_python_semantic/src/model.rs:241
↓ 64 callersMethodrange
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:214
↓ 64 callersMethodspan
Create a [`Annotation`] with the given span for a [`Snippet`]
crates/ruff_annotate_snippets/src/snippet.rs:203
↓ 64 callersMethodstylist
The [`Stylist`] for the current file, which detects the current line ending, quote, and indentation style.
crates/ruff_linter/src/checkers/ast/mod.rs:509
↓ 64 callersMethodto_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/subclass_of.rs:277
↓ 63 callersMethodannotation
(mut self, annotation: Annotation<'a>)
crates/ruff_annotate_snippets/src/snippet.rs:128
↓ 63 callersMethodas_bytes
Returns the remaining input as byte slice.
crates/ruff_python_trivia/src/cursor.rs:35
← previousnext →101–200 of 27,807, ranked by callers