MCPcopy Create free account

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

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

↓ 1 callersFunctionsplit_name_and_type
Splits a display name from a trailing parenthesized type. For example, `"value (str)"` yields `("value", Some("str"))`.
crates/ty_ide/src/docstring/document/google.rs:90
↓ 1 callersFunctionsplit_once_at_field_delimiter
Splits at the field delimiter, skipping top-level colons in reST roles. For example, ``:exc:`ValueError`: description`` returns ``(":exc:`ValueError`
crates/ty_ide/src/docstring/document/google.rs:834
↓ 1 callersFunctionsplit_sep
( str_value: &StringLiteralValue, sep_value: &str, max_split: i32, method: Method, )
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:222
↓ 1 callersFunctionsplit_sequence_type
(rule: str)
crates/ruff_python_ast/generate.py:261
↓ 1 callersFunctionsplit_static_string
SIM905
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:92
↓ 1 callersFunctionsplit_trailing_parenthetical
Splits and trims the prefix and contents of a trailing parenthetical expression. Parentheses inside quoted strings and Markdown code spans do not aff
crates/ty_ide/src/docstring/document/syntax.rs:572
↓ 1 callersFunctionsplit_trailing_rest_prefix_role
Splits a trailing reStructuredText prefix-role pattern from its preceding text. This deliberately recognizes role-shaped markup common in docstrings
crates/ty_ide/src/docstring/document/syntax.rs:252
↓ 1 callersFunctionsplit_truthiness_guarded_intersection
Extract `(core, guard)` from truthiness-guarded intersections. e.g. - `A & ~AlwaysTruthy` -> `Some((A, ~AlwaysTruthy))` - `A & ~AlwaysFalsy` -> `Some
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:69
↓ 1 callersMethodsplits_literals
Return `true` if this type can be a supertype of some literals of `kind` and not others.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:405
↓ 1 callersFunctionssh_no_host_key_verification
S507
crates/ruff_linter/src/rules/flake8_bandit/rules/ssh_no_host_key_verification.rs:49
↓ 1 callersFunctionssl_insecure_version
S502
crates/ruff_linter/src/rules/flake8_bandit/rules/ssl_insecure_version.rs:54
↓ 1 callersFunctionssl_with_bad_defaults
S503
crates/ruff_linter/src/rules/flake8_bandit/rules/ssl_with_bad_defaults.rs:53
↓ 1 callersFunctionssl_with_no_version
S504
crates/ruff_linter/src/rules/flake8_bandit/rules/ssl_with_no_version.rs:42
↓ 1 callersMethodstage
Promotes any unstaged changes of `file` to staged. This is a no-op if there are no unstaged changes.
crates/ty_python_semantic/src/fixes.rs:610
↓ 1 callersMethodstaged
Returns the staged source text of `file`, ignoring any unstaged changes.
crates/ty_python_semantic/src/fixes.rs:590
↓ 1 callersFunctionstar_arg_unpacking_after_keyword_arg
B026
crates/ruff_linter/src/rules/flake8_bugbear/rules/star_arg_unpacking_after_keyword_arg.rs:61
↓ 1 callersFunctionstarmap_zip
RUF058
crates/ruff_linter/src/rules/ruff/rules/starmap_zip.rs:63
↓ 1 callersFunctionstarred_annotation
Returns `true` if any argument in the slice is a starred expression.
crates/ruff_python_semantic/src/analyze/typing.rs:236
↓ 1 callersFunctionstarred_assignment_values
Return the explicit values collected by a starred assignment target. For `first, *middle, last = (0, 1, 2, 3)`, `middle` collects the expressions `1`
crates/ty_python_semantic/src/types/unpacker.rs:466
↓ 1 callersMethodstarred_expression_precedence
Returns the [`StarredExpressionPrecedence`] for the context, regardless of whether starred expressions are allowed or not.
crates/ruff_python_parser/src/parser/expression.rs:3237
↓ 1 callersFunctionstarred_expressions
F621
crates/ruff_linter/src/rules/pyflakes/rules/starred_expressions.rs:60
↓ 1 callersFunctionstartPlayground
()
playground/ty/src/Playground.tsx:618
↓ 1 callersFunctionstartPlayground
()
playground/ruff/src/Editor/Chrome.tsx:150
↓ 1 callersMethodstart_doctest
(&mut self)
crates/ty_ide/src/docstring/markdown/general.rs:339
↓ 1 callersMethodstart_from
Create a new [`CallArguments`] starting from the specified index.
crates/ty_python_semantic/src/types/call/arguments.rs:758
↓ 1 callersFunctionstart_is_empty_list
Returns `true` if the `start` argument to a `sum()` call is an empty list.
crates/ruff_linter/src/rules/ruff/rules/quadratic_list_summation.rs:202
↓ 1 callersMethodstart_markdown_fence
(&mut self, fence: MarkdownFence<'source>, line: &str)
crates/ty_ide/src/docstring/markdown/general.rs:354
↓ 1 callersMethodstart_pending_rest_literal
(&mut self, language: &'source str)
crates/ty_ide/src/docstring/markdown/general.rs:326
↓ 1 callersMethodstart_recording
(&mut self)
crates/ruff_formatter/src/buffer.rs:638
↓ 1 callersMethodstart_rest_literal
(&mut self, language: &str, indent: TextSize)
crates/ty_ide/src/docstring/markdown/general.rs:330
↓ 1 callersMethodstart_row
(&self)
crates/ruff_notebook/src/index.rs:85
↓ 1 callersMethodstart_token
Mark the current position of the cursor as the start of the token which is going to be lexed. Use [`Cursor::token_len`] to get the length of the lexe
crates/ruff_python_parser/src/lexer/cursor.rs:82
↓ 1 callersMethodstarted
Called immediately before running uv. Cancelled queued requests do not call this method.
crates/ty_project/src/lib.rs:168
↓ 1 callersFunctionstarts_at_block_boundary
(source: &str, start: TextSize)
crates/ty_ide/src/docstring/document/rst.rs:63
↓ 1 callersFunctionstarts_obvious_block
Identifies obvious reST or Markdown block starts that cannot continue a wrapped link label. This conservative heuristic prevents a pending link from
crates/ty_ide/src/docstring/markdown/general/inline.rs:453
↓ 1 callersFunctionstarts_preformatted_block
Returns whether `line` starts a recognized preformatted block.
crates/ty_ide/src/docstring/document/preformatted.rs:49
↓ 1 callersFunctionstarts_with_brace
(checker: &Checker, arg: &Expr)
crates/ruff_linter/src/rules/ruff/rules/explicit_f_string_type_conversion.rs:202
↓ 1 callersFunctionstarts_with_returns
(docstring: &Docstring)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1092
↓ 1 callersFunctionstarts_with_this
D404
crates/ruff_linter/src/rules/pydocstyle/rules/starts_with_this.rs:55
↓ 1 callersFunctionstarts_with_yields
(docstring: &Docstring)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1112
↓ 1 callersFunctionstatement
Run lint rules over a [`Stmt`] syntax node.
crates/ruff_linter/src/checkers/ast/analyze/statement.rs:19
↓ 1 callersMethodstatement
Returns the statement in which the binding was defined.
crates/ruff_python_semantic/src/binding.rs:277
↓ 1 callersMethodstatic_class_literal_specialized
Returns the statement-defined class literal and specialization for this class, with an additional specialization applied if the class is generic.
crates/ty_python_semantic/src/types/class.rs:1272
↓ 1 callersFunctionstatic_errors
Checks for "static" errors in the comment: missing colon, missing author, etc.
crates/ruff_linter/src/rules/flake8_todos/rules/todos.rs:355
↓ 1 callersFunctionstatic_join_to_fstring
FLY002
crates/ruff_linter/src/rules/flynt/rules/static_join_to_fstring.rs:163
↓ 1 callersFunctionstatic_key_dict_comprehension
B035, RUF011
crates/ruff_linter/src/rules/flake8_bugbear/rules/static_key_dict_comprehension.rs:52
↓ 1 callersFunctionstatic_string_sequence_for_module_symbol
Returns the statically known string sequence bound to a module symbol. For example, given pytest-style plugin registration: ```py essential_plugins
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1505
↓ 1 callersFunctionstatic_string_sequence_from_expression
Evaluates a static string sequence while preserving the order of tuple concatenation. Some supported pytest releases use tuple concatenation to defin
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1537
↓ 1 callersFunctionstdlib_module_shadowing
A005
crates/ruff_linter/src/rules/flake8_builtins/rules/stdlib_module_shadowing.rs:71
↓ 1 callersFunctionstem
Return the stem of a module name (everything preceding the last dot).
crates/ruff_python_semantic/src/analyze/visibility.rs:157
↓ 1 callersMethodstep_i32
(self)
crates/ty_python_semantic/src/types/tuple.rs:1383
↓ 1 callersFunctionstop_iteration_return
PLR1708
crates/ruff_linter/src/rules/pylint/rules/stop_iteration_return.rs:57
↓ 1 callersMethodstore_maybe_expected_type
( &mut self, expression: impl Into<ExpressionNodeKey>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:7211
↓ 1 callersMethodstore_qualifiers
Store qualifiers for an annotation expression.
crates/ty_python_semantic/src/types/infer/builder.rs:1096
↓ 1 callersFunctionstr_or_repr_defined_in_stub
PYI029
crates/ruff_linter/src/rules/flake8_pyi/rules/str_or_repr_defined_in_stub.rs:47
↓ 1 callersMethodstr_repr
(&'a self, triple_quotes: TripleQuotes)
crates/ruff_python_literal/src/escape.rs:118
↓ 1 callersFunctionstrange_generator
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B007.py:22
↓ 1 callersMethodstream_for_details
Return the [`Stdout`] stream for detailed messages. For example, in `ty check`, this would be used for the diagnostic output.
crates/ty/src/printer.rs:101
↓ 1 callersMethodstring
(&self)
crates/ruff_python_formatter/src/string/implicit.rs:283
↓ 1 callersFunctionstring_contains_string_only_escapes
In a string, there are two kinds of escape sequences: "single" and "multi". A "single" escape sequence is formed if a backslash is followed by a newl
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs:288
↓ 1 callersFunctionstring_dot_format_extra_named_arguments
F522
crates/ruff_linter/src/rules/pyflakes/rules/strings.rs:805
↓ 1 callersFunctionstring_dot_format_extra_positional_arguments
F523
crates/ruff_linter/src/rules/pyflakes/rules/strings.rs:865
↓ 1 callersFunctionstring_dot_format_missing_argument
F524
crates/ruff_linter/src/rules/pyflakes/rules/strings.rs:945
↓ 1 callersFunctionstring_dot_format_mixing_automatic
F525
crates/ruff_linter/src/rules/pyflakes/rules/strings.rs:985
↓ 1 callersFunctionstring_has_duplicate_char
(string: &ast::StringLiteralValue)
crates/ruff_linter/src/rules/pylint/rules/bad_str_strip_call.rs:155
↓ 1 callersFunctionstring_has_unescaped_metacharacters
(value: &ast::StringLiteralValue)
crates/ruff_linter/src/rules/ruff/rules/pytest_raises_ambiguous_pattern.rs:113
↓ 1 callersFunctionstring_in_exception
EM101, EM102, EM103
crates/ruff_linter/src/rules/flake8_errmsg/rules/string_in_exception.rs:188
↓ 1 callersFunctionstring_like
Run lint rules over a [`StringLike`] syntax nodes.
crates/ruff_linter/src/checkers/ast/analyze/string_like.rs:8
↓ 1 callersMethodstring_literal_completion_expected_type
( &self, string_expr: &ast::ExprStringLiteral, )
crates/ty_python_semantic/src/semantic_model.rs:915
↓ 1 callersFunctionstring_or_bytes_too_long
PYI053
crates/ruff_linter/src/rules/flake8_pyi/rules/string_or_bytes_too_long.rs:55
↓ 1 callersMethodstring_quote_style
Returns the [`Quote`] style for the current string token of any kind. # Panics If it isn't a string or any f/t-string tokens.
crates/ruff_python_ast/src/token.rs:67
↓ 1 callersMethodstring_quote_style
Returns the quote style of the string literal that the cursor is positioned within, if any.
crates/ty_ide/src/completion.rs:1063
↓ 1 callersMethodstring_type
(self, context: &InferContext<'db, '_>)
crates/ty_python_semantic/src/types/infer/builder.rs:13320
↓ 1 callersFunctionstrings
Q000, Q001
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:308
↓ 1 callersFunctionstripToolRuff
(settings: object)
playground/ruff/src/Editor/SettingsEditor.tsx:126
↓ 1 callersFunctionstrip_comment_prefix
A helper for stripping '#' from comments.
crates/ruff_python_formatter/src/comments/format.rs:509
↓ 1 callersFunctionstrip_indentation
(line: &str, width: TextSize)
crates/ty_ide/src/docstring/document.rs:236
↓ 1 callersFunctionstrip_with_multi_characters
B005
crates/ruff_linter/src/rules/flake8_bugbear/rules/strip_with_multi_characters.rs:77
↓ 1 callersFunctionstrip_z_date
Returns `Some` if `call` is a call to `date.strip("Z")`. It returns the value of the `date` argument and its parent.
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:216
↓ 1 callersMethodstrongly_connected_parameter_components
Assigns each parameter to its strongly connected component. This function returns a map from typevar to the index of the SCC to which it belongs. This
crates/ty_python_semantic/src/types/cyclic.rs:455
↓ 1 callersFunctionstructured_sections
Returns NumPy-style sections that can be rendered structurally.
crates/ty_ide/src/docstring/markdown/structured/numpy.rs:6
↓ 1 callersFunctionstructured_sections
Returns Google-style sections that can be rendered structurally.
crates/ty_ide/src/docstring/markdown/structured/google.rs:6
↓ 1 callersFunctionstructured_sections
Returns the portions of the docstring that describe canonical docstring data (e.g., parameters, return value, etc.).
crates/ty_ide/src/docstring/markdown/structured/rst.rs:10
↓ 1 callersFunctionstub_body_multiple_statements
PYI048
crates/ruff_linter/src/rules/flake8_pyi/rules/stub_body_multiple_statements.rs:44
↓ 1 callersFunctionstub_file_empty_lines
Stub files have bespoke rules for empty lines. These rules are ported from black (preview mode at time of writing) using the stubs test case: <https:
crates/ruff_python_formatter/src/statement/suite.rs:568
↓ 1 callersMethodstub_override_listings
Returns non-empty module listings for unresolved stub override names. For example, suppose `/extra` is configured as an extra path and `acme-stubs` i
crates/ty_module_resolver/src/resolve/search.rs:441
↓ 1 callersFunctionstub_suite_can_omit_empty_line
Only a function to compute it lazily
crates/ruff_python_formatter/src/statement/suite.rs:711
↓ 1 callersMethodstyle
(&self, stylesheet: &Stylesheet)
crates/ruff_annotate_snippets/src/level.rs:143
↓ 1 callersMethodstyle
(&self)
crates/ruff_linter/src/docstrings/sections.rs:234
↓ 1 callersFunctionstyle_substitution_highlights
( highlight_parts: &[SubstitutionHighlight], style: ElementStyle, row_num: usize, unnormalized
crates/ruff_annotate_snippets/src/renderer/render.rs:2016
↓ 1 callersFunctionstylist
(db: &dyn Db, file: PythonFile<'_>)
crates/ty_python_semantic/src/importer.rs:507
↓ 1 callersFunctionsub_diagnostic_to_related_information
Converts a [`SubDiagnostic`] to a [`DiagnosticRelatedInformation`].
crates/ty_server/src/server/api/diagnostics.rs:596
↓ 1 callersFunctionsub_diagnostic_to_related_information
( diagnostic: &SubDiagnostic, context: &LspDiagnosticContext, )
crates/ruff_server/src/lint.rs:536
↓ 1 callersFunctionsub_indices
Get the first and last index of the sub-AST of the input
crates/ruff_python_ast/src/node_index.rs:105
↓ 1 callersMethodsub_start
(&self, amount: TextSize)
crates/ruff_text_size/src/range.rs:410
↓ 1 callersFunctionsubclass_builtin
FURB189
crates/ruff_linter/src/rules/refurb/rules/subclass_builtin.rs:89
↓ 1 callersFunctionsubclass_of_known_class
(db: &dyn Db, subclass_of: SubclassOfType<'_>)
crates/ty_python_semantic/src/types/display.rs:3215
↓ 1 callersFunctionsubclasses_async_iterator
Return `true` if the given class extends `collections.abc.AsyncIterator`.
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:360
↓ 1 callersFunctionsubclasses_iterator
Return `true` if the given class extends `collections.abc.Iterator`.
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:337
↓ 1 callersFunctionsubcommand_help_text
Returns the output of a given subcommand (e.g., `ruff help check`).
crates/ruff_dev/src/generate_cli_help.rs:122
← previousnext →13,301–13,400 of 31,562, ranked by callers