Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 6 callers
Method
iter_evidence_without_validity
( &self, source: EvidenceSource, )
crates/ty_python_semantic/src/types/constraints.rs:1974
↓ 6 callers
Method
key
(&self)
crates/ruff_python_ast/src/nodes.rs:219
↓ 6 callers
Method
key
Uses the conservative control-flow revision when the reachability arena is saturated.
crates/ty_python_core/src/use_def/exception_checkpoint.rs:77
↓ 6 callers
Function
keyword
()
crates/ruff_python_parser/resources/invalid/statements/function_type_parameters.py:11
↓ 6 callers
Method
label
(&self)
crates/ty_ide/src/completion.rs:394
↓ 6 callers
Function
leading_space
Leading space.
crates/ruff_linter/resources/test/fixtures/pydocstyle/D.py:135
↓ 6 callers
Method
len
(&self)
crates/ty_python_core/src/member.rs:704
↓ 6 callers
Method
len
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 callers
Method
len
(self)
crates/ty_python_semantic/src/types/class/typed_dict.rs:109
↓ 6 callers
Function
lex
(source: &str, mode: Mode)
crates/ruff_python_parser/src/lexer.rs:1559
↓ 6 callers
Method
line_ending
(&self)
crates/ruff_python_codegen/src/stylist.rs:27
↓ 6 callers
Function
lint_toml
( path: &Path, contents: &str, settings: &LinterSettings, source_type: TomlSourceType, )
crates/ruff_linter/src/toml.rs:26
↓ 6 callers
Method
list_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 callers
Method
mark_used
(&mut self)
crates/ty_python_core/src/symbol.rs:155
↓ 6 callers
Method
mark_verbatim_node_comments_formatted
(&self, _node: AnyNodeRef)
crates/ruff_python_formatter/src/comments/mod.rs:405
↓ 6 callers
Method
match_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 callers
Method
materialization
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, materialization_kind:
crates/ty_python_semantic/src/types.rs:2954
↓ 6 callers
Method
materialize_builtin_binding
Creates and returns a concrete binding for an unmaterialized builtin.
crates/ruff_python_semantic/src/model.rs:331
↓ 6 callers
Function
maybe_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 callers
Method
member_count
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/equality/enums.rs:551
↓ 6 callers
Method
member_names
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:374
↓ 6 callers
Method
merge
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/typevar.rs:1999
↓ 6 callers
Method
merged_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 callers
Method
metadata
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:70
↓ 6 callers
Method
module_name
(&self)
crates/ruff_linter/src/rules/isort/types.rs:65
↓ 6 callers
Method
name
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2067
↓ 6 callers
Method
name
(self)
crates/ruff_linter/src/rules/refurb/rules/math_constant.rs:126
↓ 6 callers
Method
next
(&mut self)
crates/ruff_source_file/src/newlines.rs:80
↓ 6 callers
Method
next
(&mut self)
crates/ty_python_core/src/lib.rs:905
↓ 6 callers
Method
next
(&mut self)
crates/ty_ide/src/docstring/document/syntax.rs:116
↓ 6 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:241
↓ 6 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_coding_comment.rs:150
↓ 6 callers
Method
next_token
Lex the next token.
crates/ruff_python_parser/src/lexer.rs:144
↓ 6 callers
Method
normalize
Computes the strings preferred quotes and normalizes its content.
crates/ruff_python_formatter/src/string/normalize.rs:237
↓ 6 callers
Function
normalize_whitespace
(s: &str)
crates/ruff_annotate_snippets/src/renderer/render.rs:2618
↓ 6 callers
Method
notify_skipped_lazy_type_attributes
(&self)
crates/ty_python_semantic/src/types/constraints.rs:1322
↓ 6 callers
Method
open_files
Returns the open files in the project.
crates/ty_project/src/lib.rs:656
↓ 6 callers
Method
open_text_document_with_language_id
Send a `textDocument/didOpen` notification with the specified language id.
crates/ruff_server/tests/e2e/main.rs:700
↓ 6 callers
Method
own_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 callers
Method
own_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 callers
Method
p_id
(&mut self, s: &Identifier)
crates/ruff_python_codegen/src/generator.rs:181
↓ 6 callers
Function
pad_start
Like [`pad_expression`], but only pads the start of the expression.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:354
↓ 6 callers
Method
parse
Parse the `pyvenv.cfg` file and return the parsed data.
crates/ty_site_packages/src/lib.rs:1112
↓ 6 callers
Method
parse_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 callers
Method
path
(&self, file: File)
crates/ruff_db/src/diagnostic/render.rs:745
↓ 6 callers
Method
path
(&self)
crates/ruff_workspace/src/resolver.rs:790
↓ 6 callers
Method
position
(&self)
crates/ruff_python_parser/src/string.rs:121
↓ 6 callers
Function
prepare
Sends a `textDocument/prepareTypeHierarchy` request.
crates/ty_server/tests/e2e/type_hierarchy.rs:161
↓ 6 callers
Method
primary
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 callers
Method
primary_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 callers
Method
program
(&self)
crates/ty_python_semantic/src/semantic_model.rs:82
↓ 6 callers
Method
program
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1857
↓ 6 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/constraints/resolution.rs:167
↓ 6 callers
Method
project_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 callers
Method
projects
(&self)
crates/ty_server/src/session.rs:1668
↓ 6 callers
Method
ptr_eq
Compares two any node refs by their pointers (referential equality).
crates/ruff_python_ast/src/node.rs:575
↓ 6 callers
Function
py38_typeshed_test_case
(typeshed: MockedTypeshed)
crates/ty_module_resolver/src/path.rs:1262
↓ 6 callers
Method
py_index
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, index: i32, )
crates/ty_python_semantic/src/types/tuple.rs:1094
↓ 6 callers
Function
pytest_cursor_test
(source: &str)
crates/ty_ide/src/find_references.rs:3223
↓ 6 callers
Method
quote_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 callers
Method
range
Returns the range of the unpack target expression.
crates/ty_python_core/src/unpack.rs:84
↓ 6 callers
Method
range
(&self)
crates/ty_ide/src/symbols.rs:681
↓ 6 callers
Method
raw_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 callers
Method
reachable_declarations
(&self, place: ScopedPlaceId)
crates/ty_python_core/src/use_def.rs:1390
↓ 6 callers
Method
record
(&self, content: DynamicContent)
crates/ty_python_semantic/src/types/visitor.rs:519
↓ 6 callers
Method
record_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 callers
Method
record_declaration
Record a newly-encountered declaration for this place.
crates/ty_python_core/src/use_def/place_state.rs:207
↓ 6 callers
Method
record_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 callers
Method
record_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 callers
Method
reduce_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 callers
Method
relative_to
(&self, parent: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:211
↓ 6 callers
Function
rename_edit
(server: &mut TestServer, renames: &[(&str, &str)])
crates/ty_server/tests/e2e/will_rename_files.rs:251
↓ 6 callers
Function
render
(renderer: &Renderer, groups: Report<'_>)
crates/ruff_annotate_snippets/src/renderer/render.rs:29
↓ 6 callers
Method
rendering_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 callers
Method
report
(&mut self, diagnostic: AssignmentAttributeWriteDiagnostic<'db>)
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:1003
↓ 6 callers
Method
report_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 callers
Method
report_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 callers
Method
required
(mut self, yes: bool)
crates/ty_python_semantic/src/types/typed_dict.rs:3320
↓ 6 callers
Function
resolve_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 callers
Function
resolve_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 callers
Method
respond
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 callers
Method
result_from_equality
(self, equal: bool)
crates/ty_python_semantic/src/types/equality.rs:1847
↓ 6 callers
Method
return_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:324
↓ 6 callers
Method
save_text_document
Send a `textDocument/didSave` notification
crates/ty_server/tests/e2e/main.rs:928
↓ 6 callers
Method
scope
Returns the scope in which `node` is defined (handles string annotations).
crates/ty_python_semantic/src/semantic_model.rs:399
↓ 6 callers
Function
script_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 callers
Method
scripts_to_synchronize
Returns the scripts whose uv environments need preparing at startup or after a reload.
crates/ty_project/src/lib.rs:831
↓ 6 callers
Function
section_block
(items: Vec<SectionItem>)
crates/ty_ide/src/docstring/markdown/structured.rs:1057
↓ 6 callers
Method
section_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 callers
Method
section_name_range
The absolute range of the section name
crates/ruff_linter/src/docstrings/sections.rs:349
↓ 6 callers
Method
segments
(&self)
crates/ty_python_core/src/member.rs:186
↓ 6 callers
Function
send_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 callers
Method
set_included_paths
(&mut self, paths: Vec<SystemPathBuf>)
crates/ty/tests/file_watching.rs:435
↓ 6 callers
Method
setup_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 callers
Method
size_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 callers
Method
solutions_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 callers
Method
source_overload_index_raw
(&self)
crates/ty_python_semantic/src/types/signatures.rs:2533
↓ 6 callers
Method
spawn
(self, f: F)
crates/ruff_server/src/server/schedule/thread.rs:62
↓ 6 callers
Method
src
(&self)
crates/ty_project/src/metadata/settings.rs:51
↓ 6 callers
Method
stack_size
(self, size: usize)
crates/ty_server/src/server/schedule/thread.rs:55
← previous
next →
2,401–2,500 of 31,562, ranked by callers