MCPcopy Create free account

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

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

↓ 2 callersMethodremove_all
Removes all files and directories except the current working directory.
crates/ruff_db/src/system/memory_fs.rs:407
↓ 2 callersFunctionremove_covered_exclusions
Remove exclusions already covered by another union element: `A | (B & ~A) = A | B`. The coverage predicate must account for every materialization of
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:215
↓ 2 callersMethodremove_fix
Remove the fix for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:403
↓ 2 callersFunctionremove_import_members
Remove any imports matching `members` from an import-from statement.
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:8
↓ 2 callersFunctionremove_member
Remove the member at the given index from a sequence of expressions.
crates/ruff_linter/src/fix/edits.rs:294
↓ 2 callersMethodremove_self
( self, db: &'db dyn Db, binding_context: Option<BindingContext<'db>>, )
crates/ty_python_semantic/src/types/generics.rs:519
↓ 2 callersMethodremove_virtual_file
(&self, path: impl AsRef<SystemVirtualPath>)
crates/ruff_db/src/system/memory_fs.rs:300
↓ 2 callersMethodrename
( &mut self, document: &Uri, position: lsp_types::Position, new_name: &str,
crates/ty_server/tests/e2e/main.rs:995
↓ 2 callersMethodrenameRejection
()
playground/ty/src/Editor/Editor.tsx:282
↓ 2 callersMethodrender
Buffer a display once so label comparisons can reuse its text and navigation ranges.
crates/ty_python_semantic/src/types/display.rs:331
↓ 2 callersFunctionrender_github_report
Render reproducers and unchecked seeds within GitHub's size limit.
python/py-fuzzer/fuzz.py:605
↓ 2 callersMethodrender_line
(&mut self, line: &str, source_indentation: usize, render_rst_links: bool)
crates/ty_ide/src/docstring/markdown/general.rs:367
↓ 2 callersMethodrender_line_with_no_link_pending
(&mut self, output: &mut String, line: Line<'_>)
crates/ty_ide/src/docstring/markdown/general/inline.rs:156
↓ 2 callersMethodrender_markdown
Renders the section as Markdown into the given buffer.
crates/ty_ide/src/docstring/markdown/structured.rs:183
↓ 2 callersMethodrender_markdown
(&self, output: &mut String)
crates/ty_ide/src/docstring/markdown/general/inline.rs:397
↓ 2 callersFunctionrender_metadata
(metadata: dict[str, Any])
scripts/collect_ty_ecosystem_run_metadata.py:413
↓ 2 callersFunctionrender_summary
Render a summary of all project comparisons.
scripts/memory_report.py:187
↓ 2 callersFunctionrender_title
( renderer: &Renderer, buffer: &mut StyledBuffer, title: &dyn MessageOrTitle, max_line_num_len
crates/ruff_annotate_snippets/src/renderer/render.rs:319
↓ 2 callersFunctionrender_with_indentation_mode
Renders normalized docstring source with the selected treatment of leading indentation. Callers must expand tabs and normalize line endings to `\n`,
crates/ty_ide/src/docstring/markdown/general.rs:75
↓ 2 callersMethodreplace_parameter_defaults
Replace default types in parameters of callables with `Unknown`.
crates/ty_python_semantic/src/types.rs:10738
↓ 2 callersFunctionreplace_with_identity_check
Returns a fix that replace `range` with a generated `a is None`/`a is not None` check.
crates/ruff_linter/src/rules/refurb/helpers.rs:54
↓ 2 callersMethodreport
( &self, context: &InferContext<'db, '_>, superclass: ClassType<'db>, name: &N
crates/ty_python_semantic/src/types/overrides/attributes.rs:527
↓ 2 callersFunctionreport_failed_to_converge_error
( path: &Path, transformed: &str, diagnostics: &[Diagnostic], )
crates/ruff_linter/src/linter.rs:652
↓ 2 callersMethodreport_import_not_found
( &self, range: TextRange, level: u32, module: Option<&str>, module_na
crates/ty_python_semantic/src/types/infer/builder/imports.rs:130
↓ 2 callersFunctionreport_inconsistent_generic_bases
Report when separate bases contribute incompatible specializations of a generic ancestor. For example, if `A` inherits `G[int]` and `B` inherits `G[s
crates/ty_python_semantic/src/types/diagnostic.rs:5093
↓ 2 callersFunctionreport_invalid_attribute_assignment
( context: &InferContext, range: TextRange, target_ty: Type, source_ty: Type, attribute_na
crates/ty_python_semantic/src/types/diagnostic.rs:2465
↓ 2 callersFunctionreport_invalid_generator_yield_type
( context: &InferContext, object_range: impl Ranged, return_type_span: Option<Span>, expected_
crates/ty_python_semantic/src/types/diagnostic.rs:3035
↓ 2 callersFunctionreport_invalid_runtime_checkable
( context: &InferContext, node: impl Ranged, class: ClassLiteral, )
crates/ty_python_semantic/src/types/diagnostic.rs:3768
↓ 2 callersFunctionreport_invalid_type_checking_constant
(context: &InferContext, node: AnyNodeRef)
crates/ty_python_semantic/src/types/diagnostic.rs:3241
↓ 2 callersFunctionreport_marker
(report: str)
scripts/publish_pr_report.py:66
↓ 2 callersFunctionreport_missing_type_arguments
( context: &InferContext<'db, '_>, ty: Type<'db>, annotation: &ast::Expr, )
crates/ty_python_semantic/src/types/diagnostic.rs:917
↓ 2 callersFunctionreport_mro_error_kind
Report diagnostics for a dynamic MRO error. Shared by both `report_dynamic_mro_errors` (for `type()` / `new_class()`) and the functional enum path. `
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:321
↓ 2 callersFunctionreport_not_subscriptable
Emit a diagnostic declaring that a type does not support subscripting.
crates/ty_python_semantic/src/types/diagnostic.rs:1775
↓ 2 callersFunctionreport_possibly_missing_attribute
( context: &InferContext, target: &ast::ExprAttribute, attribute: &str, object_ty: Type, )
crates/ty_python_semantic/src/types/diagnostic.rs:3262
↓ 2 callersMethodreport_progress
(&self, work_done: &LazyWorkDoneProgress)
crates/ty_server/src/server/api/requests/workspace_diagnostic.rs:323
↓ 2 callersFunctionreport_revealed_type
Emit a `revealed-type` diagnostic for a `reveal_type(...)` call.
crates/ty_python_semantic/src/types/function.rs:2501
↓ 2 callersMethodreport_semantic_error
(&self, error: SemanticSyntaxError)
crates/ty_python_core/src/builder.rs:6016
↓ 2 callersFunctionreport_shadowed_type_variable
( context: &InferContext<'db, '_>, typevar_name: &ast::name::Name, kind: &str, name: &ast::nam
crates/ty_python_semantic/src/types/diagnostic.rs:5210
↓ 2 callersFunctionreport_shared_clock
(checker: &Checker, module: Option<&str>, member: &str, range: TextRange)
crates/ruff_linter/src/rules/ruff/rules/shared_clock_mock.rs:177
↓ 2 callersMethodreport_type_diagnostic
Push `diagnostic` if the checker is not in a `@no_type_check` context.
crates/ruff_linter/src/checkers/ast/mod.rs:627
↓ 2 callersFunctionreport_unsupported_augmented_assignment
( context: &InferContext<'db, '_>, stmt: &ast::StmtAugAssign, left_ty: Type<'db>, right_ty: Ty
crates/ty_python_semantic/src/types/diagnostic.rs:5880
↓ 2 callersFunctionreport_unsupported_base
( context: &InferContext, base_node: &ast::Expr, base_type: Type, class: StaticClassLiteral, )
crates/ty_python_semantic/src/types/diagnostic.rs:4525
↓ 2 callersFunctionreport_unsupported_binary_operation
( context: &InferContext<'db, '_>, binary_expression: &ast::ExprBinOp, left_ty: Type<'db>, rig
crates/ty_python_semantic/src/types/diagnostic.rs:5900
↓ 2 callersFunctionreport_unsupported_binary_operation_impl
( context: &'a InferContext<'a, 'a>, range: TextRange, left: &ast::Expr, right: &ast::Expr,
crates/ty_python_semantic/src/types/diagnostic.rs:5937
↓ 2 callersMethodreport_unsupported_unary_operator
( &self, unary: &ast::ExprUnaryOp, op: ast::UnaryOp, operand_type: Type<'db>,
crates/ty_python_semantic/src/types/infer/builder.rs:11567
↓ 2 callersMethodrepr
Return the repr of the symbol at runtime
crates/ty_python_semantic/src/types/known_instance.rs:580
↓ 2 callersMethodrequest_queue
(&self)
crates/ruff_server/src/session.rs:83
↓ 2 callersMethodrequest_queue_mut
(&mut self)
crates/ty_server/src/session.rs:221
↓ 2 callersMethodrequest_queue_mut
(&mut self)
crates/ruff_server/src/session.rs:87
↓ 2 callersMethodrequest_uninitialized_workspace_folder_configurations
Requests configuration for each registered but uninitialized workspace folder in this session. When all workspace folders in this session are initial
crates/ty_server/src/session.rs:890
↓ 2 callersMethodreset
Reset the cloned repository to the ref it started at.
python/ruff-ecosystem/ruff_ecosystem/projects.py:485
↓ 2 callersMethodreset
Resets the state of this binding to its initial state.
crates/ty_python_semantic/src/types/call/bind.rs:9738
↓ 2 callersMethodreset_indent
(mut self)
crates/ruff_formatter/src/printer/call_stack.rs:64
↓ 2 callersFunctionresolve_bool_arg
(yes: bool, no: bool)
crates/ruff/src/args.rs:917
↓ 2 callersFunctionresolve_configuration_with_cache
( initial_config_path: &Path, transformer: &dyn ConfigurationTransformer, origin: ConfigurationOri
crates/ruff_workspace/src/resolver.rs:350
↓ 2 callersFunctionresolve_definition_recursive
Helper function to resolve import definitions recursively.
crates/ty_python_semantic/src/types/definition_resolution.rs:619
↓ 2 callersFunctionresolve_file_open
( item: &'a ast::WithItem, with: &'a ast::StmtWith, semantic: &'a SemanticModel<'a>, read_mode
crates/ruff_linter/src/rules/refurb/helpers.rs:195
↓ 2 callersFunctionresolve_from_import_definitions
Helper function to resolve import definitions for `ImportFrom` and `StarImport` cases.
crates/ty_python_semantic/src/types/definition_resolution.rs:720
↓ 2 callersFunctionresolve_imported_definition
Resolve an import to a single source definition, leaving non-import definitions unchanged. Use the shared [`resolve_definition`] resolver to follow i
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:243
↓ 2 callersFunctionresolve_literal
Try to resolve `name` to either a string or bytes literal in `semantic`.
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:383
↓ 2 callersMethodresolve_member_entry
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:378
↓ 2 callersFunctionresolve_method_call
( func: &'a Expr, semantic: &'a SemanticModel, )
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:212
↓ 2 callersMethodresolve_name
Resolves a module name relative to the current position of this search's cursor.
crates/ty_module_resolver/src/resolve/search.rs:171
↓ 2 callersMethodresolve_root
( &self, context: &ResolverContext<'db>, name: &ModuleName, for_module_name_pr
crates/ty_module_resolver/src/resolve/search.rs:999
↓ 2 callersFunctionresolve_single_overload
Resolve overloads for a callable type using call arguments, returning the single matching signature if exactly one matches.
crates/ty_python_semantic/src/types/ide_support.rs:1197
↓ 2 callersMethodresolve_submodule
(self, db: &'db dyn Db, name: &str)
crates/ty_python_semantic/src/types.rs:12626
↓ 2 callersFunctionresolve_type_at
Returns the type of the symbol under the cursor at `offset` in `file`. If a symbol could not be found at the given offset or its type could not be in
crates/ty_ide/src/type_hierarchy.rs:92
↓ 2 callersMethodresolve_with_path
Return the appropriate [`Settings`] and config file path for a given [`Path`].
crates/ruff_workspace/src/resolver.rs:174
↓ 2 callersFunctionresolved_module_for_node
Returns the module represented by a node's inferred type, if it is a module literal.
crates/ty_ide/src/will_rename.rs:1115
↓ 2 callersMethodrespond
Sends a response to the client for a given request ID. The response isn't sent immediately. Instead, it's queued up in the main loop and checked for
crates/ruff_server/src/session/client.rs:130
↓ 2 callersMethodrespond_err
Sends an error response to the client for a given request ID. The response isn't sent immediately. Instead, it's queued up in the main loop.
crates/ty_server/src/session/client.rs:193
↓ 2 callersMethodrespond_err
Sends an error response to the client for a given request ID. The response isn't sent immediately. Instead, it's queued up in the main loop.
crates/ruff_server/src/session/client.rs:153
↓ 2 callersMethodrestore
Restore the current builder places state to the given snapshot.
crates/ty_python_core/src/use_def.rs:3207
↓ 2 callersMethodrestore
(&mut self, snapshot: ExceptionCheckpointSnapshot)
crates/ty_python_core/src/use_def/exception_checkpoint.rs:57
↓ 2 callersFunctionresult_exists
Return `true` if a function's return statement include at least one non-`None` value.
crates/ruff_linter/src/rules/flake8_return/helpers.rs:10
↓ 2 callersFunctionretain_imports
Given an import statement, remove any imports that are not specified in the `imports` slice. Returns the modified import statement.
crates/ruff_linter/src/fix/codemods.rs:148
↓ 2 callersMethodretain_keys
( &self, db: &'db dyn Db, operator: ComparisonOperator, keys: &FxHashSet<EnumC
crates/ty_python_semantic/src/types/equality/enums.rs:1081
↓ 2 callersMethodretain_successful
Filter bindings in an intersection once at least one binding succeeded. We keep successful bindings, and also keep top-callable failures. Top callabl
crates/ty_python_semantic/src/types/call/bind.rs:584
↓ 2 callersMethodretained_declarations_at_binding
(&self, binding: Definition<'db>)
crates/ty_python_core/src/use_def.rs:1337
↓ 2 callersMethodretained_support_index
(&self, id: SupportId)
crates/ty_python_semantic/src/types/constraints.rs:380
↓ 2 callersMethodrewind
Restore the token source to the given checkpoint.
crates/ruff_python_parser/src/token_source.rs:205
↓ 2 callersMethodrewind
Restore the parser to the given checkpoint.
crates/ruff_python_parser/src/parser/mod.rs:930
↓ 2 callersMethodroot
Looks up the closest root for `path`. Returns `None` if `path` isn't enclosed by any source root. Roots can be nested, in which case the closest roo
crates/ruff_db/src/files.rs:250
↓ 2 callersMethodroot_constraint
Returns the BDD variable of the root node of this BDD, or `None` if this BDD is a terminal node.
crates/ty_python_semantic/src/types/constraints.rs:2471
↓ 2 callersFunctionroot_index
(node: ast::NodeIndex)
crates/ty_python_core/src/ast_ids.rs:52
↓ 2 callersFunctionround_trip_with
Like [`round_trip`] but configure the [`Generator`] with the requested `indentation`, `line_ending` and `unparse_mode` settings.
crates/ruff_python_codegen/src/generator.rs:1661
↓ 2 callersFunctionrounded_and_ndigits
Extracts the rounded and `ndigits` values from `arguments`. Returns a tripled where the first element is the rounded value's expression, the second i
crates/ruff_linter/src/rules/ruff/rules/unnecessary_round.rs:149
↓ 2 callersMethodrule
Return the rule responsible for reporting this category of redundant condition.
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:159
↓ 2 callersMethodrule_selection
(&self, file: File)
crates/ty_test/src/db.rs:162
↓ 2 callersMethodrule_set
Returns all rules checked by this lint source. The sets are built at compile time so the linter can skip a pass when its set has no overlap with the e
crates/ruff_linter/src/registry.rs:251
↓ 2 callersFunctionrun
(preview: Option<bool>, workspace_trust: WorkspaceTrust)
crates/ruff_server/src/lib.rs:50
↓ 2 callersFunctionrun
( fixture_path: &Utf8Path, content: &str, resource_root: &str, options: ty_test::RunOptions, )
crates/ty_python_semantic/tests/mdtest.rs:44
↓ 2 callersMethodrun
(editor)
playground/ty/src/Editor/Editor.tsx:237
↓ 2 callersMethodrun
(self, db: &mut ProjectDatabase)
crates/ty/src/lib.rs:356
↓ 2 callersMethodrun
(mut self)
crates/ty_server/src/server.rs:177
↓ 2 callersMethodrun
(mut self)
crates/ruff_server/src/server.rs:131
↓ 2 callersMethodrun_action_queue
Process any actions in this printer's queue until the queue is empty.
crates/ruff_python_formatter/src/string/docstring.rs:312
↓ 2 callersFunctionrun_benchmark
( request: Any, benchmark: Any, project: Project, tool: Tool, venv: Venv, init_test: C
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:105
↓ 2 callersFunctionrun_command
Run a CLI command without reinstalling the process-wide logger and panic hook.
crates/ruff/src/lib.rs:164
↓ 2 callersMethodrun_command
(&self, mut command: Command)
crates/ruff_db/src/system/test.rs:159
← previousnext →6,801–6,900 of 31,562, ranked by callers