MCPcopy Create free account

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

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

↓ 2 callersMethodexpansions
Prepares lazy argument type expansions for overload resolution.
crates/ty_python_semantic/src/types/call/arguments.rs:839
↓ 2 callersMethodexpect_dynamic
(self)
crates/ty_python_semantic/src/types.rs:3189
↓ 2 callersMethodexpect_enum_literal
(self)
crates/ty_python_semantic/src/types.rs:3363
↓ 2 callersMethodexpect_ipy_notebook
(self)
crates/ruff_linter/src/source_kind.rs:65
↓ 2 callersMethodexpected_system_site_packages
(&self)
crates/ty_site_packages/src/lib.rs:2715
↓ 2 callersMethodexpected_system_stdlib
(&self)
crates/ty_site_packages/src/lib.rs:2737
↓ 2 callersFunctionexplicit_attribute_write_requirement
Convert an explicitly resolved member into either a descriptor call or a direct type check. A slot descriptor writes directly to instance storage, so
crates/ty_python_semantic/src/types/attribute_write.rs:757
↓ 2 callersFunctionexplicit_global_symbol
Infers the public type of an explicit module-global symbol as seen from within the same file. Note that all global scopes also include various "impli
crates/ty_python_semantic/src/place.rs:496
↓ 2 callersMethodexplicit_member_type_context
( &self, requirement: &ExplicitAttributeWriteRequirement<'db>, )
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:788
↓ 2 callersMethodexplored_node_key
( &mut self, storage: &mut ConstraintSetStorage<'db>, path: &mut PathAssignments,
crates/ty_python_semantic/src/types/constraints/solutions.rs:554
↓ 2 callersFunctionexported_names
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_core/src/re_exports.rs:41
↓ 2 callersMethodexported_symbols_for
Returns the [`FlatSymbols`] for the module at the given path. The path given must have been written to this test's salsa DB.
crates/ty_ide/src/symbols.rs:3303
↓ 2 callersFunctionexposures_contributed_by_definition
Returns fixture exposures contributed by a symbol definition.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1102
↓ 2 callersMethodexpression
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:786
↓ 2 callersMethodexpression_type
(&self, expression: &ast::Expr)
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:451
↓ 2 callersMethodextend
Extends the line suffixes with `elements`, storing their call stack arguments with them.
crates/ruff_formatter/src/printer/line_suffixes.rs:12
↓ 2 callersMethodextend
(&mut self, other: Self)
crates/ty_ide/src/references.rs:471
↓ 2 callersMethodextend
Extends the current set of names with the names from the given expression which can be either a list/tuple/set of string-literal names or a module's `
crates/ty_python_semantic/src/dunder_all.rs:79
↓ 2 callersMethodextend
(&mut self, other: &TypeCheckDiagnostics)
crates/ty_python_semantic/src/types/diagnostic.rs:1671
↓ 2 callersMethodextend_all
Extends the current set of names with the names from the given expression which currently must be a list/tuple/set of string-literal names. This curre
crates/ty_ide/src/symbols.rs:1006
↓ 2 callersMethodextend_diagnostics
(&mut self, diagnostics: impl IntoIterator<Item = Diagnostic>)
crates/ty_python_semantic/src/types/diagnostic.rs:1691
↓ 2 callersMethodextend_expression_unchecked
(&mut self, inference: &ExpressionInference<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:775
↓ 2 callersFunctionextend_lsp_edits
Appends replacements grouped by document URI, skipping edits without an LSP location.
crates/ty_server/src/document.rs:26
↓ 2 callersMethodextend_with_class_members
Add members from `class_literal` (including following its parent classes). `ty` should be the original type that we're adding members for. For exampl
crates/ty_python_semantic/src/types/list_members.rs:503
↓ 2 callersMethodextend_with_instance_members
Extend with instance members from a class and all classes in its MRO.
crates/ty_python_semantic/src/types/list_members.rs:635
↓ 2 callersMethodextend_with_slot_members
Includes slot descriptors that are generated outside the class-body symbol table. ```python class Example: __slots__ = ("value",) ``` Both `Example`
crates/ty_python_semantic/src/types/list_members.rs:540
↓ 2 callersMethodextend_with_type
(&mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>)
crates/ty_python_semantic/src/types/list_members.rs:176
↓ 2 callersFunctionexternal_stub_fixture_cursor_test_with_stub
( test_source: &str, stub_source: &str, )
crates/ty_ide/src/find_references.rs:3152
↓ 2 callersMethodextra_configuration_paths
Returns configuration paths outside normal project discovery that should be watched.
crates/ty_project/src/metadata.rs:416
↓ 2 callersFunctionextract_isort_directives
Extract a set of ranges over which to disable isort.
crates/ruff_linter/src/directives.rs:205
↓ 2 callersFunctionextract_literal_container_element_types
Extract precise element types for membership in an immediately consumed list or set display. The ordinary inferred container type remains unchanged.
crates/ty_python_semantic/src/types/iteration.rs:115
↓ 2 callersFunctionextract_local_override_definitions
( context: &InferContext<'db, '_>, member: &Member<'db>, subclass_scope: ScopeId<'db>, )
crates/ty_python_semantic/src/types/overrides.rs:2227
↓ 2 callersFunctionextract_noqa_line_for
Extract a mapping from logical line to noqa line.
crates/ruff_linter/src/directives.rs:109
↓ 2 callersFunctionextract_options
Extract [`ParseOptions`] from an initial pragma line, if present. For example, ```python # parse_options: { "target-version": "3.10" } def f(): ...
crates/ruff_python_parser/tests/fixtures.rs:295
↓ 2 callersMethodextract_pending
(&mut self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:263
↓ 2 callersFunctionextract_underlying_functions
Extract callable functions represented by a type. These may be defined in files other than the one being checked.
crates/ty_python_semantic/src/types/list_members.rs:906
↓ 2 callersFunctionextract_unpacked_typed_dict_keys_from_value_type
Extracts `TypedDict` keys, their value types, and whether they are required when an unpacked `**kwargs` value has this type, resolving type aliases an
crates/ty_python_semantic/src/types/typed_dict.rs:1915
↓ 2 callersFunctionf
()
crates/ruff_python_parser/resources/inline/ok/single_star_in_tuple.py:1
↓ 2 callersFunctionf
()
crates/ruff_python_parser/resources/inline/err/yield_after_comma.py:1
↓ 2 callersFunctionf
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM108.py:124
↓ 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_declared_type
For a member binding without a live place declaration, obtain its declared type from normal attribute or subscript lookup on its receiver.
crates/ty_python_semantic/src/types/infer/builder.rs:1721
↓ 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:8612
↓ 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:388
↓ 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_renames
(db: &TestDb, paths: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:1970
↓ 2 callersFunctionfile_settings
(db: &dyn Db, file: File)
crates/ty_project/src/metadata/settings.rs:133
↓ 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:95
↓ 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:1108
↓ 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:415
↓ 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:860
↓ 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:267
↓ 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:3577
↓ 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:534
↓ 2 callersMethodfind_line_index
(&self, offset: TextSize)
crates/ruff_linter/src/noqa.rs:1284
↓ 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:590
↓ 2 callersMethodfind_name_in_mro
This function is roughly equivalent to `find_name_in_mro` as defined in the [descriptor guide] or [`_PyType_Lookup`] in CPython's `Objects/typeobject.
crates/ty_python_semantic/src/types.rs:4282
↓ 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:402
↓ 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:1023
↓ 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:299
↓ 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:998
↓ 2 callersMethodfinish_current_item
(&mut self)
crates/ty_ide/src/docstring/document/numpy.rs:566
↓ 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:3185
↓ 2 callersMethodfinish_inferred_definition
(self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:12360
↓ 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:159
↓ 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:554
↓ 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
← previousnext →5,501–5,600 of 31,562, ranked by callers