MCPcopy Create free account

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

Functions28,707 in github.com/astral-sh/ruff

↓ 109 callersFunctioninlay_hint_test
(source: &str)
crates/ty_ide/src/inlay_hints.rs:819
↓ 108 callersMethodsegments
(&self)
crates/ruff_python_ast/src/name.rs:355
↓ 107 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:11981
↓ 107 callersMethodtypevar
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/bound_super.rs:34
↓ 107 callersMethodwith_file
Write a file to the test directory
crates/ty_server/tests/e2e/main.rs:1435
↓ 105 callersMethodclone
(&self)
crates/ruff_python_ast/src/node_index.rs:233
↓ 105 callersMethodkind
(self)
crates/ty_python_semantic/src/types/literal.rs:176
↓ 105 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/context.rs:197
↓ 104 callersFunctionempty
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:118
↓ 104 callersMethodreport_lint
( &'env self, lint: &'static LintMetadata, ranged: T, )
crates/ty_python_semantic/src/types/call/bind.rs:103
↓ 104 callersMethodtry_set_fix
(&mut self, func: impl FnOnce() -> anyhow::Result<Fix>)
crates/ruff_linter/src/checkers/ast/mod.rs:3733
↓ 103 callersMethodcontext
(&self)
crates/ruff_python_semantic/src/model.rs:3019
↓ 103 callersFunctionsystem_path_to_file
(db: &dyn Db, path: impl AsRef<SystemPath>)
crates/ruff_db/src/files.rs:35
↓ 102 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
↓ 102 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:169
↓ 101 callersMethodas_ref
(&self)
crates/ruff_python_ast/src/name.rs:109
↓ 101 callersMethodwrite_str
(&mut self, s: &str)
crates/mdtest/src/lib.rs:276
↓ 100 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:98
↓ 100 callersFunctiononce
()
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:92
↓ 98 callersMethodcomments
(&self)
crates/ruff_python_formatter/src/context.rs:77
↓ 98 callersFunctionsemantic_index
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:74
↓ 98 callersMethodstrip_prefix
( &self, base: impl AsRef<SystemPath>, )
crates/ruff_db/src/system/path.rs:323
↓ 97 callersMethodid
The category for this [`Report`] Useful for looking searching for more information to resolve the diagnostic. <div class="warning"> Text passed to
crates/ruff_annotate_snippets/src/snippet.rs:193
↓ 97 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:497
↓ 97 callersMethodstarts_with
(&self, base: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:121
↓ 95 callersMethodas_std_path
(&self)
crates/ruff_db/src/system/path.rs:382
↓ 95 callersMethodbuild
(self)
crates/ty_module_resolver/src/testing.rs:192
↓ 95 callersMethodto_path_buf
Converts the path to an owned [`SystemPathBuf`].
crates/ruff_db/src/system/path.rs:370
↓ 94 callersMethodcontains
(&self, rule: Rule)
crates/ruff_linter/src/registry/rule_set.rs:245
↓ 94 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1374
↓ 94 callersMethodset_primary_annotation_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:427
↓ 93 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
↓ 93 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
↓ 92 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:1375
↓ 92 callersMethodhighlight_file
Get semantic tokens for the entire file
crates/ty_ide/src/semantic_tokens.rs:4721
↓ 92 callersMethodlen
(&self)
crates/ruff_python_ast/src/nodes.rs:206
↓ 92 callersMethodopen_text_document
Send a `textDocument/didOpen` notification
crates/ty_server/tests/e2e/main.rs:795
↓ 92 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:279
↓ 91 callersMethodstart
(&self)
crates/ty_ide/src/importer.rs:506
↓ 90 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/callable.rs:792
↓ 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:794
↓ 88 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:1158
↓ 88 callersMethodfirst
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1135
↓ 88 callersMethodrange
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:533
↓ 87 callersMethodbuild
Generate a [`Command`] for the `ruff check` command.
crates/ruff/tests/integration_test.rs:72
↓ 87 callersMethodlen
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:157
↓ 86 callersMethodends_with
(&self, child: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:145
↓ 86 callersMethodfold
Control whether lines without [`Annotation`]s are shown The default is `fold(true)`, collapsing uninteresting lines. See [`AnnotationKind::Visible`]
crates/ruff_annotate_snippets/src/snippet.rs:311
↓ 86 callersMethodis_rule_enabled
(&self, rule: Rule)
crates/ruff_linter/src/checkers/ast/mod.rs:552
↓ 86 callersMethodprogram_file
(&self, file: File)
crates/ty_ide/src/lib.rs:443
↓ 85 callersMethodas_str
(self)
crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs:107
↓ 85 callersMethodexpr
Returns the expression contained in this parsed output.
crates/ruff_python_parser/src/lib.rs:540
↓ 85 callersMethodrange
(&self)
crates/ruff_linter/src/rules/pylint/rules/non_slot_assignment.rs:96
↓ 84 callersMethodargs
(mut self, args: impl IntoIterator<Item = &'a str>)
crates/ruff/tests/integration_test.rs:66
↓ 84 callersMethodclone
(this: &Self)
crates/ty_server/src/session/request_queue.rs:153
↓ 84 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
↓ 83 callersMethodsecondary_title
For any secondary, or context, [`Group`][crate::Group]s (subsequent) in a [`Report`][crate::Report] See [`Group::with_title`][crate::Group::with_titl
crates/ruff_annotate_snippets/src/level.rs:104
↓ 83 callersMethodto_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/class/known.rs:1036
↓ 82 callersMethodinfer_expression
(&mut self, expression: &ast::Expr, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6147
↓ 82 callersMethodmessage
(&self)
crates/ty_wasm/src/lib.rs:915
↓ 82 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:1470
↓ 81 callersMethodas_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2680
↓ 81 callersMethodnode_range
(&self, start: TextSize)
crates/ruff_python_parser/src/parser/mod.rs:321
↓ 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
↓ 80 callersMethodsaturating_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:123
↓ 80 callersMethodto_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/subclass_of.rs:302
↓ 79 callersMethodfind_keyword
Return the [`Keyword`] with the given name, or `None` if no such [`Keyword`] exists.
crates/ruff_python_ast/src/nodes.rs:3578
↓ 79 callersMethoditer
(&self)
crates/ty_python_core/src/place.rs:332
↓ 78 callersFunctionstr
(s)
crates/ruff_linter/resources/test/fixtures/ruff/RUF065_0.py:37
↓ 77 callersFunctionsource_text
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:16
↓ 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 callersMethodbuild
(self)
crates/ty_python_semantic/src/types/tuple.rs:3130
↓ 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 callersMethodsymbol_id
Returns the [`ScopedSymbolId`] of the place named `name`.
crates/ty_python_core/src/place.rs:241
↓ 74 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:3596
↓ 74 callersMethodis_enabled
(self)
crates/ruff_linter/src/settings/flags.rs:15
↓ 74 callersMethodresolve_type_alias
If this type is a `Type::TypeAlias`, recursively resolves it to its underlying value type. Otherwise, returns `self` unchanged.
crates/ty_python_semantic/src/types.rs:2070
↓ 74 callersMethodvalue_type
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:406
↓ 73 callersMethodfind
Returns the [`ParameterWithDefault`] with the given name, or `None` if no such [`ParameterWithDefault`] exists.
crates/ruff_python_ast/src/nodes.rs:3162
↓ 73 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:393
↓ 73 callersMethodrange
(&self)
crates/ty_ide/src/lib.rs:208
↓ 72 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:449
↓ 72 callersMethodis_stub
Returns `true` if the file should be analyzed as a type stub.
crates/ruff_db/src/files.rs:565
↓ 72 callersMethodjoin
(&self, component: &str)
crates/ty_module_resolver/src/path.rs:907
↓ 71 callersMethodcontents
The contents of the docstring, including the opening and closing quotes.
crates/ruff_linter/src/docstrings/mod.rs:30
↓ 71 callersMethodinsert
Inserts a new AST node into the tree and returns its unique ID.
crates/ruff_python_semantic/src/nodes.rs:37
↓ 71 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
↓ 70 callersMethodfile
(&self)
crates/ty_ide/src/lib.rs:147
↓ 70 callersMethodfind
(&self, policy: &NameMatchPolicy)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:152
↓ 69 callersMethodadd_error
(&mut self, error: ParseErrorType, ranged: T)
crates/ruff_python_parser/src/parser/mod.rs:671
↓ 69 callersMethodcompletion_test_builder
(&self)
crates/ty_ide/src/completion.rs:11399
↓ 69 callersMethodstarts_with
(&self, other: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:155
↓ 68 callersFunctionassert_lexed_ranges_match_slices
( directive: Result<Option<NoqaLexerOutput>, LexicalError>, source: &str, )
crates/ruff_linter/src/noqa.rs:1493
↓ 68 callersMethodinsert
( &mut self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, value: Expr
crates/ty_python_semantic/src/types/infer/builder.rs:11546
↓ 68 callersFunctionlist
(*args, **kwargs)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C400.py:31
↓ 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
← previousnext →101–200 of 28,707, ranked by callers