MCPcopy Create free account

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

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

↓ 1 callersMethodreport_mixed_string_literal_error
(&mut self, strings: &[StringType], range: TextRange)
crates/ruff_python_parser/src/parser/expression.rs:1498
↓ 1 callersMethodreport_module_getattr_import_diagnostic
Reports a failed module `__getattr__` call on a `from` import. Imports defer this diagnostic until they have ruled out a real submodule: ```python f
crates/ty_python_semantic/src/types.rs:1018
↓ 1 callersFunctionreport_named_tuple_field_with_leading_underscore
( context: &InferContext<'db, '_>, class: StaticClassLiteral<'db>, field_name: &str, field_def
crates/ty_python_semantic/src/types/diagnostic.rs:4806
↓ 1 callersFunctionreport_namedtuple_field_without_default_after_field_with_default
( context: &InferContext<'db, '_>, class: StaticClassLiteral<'db>, (field, field_def): (&str, Opti
crates/ty_python_semantic/src/types/diagnostic.rs:4757
↓ 1 callersFunctionreport_overridden_final_method
( context: &InferContext<'db, '_>, member: &str, subclass_definition: Definition<'db>, // N.B.
crates/ty_python_semantic/src/types/diagnostic.rs:5580
↓ 1 callersFunctionreport_overridden_final_variable
( context: &InferContext<'db, '_>, member: &str, subclass_definition: Definition<'db>, supercl
crates/ty_python_semantic/src/types/diagnostic.rs:5765
↓ 1 callersFunctionreport_pep695_function_legacy_typevar
( context: &InferContext<'db, '_>, typevar: TypeVarInstance<'db>, range: TextRange, )
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:331
↓ 1 callersFunctionreport_possibly_unresolved_reference
( context: &InferContext, expr_name_node: &ast::ExprName, )
crates/ty_python_semantic/src/types/diagnostic.rs:3302
↓ 1 callersMethodreport_redundant_length_comparison
( &self, test: &ast::Expr, test_subexpression: &ast::Expr, subexpression_type:
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:878
↓ 1 callersFunctionreport_run
(comment: dict[str, Any])
scripts/publish_pr_report.py:278
↓ 1 callersFunctionreport_runtime_check_against_non_runtime_checkable_protocol
( context: &InferContext, call: &ast::ExprCall, protocol: ProtocolClass, function: KnownFuncti
crates/ty_python_semantic/src/types/diagnostic.rs:3985
↓ 1 callersFunctionreport_runtime_check_against_typed_dict
( context: &InferContext, call: &ast::ExprCall, class: ClassLiteral, function: KnownFunction,
crates/ty_python_semantic/src/types/diagnostic.rs:4071
↓ 1 callersMethodreport_semantic_error
(&self, error: SemanticSyntaxError)
crates/ruff_python_parser/tests/fixtures.rs:640
↓ 1 callersFunctionreport_slice_step_size_zero
(context: &InferContext, node: AnyNodeRef)
crates/ty_python_semantic/src/types/diagnostic.rs:1839
↓ 1 callersFunctionreport_subclass_of_class_with_non_callable_init_subclass
( context: &InferContext<'db, '_>, call_error: CallError<'db>, class: StaticClassLiteral<'db>,
crates/ty_python_semantic/src/types/diagnostic.rs:6299
↓ 1 callersFunctionreport_too_many_positional_patterns_for_class_pattern
( context: &InferContext, first_excess_pattern: T, positional_limit: usize, positional_count:
crates/ty_python_semantic/src/types/diagnostic.rs:3941
↓ 1 callersFunctionreport_typed_dict_field_override
( context: &InferContext<'db, '_>, class: StaticClassLiteral<'db>, field_name: &str, reason: &
crates/ty_python_semantic/src/types/infer/builder/post_inference/typed_dict.rs:472
↓ 1 callersFunctionreport_undeclared_protocol_attribute
( context: &InferContext, target: &ast::ExprAttribute, protocol_class: ProtocolClass, )
crates/ty_python_semantic/src/types/diagnostic.rs:4361
↓ 1 callersFunctionreport_undeclared_protocol_member
( context: &InferContext, definition: Definition, protocol_class: ProtocolClass, class_symbol_
crates/ty_python_semantic/src/types/diagnostic.rs:4275
↓ 1 callersFunctionreport_undefined_reveal
(context: &InferContext, name: &ast::ExprName)
crates/ty_python_semantic/src/types/diagnostic.rs:3420
↓ 1 callersMethodreport_unresolved_reference
(&self, expr_name_node: &ast::ExprName)
crates/ty_python_semantic/src/types/infer/builder.rs:11147
↓ 1 callersFunctionreport_unsound_assignment
Report an assignment whose value is not a subtype of its declared type.
crates/ty_python_semantic/src/types/diagnostic.rs:2429
↓ 1 callersFunctionreport_unsound_return
( context: &InferContext, object_range: impl Ranged, return_type_range: impl Ranged, expected_
crates/ty_python_semantic/src/types/diagnostic.rs:2996
↓ 1 callersFunctionreport_unsound_yield
( context: &InferContext, yield_value: impl Ranged, kind: YieldKind, return_type_span: Option<
crates/ty_python_semantic/src/types/diagnostic.rs:3147
↓ 1 callersFunctionreport_unsupported_comparison
( context: &InferContext<'db, '_>, error: &UnsupportedComparisonError<'db>, range: TextRange,
crates/ty_python_semantic/src/types/diagnostic.rs:5819
↓ 1 callersFunctionrepository_file
(repository: str, path: str, revision: str)
scripts/collect_ty_ecosystem_run_metadata.py:333
↓ 1 callersMethodrepr
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:10881
↓ 1 callersMethodrepresentation
( self, db: &'db dyn Db, env: &'env ProgramEnvironment<'db>, settings: Display
crates/ty_python_semantic/src/types/display.rs:764
↓ 1 callersFunctionrequest
Processes a request from the client to the server. The LSP specification requires that each request has exactly one response. Therefore, it's crucial
crates/ty_server/src/server/api.rs:32
↓ 1 callersFunctionrequest
Processes a request from the client to the server. The LSP specification requires that each request has exactly one response. Therefore, it's crucial
crates/ruff_server/src/server/api.rs:47
↓ 1 callersFunctionrequest
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC210.py:61
↓ 1 callersFunctionrequest_check
(sender: &crossbeam_channel::Sender<()>)
crates/ty/src/lib.rs:991
↓ 1 callersFunctionrequest_with_no_cert_validation
S501
crates/ruff_linter/src/rules/flake8_bandit/rules/request_with_no_cert_validation.rs:52
↓ 1 callersFunctionrequest_without_timeout
S113
crates/ruff_linter/src/rules/flake8_bandit/rules/request_without_timeout.rs:61
↓ 1 callersFunctionrequired_typeddict_key
Return a synthesized `TypedDict` that represents safe subscript access for a present key on a `TypedDict`-containing type. For `TypedDict`s, a positi
crates/ty_python_semantic/src/types/narrow.rs:5649
↓ 1 callersMethodrequires_default_inference
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13280
↓ 1 callersMethodrequires_lazy_evaluation
( &self, db: &'db dyn Db, checker: &TypeRelationChecker<'_, '_, 'db>, )
crates/ty_python_semantic/src/types/signatures.rs:782
↓ 1 callersMethodrequires_member_import
( &self, module: Option<String>, name: String, as_name: Option<String>,
crates/ruff_linter/src/rules/isort/settings.rs:82
↓ 1 callersMethodrequires_module_import
(&self, name: String, as_name: Option<String>)
crates/ruff_linter/src/rules/isort/settings.rs:76
↓ 1 callersMethodrequires_one_argument
Return `true` if this type qualifier requires exactly one argument when used in a type expression.
crates/ty_python_semantic/src/types/special_form.rs:1096
↓ 1 callersMethodrequiring_keyword
Requires the caller to supply an override for a keyword bound by a partial.
crates/ty_python_semantic/src/types/signatures.rs:2259
↓ 1 callersMethodreserve_bindings
Reserves capacity for at least `additional` more bindings.
crates/ruff_python_semantic/src/scope.rs:88
↓ 1 callersMethodreserve_loop_header
(&mut self)
crates/ty_python_core/src/use_def.rs:2304
↓ 1 callersMethodreset_unstaged
Reverts any unstaged changes and reverts the source text of `file` to the last staged changed or its original content.
crates/ty_python_semantic/src/fixes.rs:643
↓ 1 callersMethodreset_usage_count
Reset the usage count for the group name by the given value. This function is called when there is a `continue`, `break`, or `return` statement.
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:110
↓ 1 callersMethodresolve
(&self, preview: PreviewMode)
crates/ruff_workspace/src/configuration.rs:97
↓ 1 callersMethodresolve
Resolve the [`CollectedImport`] into a [`FilePath`].
crates/ruff_graph/src/resolver.rs:35
↓ 1 callersMethodresolve
Resolves the loaded value, calling `visit` once per source as it is evaluated. The visitor can inspect or narrow the source before the resolver merge
crates/ty_python_semantic/src/place_load.rs:94
↓ 1 callersMethodresolve_applicability
(&self, fix: &Fix)
crates/ruff_linter/src/checkers/ast/mod.rs:3911
↓ 1 callersMethodresolve_bindings
(&self, bindings: BindingWithConstraintsIterator<'_, 'db>)
crates/ty_python_semantic/src/place_load.rs:214
↓ 1 callersFunctionresolve_bool_arg
(yes: bool, no: bool)
crates/ty/src/args.rs:564
↓ 1 callersFunctionresolve_bytes_literal
Try to resolve `name` to an [`ExprBytesLiteral`] in `semantic`.
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:394
↓ 1 callersFunctionresolve_configuration
Recursively resolve a [`Configuration`] from a `pyproject.toml` file at the specified [`Path`].
crates/ruff_workspace/src/resolver.rs:327
↓ 1 callersMethodresolve_del
Resolve a `del` reference to `symbol` at `range`.
crates/ruff_python_semantic/src/model.rs:462
↓ 1 callersMethodresolve_enclosing_scopes
( &mut self, )
crates/ty_python_semantic/src/place_load.rs:636
↓ 1 callersFunctionresolve_enum_method
Resolves a user-defined method without falling through an opaque binding to the known default.
crates/ty_python_semantic/src/types/enums.rs:1611
↓ 1 callersMethodresolve_exports
(self)
crates/ty_python_core/src/re_exports.rs:85
↓ 1 callersFunctionresolve_file_module_with_filter
( directory: &ModuleDirectory, resolver_state: &ResolverContext, name: &str, filter: Component
crates/ty_module_resolver/src/resolve.rs:1619
↓ 1 callersFunctionresolve_from_import_submodule_definitions
Helper to resolve `from x.y import z` assuming `x.y.z` is a module.
crates/ty_python_semantic/src/types/definition_resolution.rs:800
↓ 1 callersMethodresolve_global
Resolves a load that has reached the module's explicit global scope. An eager nested scope uses the global snapshot captured when it began, so a clas
crates/ty_python_semantic/src/place_load.rs:792
↓ 1 callersMethodresolve_load
Resolve a `load` reference to an [`ast::ExprName`].
crates/ruff_python_semantic/src/model.rs:485
↓ 1 callersMethodresolve_module
Resolves a module name to a module.
crates/ruff_graph/src/resolver.rs:111
↓ 1 callersMethodresolve_module_type
Resolve the given import made in this file to a Type
crates/ty_python_semantic/src/semantic_model.rs:169
↓ 1 callersMethodresolve_nested_reference_scope
Finds the nearest visible ancestor scope that actually owns a local binding for `name`.
crates/ty_python_core/src/builder.rs:871
↓ 1 callersMethodresolve_preview
(self)
crates/ruff/src/args.rs:640
↓ 1 callersMethodresolve_qualified_import_name
Given a `module` and `member`, return the fully-qualified name of the binding in the current scope, if it exists. E.g., given: ```python from sys im
crates/ruff_python_semantic/src/model.rs:1317
↓ 1 callersFunctionresolve_reachable_definitions
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, symbol_name: &str, definitions: impl IntoIte
crates/ty_python_semantic/src/types/definition_resolution.rs:568
↓ 1 callersMethodresolve_real_module
Resolves a module name to a module (stubs not allowed).
crates/ruff_graph/src/resolver.rs:125
↓ 1 callersFunctionresolve_requires_python_lower_bound
( requires_python: &RangedValue<VersionSpecifiers>, )
crates/ty_project/src/metadata/pyproject.rs:72
↓ 1 callersFunctionresolve_script_program_settings
( db: &dyn Db, options: &Options, context: OptionsContext<'_>, project_name: &str, file: F
crates/ty_project/src/script.rs:322
↓ 1 callersFunctionresolve_search_paths
Resolve module search paths for the given source roots and Python environment.
crates/ruff_graph/src/db.rs:42
↓ 1 callersMethodresolve_source
Evaluates one source of a place load's value without expression-specific narrowing.
crates/ty_python_semantic/src/place_load.rs:153
↓ 1 callersFunctionresolve_src
Given a list of source paths, which could include glob patterns, resolve the matching paths.
crates/ruff_workspace/src/configuration.rs:1416
↓ 1 callersFunctionresolve_string_literal
Try to resolve `name` to an [`ExprStringLiteral`] in `semantic`.
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:414
↓ 1 callersFunctionresolve_stub_package_in_search_path
( context: &ResolverContext<'db>, search_path: &SearchPath, stub_name: &str, )
crates/ty_module_resolver/src/resolve.rs:1438
↓ 1 callersMethodresolve_submodule
Given a `BindingId`, return the `BindingId` of the submodule import that it aliases.
crates/ruff_python_semantic/src/model.rs:1112
↓ 1 callersFunctionresolve_typevar_reference
Resolves a reference to a type variable that must already be bound. Unlike [`bind_typevar`], this function never introduces a binding in the current
crates/ty_python_semantic/src/types/generics.rs:124
↓ 1 callersMethodresolve_value
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, value: ProtocolPropert
crates/ty_python_semantic/src/types/protocol_class.rs:1715
↓ 1 callersMethodresolve_workspace_trust
(self)
crates/ruff/src/args.rs:632
↓ 1 callersMethodresolver_environment
The resolver environment used to resolve this module.
crates/ty_module_resolver/src/module.rs:58
↓ 1 callersMethodresolver_environment
(self, db: &'db dyn Db)
crates/ty_module_resolver/src/module_name.rs:517
↓ 1 callersMethodresolver_file
Returns the existing resolver key or materializes one when required.
crates/ty_module_resolver/src/module_name.rs:529
↓ 1 callersMethodrespect_gitignore
(&self)
crates/ruff_workspace/src/resolver.rs:101
↓ 1 callersFunctionrespond_silent_error
Sends back an error response to the server using a [`Client`] without showing a warning to the user.
crates/ruff_server/src/server/api.rs:340
↓ 1 callersFunctionrestore
()
playground/ruff/src/Editor/settings.ts:90
↓ 1 callersMethodrestore
(&mut self, snapshot: BindingSnapshot<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:9871
↓ 1 callersFunctionrestoreFilters
()
docs/js/rule-filters.js:2
↓ 1 callersFunctionrestoreLocal
()
playground/ty/src/Editor/persist.ts:85
↓ 1 callersFunctionrestoreLocal
()
playground/ruff/src/Editor/settings.ts:118
↓ 1 callersFunctionrestoreWorkspace
( session: PlaygroundSession, state: { files: { [name: string]: string }; current: string; },
playground/ty/src/Playground.tsx:792
↓ 1 callersMethodrestore_snapshot
(&mut self, snapshot: BufferSnapshot)
crates/ruff_formatter/src/buffer.rs:163
↓ 1 callersMethodrestore_snapshot
(&mut self, snapshot: BufferSnapshot)
crates/ruff_formatter/src/formatter.rs:249
↓ 1 callersMethodrestore_subject
Replace all subject-aliasing contributions with one restored subject type. Contributions for extracted values remain unchanged.
crates/ty_python_semantic/src/types/narrow.rs:391
↓ 1 callersMethodrestrict
Restricts this specialization to only include the typevars in a generic context. If the specialization does not include all of those typevars, returns
crates/ty_python_semantic/src/types/generics.rs:1336
↓ 1 callersMethodrestrict_for_equality
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, operator: ComparisonO
crates/ty_python_semantic/src/types/equality/enums.rs:853
↓ 1 callersMethodrestrict_gradual_solution
Restricts the range of a gradual solution by the upper bounds inferred for this constraint. Returns `None` if constructing an intersection exceeds the
crates/ty_python_semantic/src/types/constraints.rs:3538
↓ 1 callersMethodresult_id
Computes the result ID for the diagnostics. The result ID is `None` if there are no diagnostics or hints.
crates/ty_server/src/server/api/diagnostics.rs:95
↓ 1 callersMethodresume_if_revision_changed
(self, current_revision: u64, client: &Client)
crates/ty_server/src/session.rs:1909
↓ 1 callersMethodresume_unwind
(self)
crates/ruff_db/src/panic.rs:39
↓ 1 callersMethodretain_place_state
( &mut self, bindings: &Bindings, declarations: Declarations, )
crates/ty_python_core/src/use_def.rs:463
← previousnext →12,901–13,000 of 31,766, ranked by callers