MCPcopy Create free account

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

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

↓ 3 callersMethodrange
(&self)
crates/ruff_linter/src/rules/ruff/rules/sort_dunder_slots.rs:198
↓ 3 callersMethodrange
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/invalid_escape_sequence.rs:338
↓ 3 callersMethodranges
Returns an iterator over [`TextRange`]s covered by each cell.
crates/ruff_notebook/src/cell.rs:325
↓ 3 callersFunctionraw_contents
Returns the raw contents of the string given the string's contents and flags. This is a string without the prefix and quotes.
crates/ruff_linter/src/rules/flake8_quotes/helpers.rs:6
↓ 3 callersFunctionreachable_class_literals_in_file
Enumerates the reachable class definitions in `file`.
crates/ty_python_semantic/src/types/ide_support.rs:2012
↓ 3 callersMethodreachable_member_bindings
( &self, member: ScopedMemberId, )
crates/ty_python_core/src/use_def.rs:1266
↓ 3 callersMethodreaching_definitions
Returns the definitions that may supply the value read by this use of a name. An unbound name and a name supplied by a builtin can both have an empty
crates/ty_python_semantic/src/semantic_model.rs:467
↓ 3 callersMethodread_directory
( &self, path: &SystemPath, )
crates/ruff_db/src/system/os.rs:207
↓ 3 callersMethodread_to_string
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:123
↓ 3 callersMethodreal_stdlib_directory
Return the real stdlib path (containing actual .py files, and not some variation of typeshed). See the documentation for [`real_stdlib_directory_from
crates/ty_site_packages/src/lib.rs:954
↓ 3 callersMethodreason
Return an [`StaticMroErrorKind`] variant describing why we could not resolve the MRO for this class.
crates/ty_python_semantic/src/types/mro.rs:792
↓ 3 callersMethodrecord
Records an item for ambiguity tracking. This updates the ambiguity state for items with the same name: - First occurrence: `Unambiguous` - Different
crates/ty_python_semantic/src/types/display.rs:609
↓ 3 callersMethodrecord_call_gate
(&mut self)
crates/ty_python_core/src/use_def/exception_checkpoint.rs:49
↓ 3 callersMethodrecord_definition
Records an already-created definition in the current scope. `previous_definitions` controls whether a new binding replaces earlier bindings. By defau
crates/ty_python_core/src/builder.rs:1618
↓ 3 callersMethodrecord_expression
(&mut self, expr: &impl HasTrackedScope, scope: FileScopeId)
crates/ty_python_core/src/ast_ids.rs:68
↓ 3 callersMethodrecord_expression_narrowing_constraint
( &mut self, predicate_node: &'ast ast::Expr, )
crates/ty_python_core/src/builder.rs:2191
↓ 3 callersMethodrecord_imported_qualifier
Record an import that may contribute qualifiers without declaring a type. Imports replace earlier imported qualifiers, but keep real declarations and
crates/ty_python_core/src/use_def/place_state.rs:228
↓ 3 callersMethodrecord_negated_narrowing_constraint
Negates the given predicate and then adds it as a narrowing constraint to the places that could possibly be narrowed. Takes the `ScopedPredicateId` f
crates/ty_python_core/src/builder.rs:2409
↓ 3 callersMethodrecord_range_reachability
( &mut self, range: TextRange, is_type_checking_block: bool, )
crates/ty_python_core/src/use_def.rs:3036
↓ 3 callersMethodrediscover
Rediscovers the project from `path`, while preserving applied options.
crates/ty_project/src/metadata.rs:359
↓ 3 callersMethodredundant_conditions
( &self, test: BooleanTest<'ast, 'db>, condition_context: RedundantConditionContext,
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:966
↓ 3 callersFunctionreferences
Find all references to a symbol at the given position. Search for references across all files in the project.
crates/ty_ide/src/references.rs:94
↓ 3 callersMethodreferences_typevar
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, typevar_id: TypeVarIde
crates/ty_python_semantic/src/types/typevar.rs:65
↓ 3 callersMethodregister_lint
(&mut self, lint: &'static LintMetadata)
crates/ty_python_semantic/src/lint.rs:372
↓ 3 callersMethodreject_non_alias_reference
( &mut self, ty: Type<'db>, definition: Option<Definition<'db>>, reference: &a
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:360
↓ 3 callersMethodrelative_path
Returns the relative path based on `path` and the package root. Returns `None` if `path` is not within the package.
crates/ruff/src/cache.rs:250
↓ 3 callersMethodrelativize_system_path
(&self, path: &SystemPath)
crates/ty_module_resolver/src/path.rs:753
↓ 3 callersMethodrelativize_system_path_only
( &self, path: &'a SystemPath, )
crates/ty_module_resolver/src/path.rs:762
↓ 3 callersMethodreload_files
(self, db: &mut dyn Db)
crates/ty_project/src/lib.rs:840
↓ 3 callersMethodremaining_literal_types_for_display
Expand this complement for display only if the resulting `Literal[...]` remains concise. This keeps small enum complements readable as literal groups
crates/ty_python_semantic/src/types/enums.rs:835
↓ 3 callersMethodremove
(&mut self, path: &SystemPath)
crates/ty_project/src/watch/watcher.rs:174
↓ 3 callersMethodremove_file
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:276
↓ 3 callersFunctionrender
Render Markdown for a source docstring. `source` must have already undergone PEP-257 trimming and universal newline normalization (typically via `doc
crates/ty_ide/src/docstring/markdown.rs:10
↓ 3 callersFunctionrender_diagnostics
( writer: &mut dyn Write, format: OutputFormat, config: &DisplayDiagnosticConfig, context: &Re
crates/ruff_linter/src/message/mod.rs:211
↓ 3 callersMethodrender_diagnostics
Render the given diagnostics into a `String`. See `render` for rendering a single diagnostic. (This will set the "printed" flag on `Diagnostic`.)
crates/ruff_db/src/diagnostic/render.rs:2687
↓ 3 callersFunctionrender_fragment_into
Renders a normalized, extracted docstring fragment as Markdown. Outside recognized code blocks, leading indentation remains ordinary spaces, allowing
crates/ty_ide/src/docstring/markdown/general.rs:36
↓ 3 callersFunctionrender_origin
( renderer: &Renderer, buffer: &mut StyledBuffer, max_line_num_len: usize, origin: &Origin<'_>
crates/ruff_annotate_snippets/src/renderer/render.rs:482
↓ 3 callersMethodreplacement
(self)
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:490
↓ 3 callersMethodreplaces_meaningful_content
(&self, sm: &SourceMap<'_>)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:803
↓ 3 callersMethodreport_diagnostic
(&self, context: &InferContext, condition: impl Ranged)
crates/ty_python_semantic/src/types/bool.rs:448
↓ 3 callersMethodreport_diagnostics_impl
( &self, context: &CallDiagnosticContext<'_, '_, 'db, '_>, node: ast::AnyNodeRef,
crates/ty_python_semantic/src/types/call/bind.rs:1576
↓ 3 callersFunctionreport_dynamic_mro_errors
Report MRO errors for a dynamic class. Returns `true` if the MRO is valid, `false` if there were errors.
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:256
↓ 3 callersFunctionreport_inconsistent_dynamic_generic_bases
Report conflicting specializations of the same generic base in a dynamic class's MRO. For example, `type("C", (A, B), {})` is invalid if `A` inherits
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:288
↓ 3 callersFunctionreport_invalid_key_on_typed_dict
( context: &InferContext<'db, '_>, typed_dict_node: AnyNodeRef, key_node: AnyNodeRef, typed_di
crates/ty_python_semantic/src/types/diagnostic.rs:4605
↓ 3 callersMethodreport_lint
( &'ctx self, lint: &'static LintMetadata, range: TextRange, )
crates/ty_python_semantic/src/suppression.rs:294
↓ 3 callersMethodreport_redundant_condition
( &'ctx self, condition: &RedundantCondition<'_, 'db>, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:61
↓ 3 callersMethodreport_unchecked
Reports a diagnostic without checking if the lint at the given range is suppressed or marking the suppression as used.
crates/ty_python_semantic/src/suppression.rs:309
↓ 3 callersMethodreport_undeclared_protocol_attribute
Report an undeclared protocol attribute written through a method receiver. The instance or class receiver may be referenced directly, from an eager n
crates/ty_python_semantic/src/types/infer/builder.rs:2145
↓ 3 callersMethodrequire_concrete
Ignore members that are only available through a dynamic type.
crates/ty_python_semantic/src/types.rs:1433
↓ 3 callersFunctionrequires_overload_evaluation
Returns whether overload evaluation is required for the given set of overload candidates.
crates/ty_python_semantic/src/types/call/bind.rs:648
↓ 3 callersMethodresolve
Build a `CoveringNode` whose leaf is the callee identifier and run `GotoTarget::from_covering_node`. Returns the resolved goto target and the callee's
crates/ty_ide/src/call_hierarchy.rs:161
↓ 3 callersMethodresolve
(&self, db: &'db dyn Db, index: usize)
crates/ty_python_semantic/src/types/constraints/resolution.rs:74
↓ 3 callersMethodresolve
Given a list of [`PerFile`] patterns, create a compiled set of globs. Returns an error if either of the glob patterns cannot be parsed.
crates/ruff_linter/src/settings/types.rs:787
↓ 3 callersMethodresolve_child
Resolves the given terminal component of a module name. For instance, when resolving the module `acme.tools.power`, this method should be called with
crates/ty_module_resolver/src/resolve/search.rs:287
↓ 3 callersFunctionresolve_component
Resolves one component relative to the candidate's current package.
crates/ty_module_resolver/src/resolve.rs:1494
↓ 3 callersFunctionresolve_default_files
Returns the default set of files if none are provided, otherwise returns provided files.
crates/ruff/src/lib.rs:116
↓ 3 callersMethodresolve_dunder_new_callable
Resolves a `__new__` descriptor before the constructor supplies its implicit `cls`.
crates/ty_python_semantic/src/types.rs:8020
↓ 3 callersFunctionresolve_edit_for_fix_all
( query: &DocumentQuery, client_capabilities: &ResolvedClientCapabilities, encoding: PositionEncod
crates/ruff_server/src/server/api/requests/code_action_resolve.rs:116
↓ 3 callersFunctionresolve_edit_for_organize_imports
( query: &DocumentQuery, client_capabilities: &ResolvedClientCapabilities, encoding: PositionEncod
crates/ruff_server/src/server/api/requests/code_action_resolve.rs:133
↓ 3 callersMethodresolve_file
Resolves one exact filename in this directory, validating file status, symlink targets, and typeshed availability for the configured Python version.
crates/ty_module_resolver/src/path.rs:408
↓ 3 callersFunctionresolve_file_uri_range
Attempts to resolve the location for a file and range. This includes mapping system paths back into their proper vendored path types (if applicable).
crates/ty_server/src/document/range.rs:372
↓ 3 callersFunctionresolve_real_module
Resolves a module name to a module (stubs not allowed).
crates/ty_module_resolver/src/resolve.rs:114
↓ 3 callersFunctionresolve_real_shadowable_module
Resolves a module name to a module (stubs not allowed, some shadowing is allowed). In particular, this allows `typing_extensions` to be shadowed by a
crates/ty_module_resolver/src/resolve.rs:161
↓ 3 callersFunctionresolve_slice_value
Returns an iterator over the expressions in a slice. If the slice is not a tuple, the iterator will only yield the slice.
crates/ruff_linter/src/rules/ruff/typing.rs:23
↓ 3 callersMethodresolve_target_version
Resolve the [`PythonVersion`] to use for formatting. This method respects the per-file version overrides in [`FormatterSettings::per_file_target_vers
crates/ruff_workspace/src/settings.rs:264
↓ 3 callersFunctionresolved_call_signature
Resolve a call expression to its matching overload's signature details, using full type checking (not just arity matching) for overload resolution. F
crates/ty_python_semantic/src/types/ide_support.rs:1581
↓ 3 callersFunctionresolved_condition_definition_info
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:567
↓ 3 callersFunctionrespond_silent_error
Sends back an error response to the server using a [`Client`] without showing a warning to the user.
crates/ty_server/src/server/api.rs:537
↓ 3 callersFunctionrestore
()
playground/ty/src/Editor/persist.ts:52
↓ 3 callersMethodrestriction_type
Reconstruct a constraint containing only this enum value restriction.
crates/ty_python_semantic/src/types/equality/enums.rs:633
↓ 3 callersMethodresult_type
(&self)
crates/ty_python_semantic/src/types/subscript.rs:252
↓ 3 callersMethodretained_node_index
(&self, id: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:360
↓ 3 callersFunctionreturn_type_hint_test
(source: &str)
crates/ty_ide/src/inlay_hints.rs:960
↓ 3 callersMethodrevision
(&self)
crates/ty_server/src/session.rs:1692
↓ 3 callersMethodright_operand
(self)
crates/ruff_python_formatter/src/expression/binary_like.rs:1085
↓ 3 callersMethodroot
(context: &ResolverContext<'db>, search_path: &SearchPath)
crates/ty_module_resolver/src/resolve.rs:1292
↓ 3 callersMethodroot
(&self)
crates/ruff_server/tests/e2e/main.rs:1212
↓ 3 callersMethodrule
Property violations have a dedicated rule, including incompatible writes.
crates/ty_python_semantic/src/types/overrides/attributes.rs:399
↓ 3 callersMethodrule_is_ignored
Return `true` if a [`Rule`] is disabled by a `noqa` directive.
crates/ruff_linter/src/checkers/ast/mod.rs:316
↓ 3 callersFunctionrule_name_to_code
(executable: Path)
python/ruff-ecosystem/ruff_ecosystem/projects.py:78
↓ 3 callersMethodrules
Returns rules matching the selector, taking into account rule statuses like preview and deprecated.
crates/ruff_linter/src/rule_selector.rs:270
↓ 3 callersFunctionrun
(args: Args)
crates/ruff/src/lib.rs:128
↓ 3 callersMethodrun
(self)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:258
↓ 3 callersFunctionsame_module_uncached_raw_signature
## Warning This uses the semantic index to find the definition of the function. This means that if the calling query is not in the same file as this
crates/ty_python_semantic/src/types/function.rs:1136
↓ 3 callersMethodsatisfied_path
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:3798
↓ 3 callersMethodsave
(&mut self)
crates/ruff/src/cache.rs:202
↓ 3 callersMethodschedule_one
Submits one background synchronization. Submission does not wait for queue space. Cancellation skips a job that has not started, but still produces a
crates/ty_project/src/uv/service.rs:62
↓ 3 callersFunctionscope
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E731.py:1
↓ 3 callersFunctionsearch
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, query: &impl
crates/ty_python_semantic/src/types/visitor.rs:1100
↓ 3 callersMethodsearch_path
The search path from which the module was resolved. It is guaranteed that if `None` is returned, then this is a namespace package. Otherwise, this is
crates/ty_module_resolver/src/module.rs:104
↓ 3 callersMethodsecondary_file_start
(&self)
crates/ruff_annotate_snippets/src/renderer/mod.rs:329
↓ 3 callersFunctionsecret_display
(secret_field: SecretField[Any])
crates/ruff_benchmark/resources/pydantic/types.py:500
↓ 3 callersFunctionsections
Returns recognized NumPy-style sections in source order. `source` must have already undergone PEP-257 trimming and universal newline normalization (t
crates/ty_ide/src/docstring/document/numpy.rs:113
↓ 3 callersMethodselect_return_type
Chooses the return type of a call, potentially correlating multiple compatible specializations. This method also returns a flag indicating whether th
crates/ty_python_semantic/src/types/call/bind.rs:6465
↓ 3 callersFunctionsemantic_tokens_full_for_cell
( server: &mut TestServer, cell_uri: &lsp_types::Uri, )
crates/ty_server/tests/e2e/notebook.rs:778
↓ 3 callersMethodsend_request_raw
(&self, session: &Session, request: SendRequest)
crates/ty_server/src/session/client.rs:97
↓ 3 callersMethodset_edits_for_document
Sets the edits made to a specific document. This should only be called once for each document `uri`, and will fail if this is called for the same `uri
crates/ruff_server/src/edit.rs:134
↓ 3 callersMethodset_env_vars
Sets multiple environment variable overrides.
crates/ruff_db/src/system/test.rs:59
↓ 3 callersMethodset_fixes_for_document
Sets a series of [`Fixes`] for a text or notebook document.
crates/ruff_server/src/edit.rs:116
↓ 3 callersMethodset_indent_level
(&mut self, level: IndentLevel)
crates/ruff_python_formatter/src/context.rs:69
← previousnext →4,501–4,600 of 31,562, ranked by callers