MCPcopy Create free account

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

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

↓ 6 callersMethoditer_evidence_without_validity
( &self, source: EvidenceSource, )
crates/ty_python_semantic/src/types/constraints.rs:1974
↓ 6 callersMethodkey
(&self)
crates/ruff_python_ast/src/nodes.rs:219
↓ 6 callersMethodkey
Uses the conservative control-flow revision when the reachability arena is saturated.
crates/ty_python_core/src/use_def/exception_checkpoint.rs:77
↓ 6 callersFunctionkeyword
()
crates/ruff_python_parser/resources/invalid/statements/function_type_parameters.py:11
↓ 6 callersMethodlabel
(&self)
crates/ty_ide/src/completion.rs:394
↓ 6 callersFunctionleading_space
Leading space.
crates/ruff_linter/resources/test/fixtures/pydocstyle/D.py:135
↓ 6 callersMethodlen
(&self)
crates/ty_python_core/src/member.rs:704
↓ 6 callersMethodlen
Return the type of `len()` on a type if it is known more precisely than `int`, or `None` otherwise. In the second case, the return type of `len()` in
crates/ty_python_semantic/src/types.rs:6894
↓ 6 callersMethodlen
(self)
crates/ty_python_semantic/src/types/class/typed_dict.rs:109
↓ 6 callersFunctionlex
(source: &str, mode: Mode)
crates/ruff_python_parser/src/lexer.rs:1559
↓ 6 callersMethodline_ending
(&self)
crates/ruff_python_codegen/src/stylist.rs:27
↓ 6 callersFunctionlint_toml
( path: &Path, contents: &str, settings: &LinterSettings, source_type: TomlSourceType, )
crates/ruff_linter/src/toml.rs:26
↓ 6 callersMethodlist_modules
Lists the modules immediately available at the cursor's current position. In order to prevent cycles that might occur during recursive enumeration (i
crates/ty_module_resolver/src/resolve/search.rs:216
↓ 6 callersMethodmark_used
(&mut self)
crates/ty_python_core/src/symbol.rs:155
↓ 6 callersMethodmark_verbatim_node_comments_formatted
(&self, _node: AnyNodeRef)
crates/ruff_python_formatter/src/comments/mod.rs:405
↓ 6 callersMethodmatch_maybe_stringized_annotation
Apply a test to an annotation expression, abstracting over the fact that the annotation expression might be "stringized". A stringized annotation is
crates/ruff_linter/src/checkers/ast/mod.rs:611
↓ 6 callersMethodmaterialization
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, materialization_kind:
crates/ty_python_semantic/src/types.rs:2954
↓ 6 callersMethodmaterialize_builtin_binding
Creates and returns a concrete binding for an unmaterialized builtin.
crates/ruff_python_semantic/src/model.rs:331
↓ 6 callersFunctionmaybe_parenthesize_expression
Wraps an expression in optional parentheses except if its [`NeedsParentheses::needs_parentheses`] implementation indicates that it is okay to omit the
crates/ruff_python_formatter/src/expression/mod.rs:324
↓ 6 callersMethodmember_count
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/equality/enums.rs:551
↓ 6 callersMethodmember_names
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:374
↓ 6 callersMethodmerge
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/typevar.rs:1999
↓ 6 callersMethodmerged_specialization_with
Project the merged inference result into a specialization with explicit handling for each type variable. Alternatives are merged before applying defau
crates/ty_python_semantic/src/types/generics.rs:2624
↓ 6 callersMethodmetadata
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:70
↓ 6 callersMethodmodule_name
(&self)
crates/ruff_linter/src/rules/isort/types.rs:65
↓ 6 callersMethodname
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2067
↓ 6 callersMethodname
(self)
crates/ruff_linter/src/rules/refurb/rules/math_constant.rs:126
↓ 6 callersMethodnext
(&mut self)
crates/ruff_source_file/src/newlines.rs:80
↓ 6 callersMethodnext
(&mut self)
crates/ty_python_core/src/lib.rs:905
↓ 6 callersMethodnext
(&mut self)
crates/ty_ide/src/docstring/document/syntax.rs:116
↓ 6 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:241
↓ 6 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_coding_comment.rs:150
↓ 6 callersMethodnext_token
Lex the next token.
crates/ruff_python_parser/src/lexer.rs:144
↓ 6 callersMethodnormalize
Computes the strings preferred quotes and normalizes its content.
crates/ruff_python_formatter/src/string/normalize.rs:237
↓ 6 callersFunctionnormalize_whitespace
(s: &str)
crates/ruff_annotate_snippets/src/renderer/render.rs:2618
↓ 6 callersMethodnotify_skipped_lazy_type_attributes
(&self)
crates/ty_python_semantic/src/types/constraints.rs:1322
↓ 6 callersMethodopen_files
Returns the open files in the project.
crates/ty_project/src/lib.rs:656
↓ 6 callersMethodopen_text_document_with_language_id
Send a `textDocument/didOpen` notification with the specified language id.
crates/ruff_server/tests/e2e/main.rs:700
↓ 6 callersMethodown_instance_member
Look up an instance member defined directly on this class (not inherited). `NamedTuple` fields are exposed via synthesized descriptors on the class r
crates/ty_python_semantic/src/types/class/named_tuple.rs:301
↓ 6 callersMethodown_synthesized_member
Returns the type of a synthesized dataclass member like `__init__` or `__lt__`, or a synthesized `__new__` method for a `NamedTuple`.
crates/ty_python_semantic/src/types/class/static_literal.rs:1797
↓ 6 callersMethodp_id
(&mut self, s: &Identifier)
crates/ruff_python_codegen/src/generator.rs:181
↓ 6 callersFunctionpad_start
Like [`pad_expression`], but only pads the start of the expression.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:354
↓ 6 callersMethodparse
Parse the `pyvenv.cfg` file and return the parsed data.
crates/ty_site_packages/src/lib.rs:1112
↓ 6 callersMethodparse_binary_expression_or_higher
Parses a binary expression using the [Pratt parsing algorithm]. [Pratt parsing algorithm]: https://matklad.github.io/2020/04/13/simple-but-powerful-p
crates/ruff_python_parser/src/parser/expression.rs:245
↓ 6 callersMethodpath
(&self, file: File)
crates/ruff_db/src/diagnostic/render.rs:745
↓ 6 callersMethodpath
(&self)
crates/ruff_workspace/src/resolver.rs:790
↓ 6 callersMethodposition
(&self)
crates/ruff_python_parser/src/string.rs:121
↓ 6 callersFunctionprepare
Sends a `textDocument/prepareTypeHierarchy` request.
crates/ty_server/tests/e2e/type_hierarchy.rs:161
↓ 6 callersMethodprimary
Create a "primary" annotation. A primary annotation is meant to highlight the "locus" of a diagnostic. That is, it should point to something in the e
crates/ruff_db/src/diagnostic/mod.rs:819
↓ 6 callersMethodprimary_annotation_mut
Returns a mutable borrow of the "primary" annotation of this diagnostic if one exists. When there are multiple primary annotations, then the first on
crates/ruff_db/src/diagnostic/mod.rs:308
↓ 6 callersMethodprogram
(&self)
crates/ty_python_semantic/src/semantic_model.rs:82
↓ 6 callersMethodprogram
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1857
↓ 6 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/constraints/resolution.rs:167
↓ 6 callersMethodproject_db_mut
Returns a mutable reference to the project's [`ProjectDatabase`] in which the given `path` belongs. Refer to [`project_db`] for more details on how t
crates/ty_server/src/session.rs:488
↓ 6 callersMethodprojects
(&self)
crates/ty_server/src/session.rs:1668
↓ 6 callersMethodptr_eq
Compares two any node refs by their pointers (referential equality).
crates/ruff_python_ast/src/node.rs:575
↓ 6 callersFunctionpy38_typeshed_test_case
(typeshed: MockedTypeshed)
crates/ty_module_resolver/src/path.rs:1262
↓ 6 callersMethodpy_index
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, index: i32, )
crates/ty_python_semantic/src/types/tuple.rs:1094
↓ 6 callersFunctionpytest_cursor_test
(source: &str)
crates/ty_ide/src/find_references.rs:3223
↓ 6 callersMethodquote_str
A `str` representation of the quotes used to start and close. This does not include any prefixes the string has in its opener.
crates/ruff_python_ast/src/nodes.rs:991
↓ 6 callersMethodrange
Returns the range of the unpack target expression.
crates/ty_python_core/src/unpack.rs:84
↓ 6 callersMethodrange
(&self)
crates/ty_ide/src/symbols.rs:681
↓ 6 callersMethodraw_signature
Typed internally-visible "raw" signature for this function. That is, the return types of async functions are not wrapped in `CoroutineType[...]`. The
crates/ty_python_semantic/src/types/function.rs:614
↓ 6 callersMethodreachable_declarations
(&self, place: ScopedPlaceId)
crates/ty_python_core/src/use_def.rs:1390
↓ 6 callersMethodrecord
(&self, content: DynamicContent)
crates/ty_python_semantic/src/types/visitor.rs:519
↓ 6 callersMethodrecord_binding
Record a binding and update imported qualifiers according to `imported_qualifier_action`. Ordinary bindings preserve imported qualifiers. Imports rep
crates/ty_python_core/src/use_def.rs:2369
↓ 6 callersMethodrecord_declaration
Record a newly-encountered declaration for this place.
crates/ty_python_core/src/use_def/place_state.rs:207
↓ 6 callersMethodrecord_narrowing_constraint
Adds and records a narrowing constraint for only the places that could possibly be narrowed. Returns the `ScopedPredicateId` for the positive predica
crates/ty_python_core/src/builder.rs:2351
↓ 6 callersMethodrecord_reachability_constraint
Record a constraint that affects the reachability of the current position in the semantic index analysis. For example, if we encounter a `if test:` br
crates/ty_python_core/src/builder.rs:2599
↓ 6 callersMethodreduce_inferable
Reduces the set of inferable typevars for this constraint set. You provide the typevars that were inferable when this constraint set was created, and
crates/ty_python_semantic/src/types/constraints.rs:818
↓ 6 callersMethodrelative_to
(&self, parent: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:211
↓ 6 callersFunctionrename_edit
(server: &mut TestServer, renames: &[(&str, &str)])
crates/ty_server/tests/e2e/will_rename_files.rs:251
↓ 6 callersFunctionrender
(renderer: &Renderer, groups: Report<'_>)
crates/ruff_annotate_snippets/src/renderer/render.rs:29
↓ 6 callersMethodrendering_sort_key
Returns a key that can be used to sort two diagnostics into the canonical order in which they should appear when rendered.
crates/ruff_db/src/diagnostic/mod.rs:355
↓ 6 callersMethodreport
(&mut self, diagnostic: AssignmentAttributeWriteDiagnostic<'db>)
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:1003
↓ 6 callersMethodreport_custom_diagnostic
Return a [`DiagnosticGuard`] for reporting a diagnostic, with its fix title deferred. Prefer [`Checker::report_diagnostic`] unless you need to attach
crates/ruff_linter/src/checkers/ast/mod.rs:480
↓ 6 callersMethodreport_invalid_type_expression
( &self, expression: impl Ranged, message: impl std::fmt::Display, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:259
↓ 6 callersMethodrequired
(mut self, yes: bool)
crates/ty_python_semantic/src/types/typed_dict.rs:3320
↓ 6 callersFunctionresolve_module_for_import_from
Resolves the module referenced by a `from` import statement. Returns `None` if the statement does not name a valid module or the module cannot be res
crates/ty_module_resolver/src/resolve.rs:85
↓ 6 callersFunctionresolve_real_module_confident
Resolves a module name to a module, without desperate resolution available (stubs not allowed). This is appropriate for resolving a `KnownModule`, or
crates/ty_module_resolver/src/resolve.rs:135
↓ 6 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/ty_server/src/session/client.rs:174
↓ 6 callersMethodresult_from_equality
(self, equal: bool)
crates/ty_python_semantic/src/types/equality.rs:1847
↓ 6 callersMethodreturn_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:324
↓ 6 callersMethodsave_text_document
Send a `textDocument/didSave` notification
crates/ty_server/tests/e2e/main.rs:928
↓ 6 callersMethodscope
Returns the scope in which `node` is defined (handles string annotations).
crates/ty_python_semantic/src/semantic_model.rs:399
↓ 6 callersFunctionscript_environment
Returns the Salsa input representing `file`'s script environment. The CLI and language server normally synchronize the script's virtual environment b
crates/ty_project/src/uv/environments.rs:105
↓ 6 callersMethodscripts_to_synchronize
Returns the scripts whose uv environments need preparing at startup or after a reload.
crates/ty_project/src/lib.rs:831
↓ 6 callersFunctionsection_block
(items: Vec<SectionItem>)
crates/ty_ide/src/docstring/markdown/structured.rs:1057
↓ 6 callersMethodsection_name
The name of the section as it appears in the docstring, e.g. "Args" or "Returns".
crates/ruff_linter/src/docstrings/sections.rs:335
↓ 6 callersMethodsection_name_range
The absolute range of the section name
crates/ruff_linter/src/docstrings/sections.rs:349
↓ 6 callersMethodsegments
(&self)
crates/ty_python_core/src/member.rs:186
↓ 6 callersFunctionsend_workspace_diagnostic_request
Sends a workspace diagnostic request to the server. Unlike [`TestServer::workspace_diagnostic_request`], this function does not wait for the response
crates/ty_server/tests/e2e/pull_diagnostics.rs:1548
↓ 6 callersMethodset_included_paths
(&mut self, paths: Vec<SystemPathBuf>)
crates/ty/tests/file_watching.rs:435
↓ 6 callersMethodsetup_expression_cache
Setup a shared expression cache for multi-inference. Returns `false` if the expression cache was already initialized.
crates/ty_python_semantic/src/types/infer/builder.rs:1012
↓ 6 callersMethodsize_hint
Returns the minimum and maximum length of this tuple. (The maximum length will be `None` for a tuple with a variable-length portion.)
crates/ty_python_semantic/src/types/tuple.rs:60
↓ 6 callersMethodsolutions_with
Computes solutions using a caller-provided selector within the given projection budget. The selector receives the typevar's variance and explicit low
crates/ty_python_semantic/src/types/constraints/projection.rs:147
↓ 6 callersMethodsource_overload_index_raw
(&self)
crates/ty_python_semantic/src/types/signatures.rs:2533
↓ 6 callersMethodspawn
(self, f: F)
crates/ruff_server/src/server/schedule/thread.rs:62
↓ 6 callersMethodsrc
(&self)
crates/ty_project/src/metadata/settings.rs:51
↓ 6 callersMethodstack_size
(self, size: usize)
crates/ty_server/src/server/schedule/thread.rs:55
← previousnext →2,401–2,500 of 31,562, ranked by callers