MCPcopy Create free account

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

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

↓ 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:2517
↓ 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:3087
↓ 2 callersFunctionreport_invalid_runtime_checkable
( context: &InferContext, node: impl Ranged, class: ClassLiteral, )
crates/ty_python_semantic/src/types/diagnostic.rs:3820
↓ 2 callersFunctionreport_invalid_type_checking_constant
(context: &InferContext, node: AnyNodeRef)
crates/ty_python_semantic/src/types/diagnostic.rs:3293
↓ 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:948
↓ 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:1815
↓ 2 callersFunctionreport_possibly_missing_attribute
( context: &InferContext, target: &ast::ExprAttribute, attribute: &str, object_ty: Type, )
crates/ty_python_semantic/src/types/diagnostic.rs:3314
↓ 2 callersMethodreport_progress
(&self, work_done: &LazyWorkDoneProgress)
crates/ty_server/src/server/api/requests/workspace_diagnostic.rs:325
↓ 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:5262
↓ 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:630
↓ 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:5932
↓ 2 callersFunctionreport_unsupported_base
( context: &InferContext, base_node: &ast::Expr, base_type: Type, class: StaticClassLiteral, )
crates/ty_python_semantic/src/types/diagnostic.rs:4577
↓ 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:5952
↓ 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:5989
↓ 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:11714
↓ 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/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:917
↓ 2 callersMethodreset
Reset the cloned repository to the ref it started at.
python/ruff-ecosystem/ruff_ecosystem/projects.py:521
↓ 2 callersMethodreset
Resets the state of this binding to its initial state.
crates/ty_python_semantic/src/types/call/bind.rs:9923
↓ 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, origin: ConfigurationOrigin<'_>, configuration_cache: Option<&Config
crates/ruff_workspace/src/resolver.rs:335
↓ 2 callersFunctionresolve_definition_recursive
Helper function to resolve import definitions recursively.
crates/ty_python_semantic/src/types/definition_resolution.rs:618
↓ 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:719
↓ 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:209
↓ 2 callersFunctionresolve_name
Given a module name and a list of search paths in which to lookup modules, attempt to resolve the module name
crates/ty_module_resolver/src/resolve.rs:1253
↓ 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:170
↓ 2 callersMethodresolve_root
( &self, context: &ResolverContext<'db>, name: &ModuleName, for_module_name_pr
crates/ty_module_resolver/src/resolve/search.rs:996
↓ 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:12702
↓ 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:136
↓ 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:1381
↓ 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/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:591
↓ 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:376
↓ 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:2400
↓ 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
(mut self)
crates/ty_server/src/server.rs:184
↓ 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
↓ 2 callersFunctionrun_executable
Run a command with a five-second timeout and classify its outcome. Return `Success` with the elapsed time for exit codes in `successful_exit_
python/py-fuzzer/fuzz.py:104
↓ 2 callersFunctionrun_multithreaded
(bencher: Bencher, benchmark: &Benchmark)
crates/ruff_benchmark/benches/ty_walltime.rs:212
↓ 2 callersFunctionrun_test
( db: &mut db::Db, fixture_paths: FixturePaths<'_>, test: &parser::MarkdownTest<'_, '_, MarkdownTe
crates/ty_test/src/lib.rs:90
↓ 2 callersMethodsame_branch
Returns `true` if `left` and `right` are in the same branches of an `if`, `match`, or `try` statement. This implementation assumes that the statement
crates/ruff_python_semantic/src/model.rs:1920
↓ 2 callersFunctionsame_enum_comparison_profile
( db: &'db dyn Db, enum_class: EnumClassLiteral<'db>, operator: ComparisonOperator, )
crates/ty_python_semantic/src/types/equality/enums.rs:1183
↓ 2 callersFunctionsame_generic_operand
Returns whether ty treats two generic aliases as the same operand of a runtime union. We approximate runtime equality with type equivalence, so `list
crates/ty_python_semantic/src/types/union_type_instance.rs:89
↓ 2 callersMethodsatisfies
Returns `true` if every element of the union contains an intersection element with a matching overload that satisfies the provided closure, or `false`
crates/ty_python_semantic/src/types/call/bind.rs:1155
↓ 2 callersMethodsatisfies_anywhere
Returns true if this symbol satisfies the given import request. This attempts to take the definition site of the symbol into account.
crates/ty_python_semantic/src/importer.rs:621
↓ 2 callersMethodsaturating_sub
(self, rhs: usize)
crates/ruff_source_file/src/line_index.rs:621
↓ 2 callersMethodscope_at
(&self, node: ast::NodeIndex)
crates/ty_python_core/src/ast_ids.rs:217
↓ 2 callersFunctionscoped_definitions_for_name
Resolves definitions in visible scopes, without falling back to implicit builtins.
crates/ty_python_semantic/src/types/definition_resolution.rs:182
↓ 2 callersFunctionscript_metadata
(db: &dyn Db, file: File)
crates/ty_project/src/script.rs:271
↓ 2 callersMethodscript_project_manager
(&self)
crates/ty_project/src/metadata/options.rs:153
↓ 2 callersFunctionscript_sync_task
(db: &dyn Db, file: File)
crates/ty_project/src/uv/environments.rs:782
↓ 2 callersFunctionscript_with_indirect_dependency
()
crates/ty/tests/cli/scripts.rs:1813
↓ 2 callersMethodscripts
(&self)
crates/ty_project/src/files.rs:219
↓ 2 callersMethodsecond
Peeks the second character from the input stream without consuming it. Returns [`EOF_CHAR`] if the position is past the end of the file.
crates/ruff_python_parser/src/lexer/cursor.rs:48
↓ 2 callersMethodseen_import_boundary
Return `true` if the model has traversed past the "top-of-file" import boundary.
crates/ruff_python_semantic/src/model.rs:2319
↓ 2 callersMethodselect_for_paramspec
Select the arguments forwarded to a `ParamSpec` sub-call. The resulting argument list preserves the order of `indices`. Unlike [`Self::start_from`],
crates/ty_python_semantic/src/types/call/arguments.rs:789
↓ 2 callersMethodselected_overloads
Returns the overloads selected for deprecation reporting without changing the matches retained for argument inference. Equivalent return types select
crates/ty_python_semantic/src/types/call/bind.rs:4673
↓ 2 callersFunctionselection_range
Returns a list of nested selection ranges, where each range contains the next one. The first range in the list is the largest range containing the cur
crates/ty_ide/src/selection_range.rs:10
↓ 2 callersMethodself_type
(&self)
crates/ty_python_semantic/src/types.rs:11647
↓ 2 callersFunctionself_typevar_origin_class_literal
Returns the class recorded in a `Self` typevar's origin.
crates/ty_python_semantic/src/types.rs:11611
↓ 2 callersMethodsemantic_syntax_errors
(&self)
crates/ty_python_core/src/lib.rs:854
↓ 2 callersFunctionsequence_from_literal_elements
Builds a literal's sequence shape from already-inferred elements and iterable shapes. In `source = (*[1, "two"],)`, expanding the list syntax preserve
crates/ty_python_semantic/src/types/unpacker.rs:680
↓ 2 callersMethodsequence_pattern_arm
Check one subject union member against the complete sequence pattern. Return the narrowed sequence and its elements when the length and every element
crates/ty_python_semantic/src/types/narrow.rs:3254
↓ 2 callersFunctionsequence_pattern_getitem_method
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, indexed_element_types: impl IntoIterator<Item =
crates/ty_python_semantic/src/types/match_pattern.rs:189
← previousnext →6,901–7,000 of 31,766, ranked by callers