MCPcopy Create free account

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

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

↓ 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 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:9706
↓ 7 callersMethodas_any_string_flags
(self)
crates/ruff_python_ast/src/nodes.rs:1029
↓ 7 callersMethodas_callable
(self)
crates/ty_python_semantic/src/types.rs:3161
↓ 7 callersMethodas_constructor
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:373
↓ 7 callersMethodas_int
(self)
crates/ty_python_semantic/src/types/literal.rs:221
↓ 7 callersMethodas_lint
(&self)
crates/ruff_db/src/diagnostic/mod.rs:1110
↓ 7 callersMethodas_literal_value
(self)
crates/ty_python_semantic/src/types.rs:3215
↓ 7 callersMethodas_result
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/call/bind.rs:409
↓ 7 callersMethodas_slice
(&self)
crates/ruff_formatter/src/format_element.rs:367
↓ 7 callersMethodas_str
(&self)
crates/ty_project/src/metadata.rs:626
↓ 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:1578
↓ 7 callersFunctionassert_declarations
(place: &PlaceState, expected: &[&str])
crates/ty_python_core/src/use_def/place_state.rs:815
↓ 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:6332
↓ 7 callersMethodcheck_types_impl
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Con
crates/ty_python_semantic/src/types/call/bind.rs:1390
↓ 7 callersMethodclose_text_document
Send a `textDocument/didClose` notification
crates/ty_server/tests/e2e/main.rs:939
↓ 7 callersMethodcode
(&self)
crates/ruff_benchmark/src/lib.rs:51
↓ 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:1716
↓ 7 callersMethodcomparison_soundness_policy
(&self)
crates/ty_python_semantic/src/types/narrow.rs:2176
↓ 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:1839
↓ 7 callersMethodconstraint_support
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1644
↓ 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 callersMethoddiagnostic_mode
(&self)
crates/ty_server/src/session/settings.rs:17
↓ 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 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:1471
↓ 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:5128
↓ 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:220
↓ 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:4291
↓ 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:419
↓ 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
↓ 7 callersFunctionfoo
()
crates/ty_python_semantic/resources/corpus/57_await.py:1
↓ 7 callersFunctionfoo
function without params, single line docstring
crates/ruff_linter/resources/test/fixtures/flake8_quotes/docstring_singles_function.py:1
↓ 7 callersFunctiongenerated_file_diff
Limit generated-file diffs so stale files do not overwhelm CI logs.
crates/ruff_dev/src/generate_all.rs:58
↓ 7 callersMethodget
(&self, place: ScopedPlaceId, is_positive: bool)
crates/ty_python_semantic/src/types/narrow.rs:1397
↓ 7 callersMethodget_source_type
Return a mapped [`SourceType`] for a given path.
crates/ruff_linter/src/settings/types.rs:518
↓ 7 callersMethodglobal_settings
(&self)
crates/ty_server/src/session.rs:1481
↓ 7 callersMethodgroup_id
Creates a new unique group id with the given debug name.
crates/ruff_formatter/src/group_id.rs:70
↓ 7 callersMethodhas_explicit_return_annotation
Returns `true` if any overload or implementation has an explicit return annotation. This distinguishes untyped decorators that infer an unknown retur
crates/ty_python_semantic/src/types/function.rs:1725
↓ 7 callersMethodhas_explicit_slots
Returns whether this class body explicitly defines `__slots__`.
crates/ty_python_semantic/src/types/class/slots.rs:223
↓ 7 callersMethodhas_typevar_or_typevar_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:124
↓ 7 callersMethodhomogeneous_type
(self)
crates/ty_python_semantic/src/types/tuple.rs:924
↓ 7 callersMethodhover_request
Send a `textDocument/hover` request for the document at the given path and position.
crates/ruff_server/tests/e2e/main.rs:810
↓ 7 callersFunctionid
(lint_name: &'static str)
crates/ruff_db/src/diagnostic/render.rs:2924
↓ 7 callersMethodin_exception_handler
Return `true` if the model is in an exception handler.
crates/ruff_python_semantic/src/model.rs:2215
↓ 7 callersFunctionin_parentheses_only_group
Makes `content` a group, but only if the outer expression is parenthesized (a list, parenthesized expression, dict, ...) or if the expression gets par
crates/ruff_python_formatter/src/expression/parentheses.rs:297
↓ 7 callersMethodindex
(self)
crates/ty_python_core/src/ast_ids.rs:333
↓ 7 callersMethodinfer_body
(&mut self, suite: &[ast::Stmt])
crates/ty_python_semantic/src/types/infer/builder.rs:2254
↓ 7 callersMethodinfer_type_expression_no_store
Infer the type of a type expression without storing the result.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:437
↓ 7 callersMethodinfer_value
(&mut self, tcx: TypeContext<'db>, emit_diagnostics: bool)
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:215
↓ 7 callersFunctioninferred_declaration
Infer the type of a declaration, returning `Rejected` if it is not valid.
crates/ty_python_semantic/src/types.rs:392
↓ 7 callersMethodinit
( package_roots: &FxHashMap<&'a Path, Option<PackageRoot<'a>>>, resolver: &Resolver, )
crates/ruff/src/cache.rs:423
↓ 7 callersMethodinsert_flags
(&mut self, flags: SymbolFlags)
crates/ty_python_core/src/symbol.rs:167
↓ 7 callersMethodinstall
Installs the dependencies required to type check the project.
scripts/ty_benchmark/src/benchmark/venv.py:77
↓ 7 callersMethodinstance_fallback
Return the instance type which this type is a subtype of. For example, the symbol `typing.Literal` is an instance of `typing._SpecialForm`, so `Speci
crates/ty_python_semantic/src/types/special_form.rs:193
↓ 7 callersMethodinterpolated_string_state
(&self)
crates/ruff_python_formatter/src/context.rs:114
↓ 7 callersMethodintersection
Create an "intersection" constraint: the previous type will be intersected with this constraint
crates/ty_python_semantic/src/types/narrow.rs:1135
↓ 7 callersMethodinto_bool
(self)
crates/ruff_python_ast/src/helpers.rs:1530
↓ 7 callersMethodinto_inner
(self)
crates/ty_python_semantic/src/types/constraints.rs:1885
↓ 7 callersMethodinto_iter
(self)
crates/mdtest/src/assertion.rs:178
↓ 7 callersMethodinto_vec
Returns the available solution paths, discarding completeness information.
crates/ty_python_semantic/src/types/constraints.rs:4827
↓ 7 callersMethodinto_vec
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13363
← previousnext →2,001–2,100 of 31,562, ranked by callers