MCPcopy Create free account

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

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

↓ 1 callersFunctionlevenshtein_distance
Returns the [Levenshtein edit distance] between strings `string_a` and `string_b`. Uses the [Wagner-Fischer algorithm] to speed up the calculation. [
crates/ty_python_semantic/src/diagnostic/levenshtein.rs:128
↓ 1 callersMethodlex_code
(&mut self)
crates/ruff_linter/src/noqa.rs:587
↓ 1 callersFunctionlex_codes
(text: &str)
crates/ruff_linter/src/noqa.rs:395
↓ 1 callersMethodlex_comment
Lex a single comment.
crates/ruff_python_parser/src/lexer.rs:1106
↓ 1 callersMethodlex_file_exemption
(mut self)
crates/ruff_linter/src/noqa.rs:470
↓ 1 callersMethodlex_identifier
Lex an identifier starting with an ASCII character, or a prefixed string.
crates/ruff_python_parser/src/lexer.rs:641
↓ 1 callersMethodlex_inline_noqa
(mut self)
crates/ruff_linter/src/noqa.rs:440
↓ 1 callersMethodlex_interpolated_string_middle_or_end
Lex an f-string or t-string middle or end token.
crates/ruff_python_parser/src/lexer.rs:745
↓ 1 callersMethodlex_interpolated_string_start
Lex a f-string or t-string start token if positioned at the start of an f-string or t-string.
crates/ruff_python_parser/src/lexer.rs:723
↓ 1 callersMethodlex_ipython_escape_command
Lex a single IPython escape command.
crates/ruff_python_parser/src/lexer.rs:1118
↓ 1 callersMethodlex_number
Numeric lexing. The feast can start!
crates/ruff_python_parser/src/lexer.rs:987
↓ 1 callersMethodlex_number_radix
Lex a hex/octal/decimal/binary number without a decimal point.
crates/ruff_python_parser/src/lexer.rs:1004
↓ 1 callersMethodlex_token
(&mut self)
crates/ruff_python_parser/src/lexer.rs:155
↓ 1 callersFunctionlexical_return_type
The return annotation in the function's lexical scope, before callable type variables are rescoped or the return type of an async function is wrapped.
crates/ty_python_semantic/src/types/signatures.rs:95
↓ 1 callersFunctionlib2to3_parse
Given a string with source, return the lib2to3 Node.
crates/ruff_python_formatter/resources/test/fixtures/black/cases/pattern_matching_generic.py:91
↓ 1 callersFunctionlimited_parallelism
(coroutine: Awaitable[T])
python/ruff-ecosystem/ruff_ecosystem/main.py:56
↓ 1 callersMethodline_belongs_to_section
( &self, line: ParsedLine<'_>, line_header: Option<Header>, starts_item_block:
crates/ty_ide/src/docstring/document/numpy.rs:312
↓ 1 callersMethodline_end_exclusive
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:71
↓ 1 callersMethodline_index
Returns the row number for a given offset. ## Examples ``` # use ruff_text_size::TextSize; # use ruff_source_file::{LineIndex, OneIndexed, LineColum
crates/ruff_source_file/src/line_index.rs:249
↓ 1 callersMethodline_len
Returns the length of the line in characters, respecting the given encoding
crates/ruff_source_file/src/line_index.rs:215
↓ 1 callersMethodline_num
Override the output style for line numbers in the [`Snippet`][crate::Snippet] gutter
crates/ruff_annotate_snippets/src/renderer/mod.rs:240
↓ 1 callersMethodline_number
(&self, char_index: TextSize)
crates/mdtest/src/parser.rs:1064
↓ 1 callersMethodline_position
The position of the comment in the text.
crates/ruff_python_formatter/src/comments/visitor.rs:318
↓ 1 callersMethodline_range
Computes the range of this `offset`s line ending before the newline character. The range starts at the beginning of the line and goes up to, but excl
crates/ruff_source_file/src/line_ranges.rs:122
↓ 1 callersFunctionline_starts_markdown_block_content
(line: &str, at_description_start: bool)
crates/ty_ide/src/docstring/markdown/structured.rs:338
↓ 1 callersFunctionline_too_long
E501
crates/ruff_linter/src/rules/pycodestyle/rules/line_too_long.rs:86
↓ 1 callersMethodline_width
(&self)
crates/ruff_python_formatter/src/options.rs:244
↓ 1 callersFunctionlink_rule_names
Replace `rule-name` with [`rule-name`](url) for any known rule names, turning them into inline links automatically.
crates/ruff_dev/src/generate_ty_rules.rs:190
↓ 1 callersMethodlint
(&self, db: &dyn Db, diagnostics: &mut Vec<OptionDiagnostic>)
crates/ty_project/src/metadata/options.rs:1213
↓ 1 callersMethodlint
(&self)
crates/ruff_server/src/session/settings.rs:151
↓ 1 callersMethodlint_options
(&self, db: &dyn Db)
crates/ty_project/src/metadata.rs:525
↓ 1 callersMethodlint_override
(&self, db: &dyn Db, diagnostics: &mut Vec<OptionDiagnostic>)
crates/ty_project/src/metadata/options.rs:1840
↓ 1 callersFunctionlint_path
Wraps [`lint_path`](crate::diagnostics::lint_path) in a [`catch_unwind`](std::panic::catch_unwind) and emits a diagnostic if the linting the file pani
crates/ruff/src/commands/check.rs:195
↓ 1 callersFunctionlint_stdin
Generate `Diagnostic`s from source code content derived from stdin.
crates/ruff/src/diagnostics.rs:383
↓ 1 callersFunctionlinter
(format: HelpFormat)
crates/ruff/src/commands/linter.rs:30
↓ 1 callersFunctionlist
()
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C408.py:8
↓ 1 callersFunctionlist_all_modules
( db: &'db dyn Db, resolver_environment: ResolverEnvironment<'db>, )
crates/ty_module_resolver/src/resolve/search.rs:43
↓ 1 callersFunctionlist_assign_reversed
FURB187
crates/ruff_linter/src/rules/refurb/rules/list_reverse_copy.rs:70
↓ 1 callersFunctionlist_snapshot_filter
( db: &'db TestDb, predicate: impl Fn(&Module<'db>) -> bool, )
crates/ty_module_resolver/src/list.rs:62
↓ 1 callersFunctionlist_submodules_by_name
( db: &'db dyn Db, name: ModuleNameIngredient<'db>, )
crates/ty_module_resolver/src/resolve/search.rs:101
↓ 1 callersMethodlist_terminator
Returns the token that terminates a list of parameters.
crates/ruff_python_parser/src/parser/mod.rs:1057
↓ 1 callersMethodlist_terminator_kind
(self, p: &Parser)
crates/ruff_python_parser/src/parser/mod.rs:1293
↓ 1 callersFunctionliteral_comparisons
E711, E712
crates/ruff_linter/src/rules/pycodestyle/rules/literal_comparisons.rs:207
↓ 1 callersFunctionliteral_contains_string_only_escapes
(literal: &StringLiteral, locator: &Locator)
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs:306
↓ 1 callersFunctionliteral_content_range
Determines the content range of a valid string or byte literal if it's non-empty.
crates/ty_ide/src/selection_range.rs:50
↓ 1 callersFunctionliteral_dunder_all_assignment
Returns the elements of a list or tuple directly assigned to `__all__`.
crates/ty_python_core/src/static_dunder_all.rs:16
↓ 1 callersFunctionliteral_equality_fallthrough_code
()
crates/ruff_benchmark/benches/ty.rs:1936
↓ 1 callersFunctionliteral_iterable_length
The literal element count used when inferring expansions such as `(*{"key": 1},)`. An expansion within a set or dictionary, as in `{*items}` or `{**it
crates/ty_python_semantic/src/types/unpacker.rs:705
↓ 1 callersFunctionliteral_iterable_truthiness
Returns the static truthiness of a literal iterable. Returns [`Truthiness::Unknown`] for other expressions and when starred elements or dictionary un
crates/ty_python_core/src/builder.rs:6236
↓ 1 callersFunctionliteral_keyword
(call: ast.Call, name: str)
scripts/collect_ty_ecosystem_run_metadata.py:181
↓ 1 callersFunctionliteral_membership
PLR6201
crates/ruff_linter/src/rules/pylint/rules/literal_membership.rs:53
↓ 1 callersFunctionliteral_or_pattern_reachability_code
()
crates/ruff_benchmark/benches/ty.rs:1981
↓ 1 callersMethodliteral_signature
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1986
↓ 1 callersFunctionload_ast
(root: Path)
crates/ruff_python_ast/generate.py:105
↓ 1 callersMethodload_from_tokens
(mut self, tokens: &Tokens, indexer: &Indexer)
crates/ruff_linter/src/suppression.rs:752
↓ 1 callersFunctionload_options
Load `Options` from a `pyproject.toml` or `ruff.toml` file.
crates/ruff_workspace/src/pyproject.rs:182
↓ 1 callersFunctionload_state
(path: Path)
scripts/pull_request_reviewers.py:104
↓ 1 callersFunctionloads
Parse TOML from a string.
crates/ruff_benchmark/resources/tomllib/_parser.py:69
↓ 1 callersMethodlocal
(kind: ScopeKind<'a>, parent: ScopeId)
crates/ruff_python_semantic/src/scope.rs:60
↓ 1 callersMethodlocal_binding
Returns the local Python binding through which this fixture is exposed.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:766
↓ 1 callersMethodlocal_function_bindings
Pairs source methods with the alternatives that remain in this member's exposed type. Keeping definitions separate lets callers apply exclusions with
crates/ty_python_semantic/src/types/list_members.rs:736
↓ 1 callersMethodlocal_source
( self, place_expr: PlaceExprRef, )
crates/ty_python_semantic/src/place_load.rs:1207
↓ 1 callersFunctionlocals_in_render_function
DJ003
crates/ruff_linter/src/rules/flake8_django/rules/locals_in_render_function.rs:49
↓ 1 callersFunctionlog_exception_outside_except_handler
LOG004
crates/ruff_linter/src/rules/flake8_logging/rules/log_exception_outside_except_handler.rs:90
↓ 1 callersFunctionlogging_call
PLE1205 PLE1206
crates/ruff_linter/src/rules/pylint/rules/logging.rs:99
↓ 1 callersFunctionlogging_config_insecure_listen
S612
crates/ruff_linter/src/rules/flake8_bandit/rules/logging_config_insecure_listen.rs:40
↓ 1 callersFunctionlogging_eager_conversion
RUF065
crates/ruff_linter/src/rules/ruff/rules/logging_eager_conversion.rs:111
↓ 1 callersFunctionlogging_f_string
( checker: &Checker, msg: &Expr, f_string: &ast::ExprFString, arguments: &Arguments, msg_p
crates/ruff_linter/src/rules/flake8_logging_format/rules/logging_call.rs:18
↓ 1 callersFunctionlong_sleep_not_forever
ASYNC116
crates/ruff_linter/src/rules/flake8_async/rules/long_sleep_not_forever.rs:65
↓ 1 callersMethodlookup
Classifies an ASCII identifier whose first character has already been consumed. `rest` starts after `first` and may extend past the identifier; `len`
crates/ruff_python_parser/src/lexer.rs:1653
↓ 1 callersMethodlookup_binding
Lookup a concrete binding in the current scope. If `symbol` resolves to an unmaterialized builtin, this creates its binding before returning the [`Bi
crates/ruff_python_semantic/src/model.rs:842
↓ 1 callersMethodlookup_binding_in_scope
Lookup a concrete binding in a certain scope. If `symbol` resolves to an unmaterialized builtin, this creates its binding before returning the [`Bind
crates/ruff_python_semantic/src/model.rs:856
↓ 1 callersFunctionlookup_dunder
Look up a comparison method without falling back to `object`.
crates/ty_python_semantic/src/types/equality.rs:2095
↓ 1 callersMethodlookup_or_parse
( &self, annotation: &ast::ExprStringLiteral, source: &str, )
crates/ruff_linter/src/checkers/ast/mod.rs:3496
↓ 1 callersMethodlookup_path
( &mut self, path: &NormalizedVendoredPath, )
crates/ruff_db/src/vendored.rs:375
↓ 1 callersFunctionloop_exits_early
Returns `true` if the given body contains a `break` statement.
crates/ruff_linter/src/rules/pylint/rules/useless_else_on_loop.rs:97
↓ 1 callersMethodloop_header_fallback_type
Compute the type for reads such as `box.value` or `items[0]` in loop iterations after `box` or `items` has been assigned a new object. A check on `bo
crates/ty_python_semantic/src/types/infer/builder.rs:10646
↓ 1 callersFunctionloop_header_reachability_impl
( db: &'db dyn Db, definition: Definition<'db>, mut cycle_initial_cache: Option<&mut FxHashMap<Def
crates/ty_python_semantic/src/place.rs:1689
↓ 1 callersMethodloop_header_rebinds_target
( &self, definition: Definition<'db>, visited: &mut FxHashSet<Definition<'db>>, )
crates/ty_python_semantic/src/types/narrow.rs:1883
↓ 1 callersFunctionloop_iterator_mutation
B909
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:58
↓ 1 callersFunctionloop_variable_overrides_iterator
B020
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_variable_overrides_iterator.rs:55
↓ 1 callersFunctionloop_variables_are_used_outside_loop
( binding_names: &[&ExprName], loop_range: TextRange, semantic: &SemanticModel, scope_id: Scop
crates/ruff_linter/src/rules/refurb/rules/for_loop_writes.rs:230
↓ 1 callersFunctionlorem
lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
crates/ruff_linter/resources/test/fixtures/pydocstyle/D209_D400.py:1
↓ 1 callersFunctionlowercase_imported_as_non_lowercase
N812
crates/ruff_linter/src/rules/pep8_naming/rules/lowercase_imported_as_non_lowercase.rs:54
↓ 1 callersMethodlowest_precedence
Returns the lowest precedence of any operator in this binary chain.
crates/ruff_python_formatter/src/expression/binary_like.rs:581
↓ 1 callersFunctionlru_cache_with_maxsize_none
UP033
crates/ruff_linter/src/rules/pyupgrade/rules/lru_cache_with_maxsize_none.rs:64
↓ 1 callersFunctionlru_cache_without_parameters
UP011
crates/ruff_linter/src/rules/pyupgrade/rules/lru_cache_without_parameters.rs:58
↓ 1 callersMethodlsp_command
(self, project: Project, venv: Venv)
scripts/ty_benchmark/src/benchmark/tool.py:134
↓ 1 callersMethodlsp_initialization_options
( self, project: Project, venv: Venv )
scripts/ty_benchmark/src/benchmark/tool.py:66
↓ 1 callersFunctionlsp_range_to_text_range
Helper function to convert an LSP Range to internal `TextRange`. This is used internally by the `RangeExt` trait and in special cases where `db` and `
crates/ty_server/src/document/range.rs:293
↓ 1 callersFunctionmagic_value_comparison
PLR2004
crates/ruff_linter/src/rules/pylint/rules/magic_value_comparison.rs:130
↓ 1 callersFunctionmain
( command: RuffCommand, baseline_executable: Path, comparison_executable: Path, targets: list[
python/ruff-ecosystem/ruff_ecosystem/main.py:32
↓ 1 callersFunctionmain
()
python/py-fuzzer/fuzz.py:1085
↓ 1 callersFunctionmain
(argv: list[str] | None = None)
scripts/publish-crates.py:204
↓ 1 callersFunctionmain
()
scripts/setup_primer_project.py:143
↓ 1 callersFunctionmain
()
scripts/check-scripts.py:105
↓ 1 callersFunctionmain
()
scripts/memory_report.py:549
↓ 1 callersFunctionmain
()
scripts/generate-crate-readmes.py:103
↓ 1 callersFunctionmain
()
scripts/update_ambiguous_characters.py:123
↓ 1 callersFunctionmain
()
scripts/bump-workspace-crate-versions.py:48
← previousnext →11,301–11,400 of 31,562, ranked by callers