MCPcopy Create free account

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

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

↓ 2 callersFunctionf
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E27.py:57
↓ 2 callersFunctionf
()
crates/ruff_linter/resources/test/fixtures/pyflakes/F702.py:12
↓ 2 callersFunctionf_string_docstring
B021
crates/ruff_linter/src/rules/flake8_bugbear/rules/f_string_docstring.rs:49
↓ 2 callersMethodfallback_member_type_context
For a member binding without a live place declaration, obtain its type context from normal attribute or subscript lookup on its receiver.
crates/ty_python_semantic/src/types/infer/builder.rs:1732
↓ 2 callersMethodfallback_opt
( &self, result: Result<T, E>, fallback_fn: impl FnOnce(E), )
crates/ty_module_resolver/src/strategy.rs:110
↓ 2 callersMethodfallback_to_getattr
Apply `__getattr__` / `__getattribute__` fallback to an attribute-lookup result. A custom `__getattribute__` can intercept even an always-defined nor
crates/ty_python_semantic/src/types.rs:8672
↓ 2 callersFunctionfield_expression_type
Look up an `Annotated` argument in the scope of the field or type alias that defines it. Expressions parsed from a quoted annotation have no scope in
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:431
↓ 2 callersFunctionfields_from_keywords
Deprecated in Python 3.11, removed in Python 3.13.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:241
↓ 2 callersMethodfile
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:84
↓ 2 callersMethodfile
Returns the `File` corresponding to the module. This is always equivalent to `AllSymbolInfo::module().file().unwrap()`.
crates/ty_ide/src/all_symbols.rs:181
↓ 2 callersFunctionfile_settings
(db: &dyn Db, file: File)
crates/ty_project/src/metadata/settings.rs:135
↓ 2 callersMethodfile_start
(&self, is_first: bool, alone: bool)
crates/ruff_annotate_snippets/src/renderer/mod.rs:320
↓ 2 callersMethodfile_type
(&self)
crates/ruff_db/src/system/memory_fs.rs:449
↓ 2 callersMethodfile_uri
Get the URI for the document selected by this query.
crates/ruff_server/src/session/index.rs:623
↓ 2 callersFunctionfile_uri_to_path
(uri: &Uri)
crates/ty_server/src/server/api/requests/will_rename_files.rs:87
↓ 2 callersMethodfill_entry_fits
Tests if the elements between the [`Tag::StartEntry`] and [`Tag::EndEntry`] of a fill item or separator fits with `mode`. Returns `Err` if the queue
crates/ruff_formatter/src/printer/mod.rs:1143
↓ 2 callersMethodfill_in_defaults
(self, db: &'db dyn Db, types: I)
crates/ty_python_semantic/src/types/generics.rs:1129
↓ 2 callersFunctionfilter_contained
Filter out any [`Edit`]s that are completely contained by any other [`Edit`].
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:452
↓ 2 callersMethodfinal_attribute_declaration
Find the class that declares a final attribute, and its declaration site when available.
crates/ty_python_semantic/src/types/infer/builder/final_attribute.rs:48
↓ 2 callersFunctionfind_active_signature_from_details
Find the active signature index from `CallSignatureDetails`. The active signature is the first signature where all arguments present in the call have
crates/ty_python_semantic/src/types/ide_support.rs:1539
↓ 2 callersFunctionfind_assigned_value
Find the assigned [`Expr`] for a given symbol, if any. For example given: ```python foo = 42 (bar, bla) = 1, "str" ``` This function will return a `
crates/ruff_python_semantic/src/analyze/typing.rs:1227
↓ 2 callersMethodfind_cell
(&self, row: OneIndexed)
crates/ruff_notebook/src/index.rs:18
↓ 2 callersFunctionfind_colons
We're in a slice, so we know there's a first colon, but with have to look into the source to find out whether there is a second one, too, e.g. `[1:2]`
crates/ruff_python_formatter/src/expression/expr_slice.rs:156
↓ 2 callersMethodfind_dataclass_decorator_position
Iterate through the decorators on this class, returning the index of the first one that is either `@dataclass` or `@dataclass(...)`.
crates/ty_python_semantic/src/types/class/static_literal.rs:859
↓ 2 callersFunctionfind_existing_suppression
Returns insertion metadata for the preferred editable suppression covering `range`. When multiple comments apply, a same-line or otherwise nested com
crates/ty_python_semantic/src/suppression/add_ignore.rs:266
↓ 2 callersFunctionfind_fallback_target_version
Derive target version from `required-version` in `pyproject.toml`, if such a file exists in an ancestor directory.
crates/ruff_workspace/src/pyproject.rs:147
↓ 2 callersFunctionfind_file_opens
Find and return all `open` operations in the given `with` statement.
crates/ruff_linter/src/rules/refurb/helpers.rs:180
↓ 2 callersMethodfind_first_index
Finds the index of the node that fully covers the range and fulfills the given predicate. If there are no nodes matching the given predicate, then `N
crates/ruff_python_ast/src/find_node.rs:127
↓ 2 callersFunctionfind_function
( statements: &'ast [ast::Stmt], selector: &str, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4477
↓ 2 callersFunctionfind_generic
Search `class_bases` for a `typing.Generic` base class. Returns the `Generic` expression (if any), along with its index in the class's bases tuple.
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/mod.rs:431
↓ 2 callersFunctionfind_interpreter_in_directory
Tries common interpreter names such as `python3`, `pypy`, and `graalpy` before scanning for names that include a minor version, such as `python3.13`.
crates/ty_site_packages/src/lib.rs:208
↓ 2 callersMethodfind_known_decorator_span
Iterate through the decorators on this function, returning the span of the first one that matches the given [`KnownFunction`].
crates/ty_python_semantic/src/types/function.rs:430
↓ 2 callersMethodfind_known_decorator_span
Iterate through the decorators on this class, returning the span of the first one that matches the given [`KnownFunction`].
crates/ty_python_semantic/src/types/class/static_literal.rs:533
↓ 2 callersMethodfind_line_index
(&self, offset: TextSize)
crates/ruff_linter/src/noqa.rs:1283
↓ 2 callersFunctionfind_logging_call
( checker: &Checker, call: &ast::ExprCall, )
crates/ruff_linter/src/rules/flake8_logging_format/rules/logging_call.rs:238
↓ 2 callersMethodfind_member
(&self, symbol_name: &str)
crates/ty_python_semantic/src/importer.rs:591
↓ 2 callersMethodfind_non_alias_diagnostics
Find diagnostics explaining why the referenced assignment is not a valid type alias.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:401
↓ 2 callersFunctionfind_parameter_separators
Finds slash and star in `f(a, /, b, *, c)` or `lambda a, /, b, *, c: 1`. Returns the location of the slash and star separators, if any.
crates/ruff_python_formatter/src/other/parameters.rs:344
↓ 2 callersFunctionfind_reportable_failure
Return a failure if the test executable fails and any configured baseline passes.
python/py-fuzzer/fuzz.py:341
↓ 2 callersFunctionfind_runtime_varying_call
Recursively check an expression for calls to known runtime-varying functions. Returns the call expression and a display name (e.g., `"datetime.now"`)
crates/ruff_linter/src/rules/airflow/rules/runtime_value_in_dag_or_task.rs:99
↓ 2 callersMethodfind_suppression
Returns the suppression that takes precedence for the diagnostic `range` and lint `id`. Nested suppression ranges prefer the innermost candidate. If
crates/ty_python_semantic/src/suppression.rs:405
↓ 2 callersFunctionfind_suppression_comments
( diagnostics: &'a [Diagnostic], locator: &'a Locator, exemption: &'a FileExemption, directive
crates/ruff_linter/src/noqa.rs:958
↓ 2 callersFunctionfind_typevar_binding
Finds the nearest visible binding under the requested treatment of return-only callable type variables. Captured `ParamSpec` bindings are recovered f
crates/ty_python_semantic/src/types/generics.rs:146
↓ 2 callersFunctionfind_user_settings_toml
()
crates/ruff_workspace/src/pyproject.rs:159
↓ 2 callersFunctionfind_will_execute_event
( db: &dyn salsa::Database, query: Q, input: I, events: &'a [salsa::Event], )
crates/ruff_db/src/testing.rs:107
↓ 2 callersMethodfinish
(self)
crates/ty_ide/src/will_rename.rs:1121
↓ 2 callersMethodfinish
(mut self)
crates/ty_python_semantic/src/suppression.rs:656
↓ 2 callersMethodfinish
(mut self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:300
↓ 2 callersMethodfinish
(mut self, locator: &'a Locator<'a>)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:449
↓ 2 callersMethodfinish_active_visit
(&self, item: &T)
crates/ty_python_semantic/src/types/cyclic.rs:1010
↓ 2 callersMethodfinish_current_item
(&mut self)
crates/ty_ide/src/docstring/document/numpy.rs:564
↓ 2 callersMethodfinish_current_item
(&mut self)
crates/ty_ide/src/docstring/document/google.rs:630
↓ 2 callersMethodfinish_inference
( &self, inference: PendingInference<'db, SolutionPaths<'db>>, budget: SolutionBudget,
crates/ty_python_semantic/src/types/generics.rs:3198
↓ 2 callersMethodfinish_inferred_definition
(self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:12507
↓ 2 callersMethodfinish_leading_prose
(&mut self)
crates/ty_ide/src/docstring/document/google.rs:623
↓ 2 callersMethodfinish_legacy_type_alias
( mut self, definition: Definition<'db>, value: &ast::Expr, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:158
↓ 2 callersMethodfinish_line
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:428
↓ 2 callersMethodfinish_pending_fragments
(&mut self)
crates/ty_ide/src/docstring/document/numpy.rs:552
↓ 2 callersMethodfinish_ranges
Drops the default ranges that served as barriers between non-contiguous ranges with the same reachability while building the map.
crates/ty_python_core/src/use_def.rs:3322
↓ 2 callersMethodfinish_section
(&mut self, section: SectionBuilder<'a>)
crates/ty_ide/src/docstring/document/numpy.rs:224
↓ 2 callersMethodfinish_section
(&mut self, section: SectionBuilder<'a>)
crates/ty_ide/src/docstring/document/google.rs:317
↓ 2 callersMethodfinish_uncompacted
(mut self)
crates/ty_python_semantic/src/types/context.rs:446
↓ 2 callersMethodfirst_binding_at_use
(&self, use_id: ScopedUseId)
crates/ty_python_core/src/lib.rs:1210
↓ 2 callersMethodfirst_element
(&self)
crates/ty_python_semantic/src/types/mro.rs:637
↓ 2 callersMethodfirst_keyword_range
Returns the range of the first keyword that marks the start of the clause header.
crates/ruff_python_formatter/src/statement/clause.rs:247
↓ 2 callersMethodfirst_name
(&self)
crates/ty_python_semantic/src/types/abstract_methods.rs:234
↓ 2 callersFunctionfirst_non_trivia_token
Searches for the first non-trivia character after `offset`. The search skips over any whitespace and comments. Returns `Some` if the source code aft
crates/ruff_python_trivia/src/tokenizer.rs:13
↓ 2 callersMethodfirst_non_type_parent_scope_id
Returns the first parent of the given [`ScopeId`] that is not of [`ScopeKind::Type`] or [`ScopeKind::DunderClassCell`], if any.
crates/ruff_python_semantic/src/model.rs:1614
↓ 2 callersMethodfirst_overload_or_implementation
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1748
↓ 2 callersMethodfirst_public_declaration
(&self, symbol: ScopedSymbolId)
crates/ty_python_core/src/lib.rs:1203
↓ 2 callersFunctionfix_all_diagnostics
Applies the safe fixes for all diagnostics and writes the changed files back to disk. Returns how many diagnostics were fixed along with the remainin
crates/ty_python_semantic/src/fixes.rs:60
↓ 2 callersFunctionfix_all_edit
( query: &DocumentQuery, encoding: PositionEncoding, )
crates/ruff_server/src/server/api/requests/code_action_resolve.rs:126
↓ 2 callersFunctionfixed_membership_truthiness
Evaluate membership using the supplied element types and identity-or-equality semantics. An ambiguous comparison does not prevent a later element from
crates/ty_python_semantic/src/types/infer/comparisons.rs:772
↓ 2 callersMethodfixed_prefix_slice
( &self, start: Option<usize>, stop: Option<usize>, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1571
↓ 2 callersMethodfixed_suffix_slice
( &self, start: Option<usize>, stop: Option<usize>, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1580
↓ 2 callersMethodfixes
( self, db: &dyn Db, file: PythonFile<'_>, file_diagnostics: &[Diagnostic],
crates/ty_python_semantic/src/fixes.rs:403
↓ 2 callersFunctionfixture_exposures_from_symbol_definitions
Returns fixture exposures reachable from the resolved definitions for one symbol.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1169
↓ 2 callersFunctionfixture_path
(path: &str)
crates/ruff_server/tests/e2e/notebook.rs:402
↓ 2 callersFunctionfixture_reference_resolution_for_definition
( db: &'db dyn SemanticDb, definition: Definition<'db>, name: &str, )
crates/ty_ide/src/references.rs:484
↓ 2 callersMethodfloor_char_boundary
Finds the closest [`TextSize`] not exceeding the offset for which `is_char_boundary` is `true`. ## Examples ``` # use ruff_text_size::{Ranged, TextR
crates/ruff_linter/src/locator.rs:95
↓ 2 callersMethodflush
(&mut self)
crates/ruff_db/src/diagnostic/render.rs:101
↓ 2 callersMethodflush_line_suffixes
( &mut self, queue: &mut PrintQueue<'a>, stack: &mut PrintCallStack, line_brea
crates/ruff_formatter/src/printer/mod.rs:513
↓ 2 callersMethodflush_pending
(&mut self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:268
↓ 2 callersMethodflush_pending_link
Flushes a wrapped hyperlink candidate.
crates/ty_ide/src/docstring/markdown/general.rs:314
↓ 2 callersMethodfmt
(&self, f: &mut Formatter<PyFormatContext<'ast>>)
crates/ruff_python_formatter/src/builders.rs:32
↓ 2 callersMethodfmt
(&self, f: &mut Formatter<PyFormatContext<'_>>)
crates/ruff_python_formatter/src/verbatim.rs:660
↓ 2 callersMethodfmt
(&self, item: &Mod, f: &mut PyFormatter)
crates/ruff_python_formatter/src/module/mod.rs:13
↓ 2 callersMethodfmt
(&self, item: &TypeParam, f: &mut PyFormatter)
crates/ruff_python_formatter/src/type_param/mod.rs:15
↓ 2 callersMethodfmt
(&self, f: &mut PyFormatter)
crates/ruff_python_formatter/src/string/mod.rs:20
↓ 2 callersMethodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
crates/ty_python_semantic/src/types/constraints.rs:1028
↓ 2 callersFunctionfmt_styled
( content: T, style: anstyle::Style, )
crates/ruff_db/src/diagnostic/stylesheet.rs:6
↓ 2 callersFunctionfolding_ranges
Returns a list of folding ranges for the given file.
crates/ty_ide/src/folding_range.rs:57
↓ 2 callersMethodfollowing_range
Returns the absolute range of the following lines.
crates/ruff_linter/src/docstrings/sections.rs:420
↓ 2 callersMethodfollowing_range_relative
Returns the range to the following lines relative to [`Docstring::body`].
crates/ruff_linter/src/docstrings/sections.rs:415
↓ 2 callersFunctionfoo
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/unary.py:185
↓ 2 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/flake8_pie/PIE804.py:29
↓ 2 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E27.py:84
↓ 2 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC119.py:48
↓ 2 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP050.py:63
↓ 2 callersMethodfoo
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/lambda.py:326
← previousnext →5,601–5,700 of 31,766, ranked by callers