MCPcopy Create free account

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

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

↓ 8 callersMethodshadowed_bindings
Returns an iterator over all bindings that the given binding shadows, including itself.
crates/ruff_python_semantic/src/scope.rs:130
↓ 8 callersMethodshould_check_file
(&self, file: File)
crates/ty_python_semantic/src/db.rs:161
↓ 8 callersMethodspawn
(self, f: F)
crates/ty_server/src/server/schedule/thread.rs:62
↓ 8 callersMethodstart_token
(&mut self)
crates/ruff_python_trivia/src/cursor.rs:82
↓ 8 callersMethodsubject
Create a binding that aliases the current subject.
crates/ty_python_semantic/src/types/narrow.rs:335
↓ 8 callersMethodsuffix_len
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1272
↓ 8 callersMethodsupertypes
(&self)
crates/ty_ide/src/type_hierarchy.rs:741
↓ 8 callersMethodsync_wakeups
Returns a receiver for background synchronization wakeups. A wakeup indicates that synchronization results may be ready to process with [`poll_sync`]
crates/ty_project/src/uv/environments.rs:167
↓ 8 callersMethodto_format_options
( &self, source_type: PySourceType, source: &str, path: Option<&Path>, )
crates/ruff_workspace/src/settings.rs:214
↓ 8 callersMethodtokens
(&self)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:30
↓ 8 callersMethodtry_await
Resolve the type of an `await …` expression where `self` is the type of the awaitable.
crates/ty_python_semantic/src/types.rs:8833
↓ 8 callersMethodtry_call_dunder_with_policy
Same as `try_call_dunder`, but allows specifying a policy for the member lookup. In particular, this allows to specify `MemberLookupPolicy::MRO_NO_OBJ
crates/ty_python_semantic/src/types.rs:8502
↓ 8 callersMethodunion_type
Returns the type this union denotes, or the first error from interpreting an operand as a type expression.
crates/ty_python_semantic/src/types/union_type_instance.rs:139
↓ 8 callersMethodupdate_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:257
↓ 8 callersMethodupdated_signature
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1290
↓ 8 callersMethodvariable
( db: &'db dyn Db, origin: VarianceOrigin<'db>, typevar: BoundTypeVarIdentity<'db>,
crates/ty_python_semantic/src/types/variance/equations.rs:36
↓ 8 callersMethodvariance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1417
↓ 8 callersFunctionvendored_path_to_file
( db: &dyn Db, path: impl AsRef<VendoredPath>, )
crates/ruff_db/src/files.rs:53
↓ 8 callersMethodvisit_body
(&mut self, body: &'a [Stmt])
crates/ruff_linter/src/checkers/ast/mod.rs:2527
↓ 8 callersMethodvisit_body
(&mut self, body: &[Stmt])
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:134
↓ 8 callersMethodwith_failure_code
(self, code: server::ErrorCode)
crates/ty_server/src/server/api.rs:594
↓ 8 callersMethodwith_transformed_parameters
Rebuild this parameter list after transforming its existing parameters. Unlike [`Self::from_annotation`], this preserves the provenance of the origin
crates/ty_python_semantic/src/types/signatures.rs:5160
↓ 8 callersMethodwith_vendored_typeshed
Use the vendored stdlib stubs included in the Ruff binary for this test case
crates/ty_module_resolver/src/testing.rs:197
↓ 8 callersMethodwrite
(&self, formatter: &mut impl std::fmt::Write)
crates/ruff_python_literal/src/escape.rs:132
↓ 7 callersMethodabsolute
Makes a path absolute and normalizes it without accessing the file system. Adapted from [cargo](https://github.com/rust-lang/cargo/blob/fede83ccf9734
crates/ruff_db/src/system/path.rs:461
↓ 7 callersMethodadd
( &mut self, pattern: &AbsolutePortableGlobPattern, )
crates/ty_project/src/glob/exclude.rs:81
↓ 7 callersMethodadd_start
(&self, amount: TextSize)
crates/ruff_text_size/src/range.rs:429
↓ 7 callersMethodadd_workspace_folder
Adds a workspace folder configuration to this wrapper's state. This is meant to roughly model VS Code's "Add Folder to Workspace" functionality. Thi
crates/ty_server/tests/e2e/main.rs:1205
↓ 7 callersMethodall_rules
Return all matching rules, regardless of rule status filters like preview and deprecated.
crates/ruff_linter/src/rule_selector.rs:246
↓ 7 callersFunctionany_over_type_including_alias_arguments
Searches through the arguments of [`Type::TypeAlias`] without evaluating alias bodies or other lazy attributes. This also visits arguments that the al
crates/ty_python_semantic/src/types/visitor.rs:1093
↓ 7 callersMethodapplies
Return [`true`] if this [`Fix`] should be applied with at a given [`Applicability`].
crates/ruff_diagnostics/src/fix.rs:175
↓ 7 callersFunctionapply_fixes
Apply a series of fixes.
crates/ruff_linter/src/fix/mod.rs:54
↓ 7 callersMethodargument_matches
Returns a vector where each index corresponds to an argument position, and the value is the parameter index that argument maps to (if any).
crates/ty_python_semantic/src/types/call/bind.rs:9891
↓ 7 callersMethodas_any_string_flags
(self)
crates/ruff_python_ast/src/nodes.rs:1042
↓ 7 callersMethodas_atomic
(self, storage: &ConstraintSetStorage<'_>)
crates/ty_python_semantic/src/types/constraints.rs:1791
↓ 7 callersMethodas_callable
(self)
crates/ty_python_semantic/src/types.rs:3160
↓ 7 callersMethodas_constructor
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:386
↓ 7 callersMethodas_int
(self)
crates/ty_python_semantic/src/types/literal.rs:236
↓ 7 callersMethodas_lint
(&self)
crates/ruff_db/src/diagnostic/mod.rs:1081
↓ 7 callersMethodas_result
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/call/bind.rs:422
↓ 7 callersMethodas_slice
(&self)
crates/ruff_formatter/src/format_element.rs:367
↓ 7 callersMethodas_str
(&self)
crates/ty_project/src/metadata.rs:634
↓ 7 callersMethodas_str
(&self)
crates/ruff_db/src/system/path.rs:390
↓ 7 callersMethodas_str
(&self)
crates/mdtest/src/parser.rs:349
↓ 7 callersMethodas_str
(self)
crates/ruff_linter/src/docstrings/sections.rs:102
↓ 7 callersMethodas_try_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:917
↓ 7 callersMethodas_utf8_path
(&self)
crates/ruff_db/src/system/path.rs:402
↓ 7 callersMethodassert
(&self, db: &TestDb)
crates/ty_module_resolver/src/resolve/search.rs:1573
↓ 7 callersFunctionassert_declarations
(place: &PlaceState, expected: &[&str])
crates/ty_python_core/src/use_def/place_state.rs:815
↓ 7 callersFunctionassert_edits
(actual: Option<&WorkspaceEdit>, expected: &[(Uri, &[ExpectedEdit<'_>])])
crates/ty_server/tests/e2e/will_rename_files.rs:417
↓ 7 callersFunctionassert_eq_slice
( db: &dyn Db, input: &[char; N], start: Option<i32>, stop: Option<i32>,
crates/ty_python_semantic/src/subscript.rs:318
↓ 7 callersFunctionbar
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF070.py:97
↓ 7 callersFunctionbind_typevar
Binds an unbound typevar. When a typevar is first created, we will have a [`TypeVarInstance`] which does not have an associated binding context. When
crates/ty_python_semantic/src/types/generics.rs:96
↓ 7 callersFunctioncallable
(x)
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B004.py:21
↓ 7 callersMethodcanonicalize_path
(&self, path: &SystemPath)
crates/ty_test/src/db.rs:518
↓ 7 callersMethodcell_row
Returns the row number (1-based) in the cell (1-based) for the given row (1-based).
crates/ruff_notebook/src/index.rs:35
↓ 7 callersFunctioncheck_solutions_for_constraint_orderings
( db: &'db TestDb, typevars: &[BoundTypeVarInstance<'db>], atoms: &[PermutedConstraint
crates/ty_python_semantic/src/types/constraints.rs:6445
↓ 7 callersMethodcmp
(&self, other: &Self)
crates/ruff/src/args.rs:1280
↓ 7 callersMethodcmp
(&self, other: &Self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:613
↓ 7 callersFunctioncollect_unused_bindings
(source: &str)
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:251
↓ 7 callersMethodcolumns
Returns the indentation's visual width in columns/spaces. For docstring indentation, black counts spaces as 1 and tabs by increasing the indentation
crates/ruff_python_formatter/src/string/docstring.rs:1713
↓ 7 callersMethodcomparison_soundness_policy
(&self)
crates/ty_python_semantic/src/types/narrow.rs:2178
↓ 7 callersFunctioncompute_replacement
(source: &str, modified: &str)
crates/ruff_server/src/edit/replacement.rs:70
↓ 7 callersMethodconcat
Concatenates another tuple to the end of this tuple, returning a new tuple.
crates/ty_python_semantic/src/types/tuple.rs:3107
↓ 7 callersMethodcondition_expects_equality
Return whether the selected branch requires the operands to compare equal.
crates/ty_python_semantic/src/types/equality.rs:1868
↓ 7 callersMethodconstraint_support
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1573
↓ 7 callersMethodconstraint_tables
(&self)
crates/ty_python_core/src/use_def.rs:1039
↓ 7 callersMethodconstructor
Restore the formal arguments and remove materialization for constructor analysis.
crates/ty_python_semantic/src/types/recursive.rs:511
↓ 7 callersFunctioncreate_file
Helper function to create a file with parent directories
crates/ruff_linter/src/rules/isort/categorize.rs:439
↓ 7 callersMethodcurrent_directory
(&self)
crates/ruff_db/src/system/memory_fs.rs:66
↓ 7 callersMethodcurrent_flags
(&self)
crates/ruff_python_parser/src/lexer.rs:131
↓ 7 callersMethodcurrent_use_def_map
(&self)
crates/ty_python_core/src/builder.rs:1083
↓ 7 callersMethoddisplay
(&self, workspace: &Workspace)
crates/ty_wasm/src/lib.rs:981
↓ 7 callersFunctiondocumentation_trim
Normalizes tabs and trims a docstring as specified in PEP-0257 See: <https://peps.python.org/pep-0257/#handling-docstring-indentation>
crates/ty_ide/src/docstring.rs:78
↓ 7 callersMethoddocumentation_url
(&self)
crates/ruff_db/src/diagnostic/mod.rs:413
↓ 7 callersMethoddownstream_constructor_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:309
↓ 7 callersFunctiondraw_col_separator_no_space
( renderer: &Renderer, buffer: &mut StyledBuffer, line: usize, col: usize, )
crates/ruff_annotate_snippets/src/renderer/render.rs:2204
↓ 7 callersMethodenable_inlay_hints
Enable or disable inlay hints capability
crates/ty_server/tests/e2e/main.rs:1478
↓ 7 callersMethodenable_work_done_progress
(mut self, enabled: bool)
crates/ty_server/tests/e2e/main.rs:1449
↓ 7 callersMethodenvironment
(&self)
crates/ty_project/src/uv/metadata.rs:44
↓ 7 callersMethodenvironment
The program in which the recursive type's body was constructed.
crates/ty_python_semantic/src/types/recursive.rs:522
↓ 7 callersFunctionequality_truthiness
Return the truthiness of `left == right` when it is known for every represented runtime value. A result that only permits narrowing remains ambiguous
crates/ty_python_semantic/src/types/equality.rs:267
↓ 7 callersMethoderror
(self, message)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:129
↓ 7 callersMethoderrors
Returns a list of syntax errors found during parsing.
crates/ruff_python_parser/src/lib.rs:414
↓ 7 callersFunctionexact_alternatives
( db: &'db TestDb, constraints: &'c ConstraintSetBuilder<'db>, typevars: [BoundTypeVar
crates/ty_python_semantic/src/types/generics.rs:5149
↓ 7 callersMethodexpand_aliases
Recursively expands aliases that expose top-level union elements. Aliases nested inside non-union elements remain part of those elements.
crates/ty_python_semantic/src/types/set_theoretic.rs:238
↓ 7 callersMethodexpect_class
(&self)
crates/ty_python_core/src/scope.rs:422
↓ 7 callersMethodextract
Extract the [`FileNoqaDirectives`] for a given Python source file, enumerating any rules that are globally ignored within the file.
crates/ruff_linter/src/noqa.rs:260
↓ 7 callersMethodfallback_element_type
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/iteration.rs:669
↓ 7 callersMethodfallback_truthiness
(&self)
crates/ty_python_semantic/src/types/bool.rs:422
↓ 7 callersMethodfile_path
(&self, path: impl AsRef<Path>)
crates/ruff_server/tests/e2e/main.rs:670
↓ 7 callersMethodfind_name_in_mro_with_policy
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, p
crates/ty_python_semantic/src/types.rs:4290
↓ 7 callersFunctionfind_only_token_in_range
Returns the only non-trivia, non-closing parenthesis token in `range`. Includes debug assertions that the range only contains that single token.
crates/ruff_python_trivia/src/tokenizer.rs:22
↓ 7 callersMethodfinish
(self)
crates/ruff_python_parser/src/lexer.rs:1442
↓ 7 callersMethodfinish
(self)
crates/ty_python_semantic/src/types/context.rs:438
↓ 7 callersMethodfixed_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1247
↓ 7 callersMethodflags
(&self)
crates/ruff_python_formatter/src/string/normalize.rs:271
↓ 7 callersMethodflags
(&self)
crates/ruff_linter/src/docstrings/mod.rs:25
↓ 7 callersMethodflush
(&mut self)
crates/ruff_db/src/parsed.rs:418
↓ 7 callersFunctionfollowed_by_astimezone
Check if the "current expression" being visited is followed in the source code by a chain of `.replace()` calls followed by `.astimezone`. The functio
crates/ruff_linter/src/rules/flake8_datetimez/helpers.rs:63
← previousnext →2,001–2,100 of 31,766, ranked by callers