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
↓ 2 callers
Function
pull_types
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/pull_types.rs:13
↓ 2 callers
Method
push
(&mut self, node: AnyRootNodeRef<'ast>)
crates/ruff_db/src/parsed.rs:398
↓ 2 callers
Method
push
Push a new offset to the end of the [`CellOffsets`]. # Panics Panics if the offset is less than the last offset pushed.
crates/ruff_notebook/src/cell.rs:273
↓ 2 callers
Method
push
Extends the list of constraints used by subsequent sources.
crates/ty_python_semantic/src/place_load.rs:1422
↓ 2 callers
Method
push_additional_definition
Push a new [`Definition`] onto the list of definitions associated with the `definition_node` AST node. Most AST nodes can only be associated with at
crates/ty_python_core/src/builder.rs:1570
↓ 2 callers
Method
push_branch
Push a new branch onto the stack, returning its [`BranchId`].
crates/ruff_python_semantic/src/model.rs:1449
↓ 2 callers
Method
push_comment
(&mut self, placement: DecoratedComment<'a>)
crates/ruff_python_formatter/src/comments/visitor.rs:527
↓ 2 callers
Method
push_definition
(&mut self, db: &'db dyn Db, definition: Definition<'db>)
crates/ty_python_semantic/src/place/definitions.rs:128
↓ 2 callers
Method
push_end_marker
Push the end marker for an [`Edit`]. The `output_length` is the length of the transformed string after the edit has been applied. ## Panics If `edi
crates/ruff_diagnostics/src/source_map.rs:65
↓ 2 callers
Method
push_line
Returns `false` when `line` belongs outside this section.
crates/ty_ide/src/docstring/document/numpy.rs:253
↓ 2 callers
Method
push_line
(&mut self)
crates/ty_ide/src/docstring/document/google.rs:249
↓ 2 callers
Function
push_link_text_char
(output: &mut String, char: char)
crates/ty_ide/src/docstring/markdown/general/inline.rs:624
↓ 2 callers
Method
push_mapping
(&mut self, range: TextRange)
crates/ruff_linter/src/noqa.rs:1344
↓ 2 callers
Method
push_node
Push an AST node [`NodeRef`] onto the stack.
crates/ruff_python_semantic/src/model.rs:1412
↓ 2 callers
Method
push_scope_with_parent
(&mut self, node: NodeWithScopeRef, parent: Option<FileScopeId>)
crates/ty_python_core/src/builder.rs:514
↓ 2 callers
Method
push_start_marker
Push the start marker for an [`Edit`]. The `output_length` is the length of the transformed string before the edit is applied. ## Panics If the sta
crates/ruff_diagnostics/src/source_map.rs:53
↓ 2 callers
Method
py_slice
( &self, db: &'db dyn Db, start: Option<i32>, stop: Option<i32>, step:
crates/ty_python_semantic/src/types/tuple.rs:1107
↓ 2 callers
Method
py_slice_type
Returns a sound static slice result for a mixed tuple. We preserve fixed-length results exactly, unioning each output position when it can come from
crates/ty_python_semantic/src/types/tuple.rs:1691
↓ 2 callers
Function
py_slice_with_step
Returns a static Python slice for a known non-zero step.
crates/ty_python_semantic/src/subscript.rs:139
↓ 2 callers
Method
pydantic_metadata
(self)
crates/ty_python_semantic/src/types/class.rs:379
↓ 2 callers
Function
pytest_db_with_config_and_src_roots
( files: &[(&'static str, &'static str)], src_roots: Vec<SystemPathBuf>, config: &'sta
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3633
↓ 2 callers
Function
pytest_db_with_files
(files: &[(&'static str, &'static str)])
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3601
↓ 2 callers
Function
pytest_db_with_files_and_src_roots
( files: &[(&'static str, &'static str)], src_roots: Vec<SystemPathBuf>, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3605
↓ 2 callers
Method
python_ast
Returns a reference to the Python AST.
crates/ruff_python_semantic/src/definition.rs:284
↓ 2 callers
Method
python_file
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:88
↓ 2 callers
Method
python_len
The length of the string, as would be returned by Python's `len()`.
crates/ty_python_semantic/src/types/literal.rs:365
↓ 2 callers
Function
python_magic_globals
Return the list of magic globals for the given Python minor version.
crates/ruff_python_stdlib/src/builtins.rs:240
↓ 2 callers
Method
python_platform
(&self)
crates/ty_test/src/config.rs:65
↓ 2 callers
Method
python_version
Returns the Python version used to parse this module.
crates/ruff_db/src/parsed.rs:193
↓ 2 callers
Method
python_version
(&mut self, version: PythonVersion)
crates/ty_ide/src/symbols.rs:3391
↓ 2 callers
Method
python_version_from_layout
Tries to detect the version from the layout of the `site-packages` directory.
crates/ty_site_packages/src/lib.rs:120
↓ 2 callers
Function
python_version_options
(minor: u8)
crates/ty_wasm/tests/api.rs:183
↓ 2 callers
Function
qualified_name_components_from_scope
Returns the qualified name components for a scope, excluding the item itself. This is the shared logic used by both [`QualifiedClassName`](super::cla
crates/ty_python_semantic/src/types/display.rs:874
↓ 2 callers
Function
qualified_name_from_name_or_attribute
Create an NFKC-normalized qualified name from a libCST node.
crates/ruff_linter/src/fix/codemods.rs:209
↓ 2 callers
Method
qualifiers
Return the set of type qualifiers.
crates/ty_python_semantic/src/types.rs:12117
↓ 2 callers
Function
query_name
(_query: &Q)
crates/ruff_db/src/testing.rs:139
↓ 2 callers
Function
query_stdlib_version
( relative_path: &Utf8Path, context: &ResolverContext, )
crates/ty_module_resolver/src/path.rs:527
↓ 2 callers
Function
quote
()
crates/ruff_python_codegen/src/stylist.rs:268
↓ 2 callers
Function
quote_annotation
Wrap a type annotation in quotes. This requires more than just wrapping the reference itself in quotes. For example: - When quoting `Series` in `Seri
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:352
↓ 2 callers
Method
quote_char
Returns the quote character for the current f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:55
↓ 2 callers
Method
r_paren_range
(&self)
crates/ruff_python_ast/src/nodes.rs:3833
↓ 2 callers
Method
radix_run
Consume a sequence of numbers with the given radix, the digits can be decorated with underscores like this: '`1_2_3_4`' == '1234'
crates/ruff_python_parser/src/lexer.rs:1087
↓ 2 callers
Function
range
(x: ops::Range<u32>)
crates/ruff_text_size/tests/serde.rs:11
↓ 2 callers
Method
range
(&self)
crates/ruff_db/src/files.rs:698
↓ 2 callers
Method
range
(&self)
crates/ruff_python_parser/src/error.rs:47
↓ 2 callers
Method
range
(&self)
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:154
↓ 2 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pylint/rules/swap_with_temporary_variable.rs:156
↓ 2 callers
Method
range_reachability
( &self, )
crates/ty_python_core/src/use_def.rs:1063
↓ 2 callers
Function
raw
()
crates/ruff_python_codegen/src/generator.rs:1994
↓ 2 callers
Method
raw
Computes if a raw string uses the preferred quote. If it does, then it's not possible to change the quote style because it would require escaping whic
crates/ruff_python_formatter/src/string/normalize.rs:578
↓ 2 callers
Function
raw_applicability
( checker: &Checker, literal_range: TextRange, match_allowed_escape_sequence: impl Fn(Option<char>
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:262
↓ 2 callers
Method
re_lex_logical_token
Re-lex the [`NonLogicalNewline`] token at the given position in the context of a logical line. Returns a boolean indicating whether the lexer's posit
crates/ruff_python_parser/src/lexer.rs:1230
↓ 2 callers
Method
read_file
Reads a file from the test directory.
crates/ruff/tests/cli/main.rs:162
↓ 2 callers
Function
read_from_stdin
Read a string from `stdin`.
crates/ruff/src/stdin.rs:5
↓ 2 callers
Function
read_report
( archive_bytes: bytes, filename: str, *, max_bytes: int = MAX_REPORT_BYTES )
scripts/publish_pr_report.py:170
↓ 2 callers
Function
read_source_text
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:20
↓ 2 callers
Method
read_to_string
(&self, path: &SystemPath)
crates/ty_server/src/system.rs:208
↓ 2 callers
Method
read_to_string
Read the entire contents of the zip file at `path` into a string Returns an Err() if any of the following are true: - The path does not exist in the
crates/ruff_db/src/vendored.rs:108
↓ 2 callers
Method
read_virtual_path_to_string
( &self, path: impl AsRef<SystemVirtualPath>, )
crates/ruff_db/src/system/memory_fs.rs:141
↓ 2 callers
Function
readlines_in_iter
(checker: &Checker, iter_expr: &Expr)
crates/ruff_linter/src/rules/refurb/rules/readlines_in_for.rs:76
↓ 2 callers
Method
rebinding_scopes
Return the list of [`ScopeId`]s in which the given [`BindingId`] is rebound (i.e., declared as `global` or `nonlocal`).
crates/ruff_python_semantic/src/model.rs:2035
↓ 2 callers
Function
receiver_method_scope
Resolve the method scope that defines an implicit receiver referenced by the current scope. Returns `None` if the name is shadowed, resolves globally
crates/ty_python_semantic/src/types/annotation_target.rs:63
↓ 2 callers
Method
reconcile
Computes which paths need to be watched and returns an updated registration if there are any changes to the watched paths.
crates/ty_server/src/session/file_watcher.rs:102
↓ 2 callers
Method
record_binding_with
Record one binding while keeping aliases, captures, and lazy snapshots in sync. The callback receives the definition's place and must append that bind
crates/ty_python_core/src/builder.rs:1704
↓ 2 callers
Method
record_declaration
( &mut self, place: ScopedPlaceId, declaration: Definition<'db>, )
crates/ty_python_core/src/use_def.rs:2785
↓ 2 callers
Method
record_imported_name_edit
Records an imported name edit and any resulting bound name change. For example, renaming `pkg/old.py` to `pkg/new.py` changes the imported name `pkg.
crates/ty_ide/src/will_rename.rs:403
↓ 2 callers
Method
record_narrowing_constraint
Add given constraint to all live bindings.
crates/ty_python_core/src/use_def/place_state.rs:483
↓ 2 callers
Method
record_narrowing_constraint_for_places
Records a narrowing constraint for only the specified places.
crates/ty_python_core/src/use_def.rs:2460
↓ 2 callers
Method
record_narrowing_constraint_node_for_places
Records a narrowing constraint node for the specified places.
crates/ty_python_core/src/use_def.rs:2566
↓ 2 callers
Method
record_other_use
Records a use on a non-expression node, such as a function name or the `**kwargs` keyword in a call. These nodes can have a use ID without an explicit
crates/ty_python_core/src/ast_ids.rs:74
↓ 2 callers
Method
record_place_definition
(&mut self, place_id: ScopedPlaceId, expr: &'ast ast::Expr)
crates/ty_python_core/src/builder.rs:1417
↓ 2 callers
Method
record_reachability_constraint_impl
( &mut self, reachability_constraint: ScopedReachabilityConstraintId, narrowing_constr
crates/ty_python_core/src/use_def.rs:2773
↓ 2 callers
Method
record_reference
Marks a projected node as shared once multiple paths or binding roots reach it.
crates/ty_python_semantic/src/reachability.rs:1106
↓ 2 callers
Method
record_reference_edit
Records a module reference edit.
crates/ty_ide/src/will_rename.rs:944
↓ 2 callers
Method
record_use
Appends the bindings for a source use and returns its scope-local ordinal.
crates/ty_python_core/src/use_def.rs:2909
↓ 2 callers
Method
record_use_bindings
(&mut self, bindings: Bindings)
crates/ty_python_core/src/use_def.rs:2978
↓ 2 callers
Method
recursive_type_normalized
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, cycle: &salsa::Cycle,
crates/ty_python_semantic/src/types.rs:3842
↓ 2 callers
Method
recursive_type_normalized_impl_with_cycle
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, cycle: &salsa::Cycle,
crates/ty_python_semantic/src/types.rs:3851
↓ 2 callers
Method
recv
(self, *, length=65536)
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:981
↓ 2 callers
Method
reference
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, graph: RecursiveTypeG
crates/ty_python_semantic/src/types/recursive.rs:207
↓ 2 callers
Function
referenced_name_definition
Resolve a name to its unique reachable definition. Names parsed from a string annotation use the enclosing string's scope because they have no use sit
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:301
↓ 2 callers
Function
references_for_search
( db: &dyn Db, file: ProgramFile<'_>, search: &LocalReferenceSearch<'_>, mode: ReferencesMode,
crates/ty_ide/src/references.rs:142
↓ 2 callers
Method
references_with_include_declaration
(&self, include_declaration: bool)
crates/ty_ide/src/find_references.rs:136
↓ 2 callers
Function
refine_exact_tuple_for_sequence_pattern
Refine an exact tuple with the element types established by an exact sequence pattern. As elsewhere in tuple-pattern narrowing, this assumes that val
crates/ty_python_semantic/src/types/narrow.rs:1538
↓ 2 callers
Function
reflected_method_priority
Classifies reflected-method priority from the operands' static types. For example, an integer literal has exact runtime class `int`, so an `IntFlag`
crates/ty_python_semantic/src/types/call.rs:101
↓ 2 callers
Method
register
Registers a new workspace with the given URI and default settings for the workspace. This returns `true` when this workspace is added and `false` whe
crates/ty_server/src/session.rs:1751
↓ 2 callers
Method
register
Registers a new pending request.
crates/ruff_server/src/session/request_queue.rs:62
↓ 2 callers
Method
register_alias
(&mut self, from: LintName, to: &'static LintMetadata)
crates/ty_python_semantic/src/lint.rs:386
↓ 2 callers
Function
register_lints
Register all known semantic lints.
crates/ty_python_semantic/src/lib.rs:92
↓ 2 callers
Method
register_workspace
Register a workspace folder with the given settings. If the `workspace_settings` is [`Some`], it is preferred over the global settings for the worksp
crates/ruff_server/src/session/index.rs:416
↓ 2 callers
Method
registration
( &mut self, watchers: Vec<FileSystemWatcher>, paths: Vec<SystemPathBuf>, cach
crates/ty_server/src/session/file_watcher.rs:214
↓ 2 callers
Function
reimplemented_operator
FURB118
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:95
↓ 2 callers
Function
reject_registration
(server: &mut TestServer, request: RequestId)
crates/ty_server/tests/e2e/file_watching.rs:527
↓ 2 callers
Function
relation_directions
Returns the directional comparisons required by this comparison's polarity. A covariant comparison requires `actual <= formal`, a contravariant compa
crates/ty_python_semantic/src/types/generics.rs:2767
↓ 2 callers
Method
relation_error_context
Re-run the relation check with error context collection enabled. This is a separate method so that we can skip this expensive check when diagnostics
crates/ty_python_semantic/src/types/relation.rs:535
↓ 2 callers
Function
relative_cached_vendored_root
Get the cache-relative path where vendored paths should be written to.
crates/ty_ide/src/lib.rs:356
↓ 2 callers
Method
reload
Reload the project after its metadata or settings have changed.
crates/ty_project/src/lib.rs:463
↓ 2 callers
Method
remaining_member_count
Count the canonical enum members still represented by this complement.
crates/ty_python_semantic/src/types/enums.rs:767
↓ 2 callers
Method
remaining_member_names
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:760
↓ 2 callers
Method
remove
(self, item)
crates/ruff_linter/resources/test/fixtures/refurb/FURB132.py:71
← previous
next →
6,701–6,800 of 31,562, ranked by callers