Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 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:12176
↓ 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:266
↓ 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
Function
quotes_are_unremovable
Traverses the type expression and checks if the expression can safely be unquoted
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:591
↓ 2 callers
Method
r_paren_range
(&self)
crates/ruff_python_ast/src/nodes.rs:3846
↓ 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:172
↓ 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:2064
↓ 2 callers
Method
receiver_member
(&self)
crates/ty_python_semantic/src/types/attribute_write.rs:320
↓ 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:86
↓ 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:501
↓ 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:1042
↓ 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:3841
↓ 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:3850
↓ 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:1540
↓ 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:1779
↓ 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_plugins
Registers the plugins named by `module`'s `pytest_plugins` variable, in order.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:411
↓ 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:2793
↓ 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:536
↓ 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:464
↓ 2 callers
Method
remaining_member_count
Count the canonical enum members still represented by this complement.
crates/ty_python_semantic/src/types/enums.rs:771
↓ 2 callers
Method
remaining_member_names
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:764
↓ 2 callers
Method
remove
(self, item)
crates/ruff_linter/resources/test/fixtures/refurb/FURB132.py:71
↓ 2 callers
Method
remove_all
Removes all files and directories except the current working directory.
crates/ruff_db/src/system/memory_fs.rs:407
↓ 2 callers
Function
remove_covered_exclusions
Remove exclusions already covered by another union element: `A | (B & ~A) = A | B`. The coverage predicate must account for every materialization of
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:215
↓ 2 callers
Method
remove_fix
Remove the fix for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:403
↓ 2 callers
Function
remove_import_members
Remove any imports matching `members` from an import-from statement.
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:8
↓ 2 callers
Function
remove_member
Remove the member at the given index from a sequence of expressions.
crates/ruff_linter/src/fix/edits.rs:294
↓ 2 callers
Method
remove_self
( self, db: &'db dyn Db, binding_context: Option<BindingContext<'db>>, )
crates/ty_python_semantic/src/types/generics.rs:517
↓ 2 callers
Method
remove_virtual_file
(&self, path: impl AsRef<SystemVirtualPath>)
crates/ruff_db/src/system/memory_fs.rs:300
↓ 2 callers
Method
rename
( &mut self, document: &Uri, position: lsp_types::Position, new_name: &str,
crates/ty_server/tests/e2e/main.rs:995
↓ 2 callers
Method
renameRejection
()
playground/ty/src/Editor/Editor.tsx:282
↓ 2 callers
Method
render
Buffer a display once so label comparisons can reuse its text and navigation ranges.
crates/ty_python_semantic/src/types/display.rs:331
↓ 2 callers
Function
render_github_report
Render reproducers and unchecked seeds within GitHub's size limit.
python/py-fuzzer/fuzz.py:605
↓ 2 callers
Method
render_line
(&mut self, line: &str, source_indentation: usize, render_rst_links: bool)
crates/ty_ide/src/docstring/markdown/general.rs:367
↓ 2 callers
Method
render_line_with_no_link_pending
(&mut self, output: &mut String, line: Line<'_>)
crates/ty_ide/src/docstring/markdown/general/inline.rs:156
↓ 2 callers
Method
render_markdown
Renders the section as Markdown into the given buffer.
crates/ty_ide/src/docstring/markdown/structured.rs:183
↓ 2 callers
Method
render_markdown
(&self, output: &mut String)
crates/ty_ide/src/docstring/markdown/general/inline.rs:397
↓ 2 callers
Function
render_metadata
(metadata: dict[str, Any])
scripts/collect_ty_ecosystem_run_metadata.py:395
↓ 2 callers
Function
render_summary
Render a summary of all project comparisons.
scripts/memory_report.py:169
↓ 2 callers
Function
render_title
( renderer: &Renderer, buffer: &mut StyledBuffer, title: &dyn MessageOrTitle, max_line_num_len
crates/ruff_annotate_snippets/src/renderer/render.rs:319
↓ 2 callers
Function
render_with_indentation_mode
Renders normalized docstring source with the selected treatment of leading indentation. Callers must expand tabs and normalize line endings to `\n`,
crates/ty_ide/src/docstring/markdown/general.rs:75
↓ 2 callers
Method
replace_parameter_defaults
Replace default types in parameters of callables with `Unknown`.
crates/ty_python_semantic/src/types.rs:10798
↓ 2 callers
Function
replace_with_identity_check
Returns a fix that replace `range` with a generated `a is None`/`a is not None` check.
crates/ruff_linter/src/rules/refurb/helpers.rs:54
↓ 2 callers
Method
report
( &self, context: &InferContext<'db, '_>, superclass: ClassType<'db>, name: &N
crates/ty_python_semantic/src/types/overrides/attributes.rs:596
↓ 2 callers
Function
report_failed_to_converge_error
( path: &Path, transformed: &str, diagnostics: &[Diagnostic], )
crates/ruff_linter/src/linter.rs:652
↓ 2 callers
Method
report_import_not_found
( &self, range: TextRange, level: u32, module: Option<&str>, module_na
crates/ty_python_semantic/src/types/infer/builder/imports.rs:130
↓ 2 callers
Function
report_inconsistent_generic_bases
Report when separate bases contribute incompatible specializations of a generic ancestor. For example, if `A` inherits `G[int]` and `B` inherits `G[s
crates/ty_python_semantic/src/types/diagnostic.rs:5145
← previous
next →
6,801–6,900 of 31,766, ranked by callers