MCPcopy Create free account

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

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

↓ 2 callersFunctionpython_magic_globals
Return the list of magic globals for the given Python minor version.
crates/ruff_python_stdlib/src/builtins.rs:240
↓ 2 callersMethodpython_platform
(&self)
crates/ty_test/src/config.rs:65
↓ 2 callersMethodpython_version
Returns the Python version used to parse this module.
crates/ruff_db/src/parsed.rs:193
↓ 2 callersMethodpython_version
(&mut self, version: PythonVersion)
crates/ty_ide/src/symbols.rs:3391
↓ 2 callersMethodpython_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 callersFunctionpython_version_options
(minor: u8)
crates/ty_wasm/tests/api.rs:183
↓ 2 callersFunctionqualified_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 callersFunctionqualified_name_from_name_or_attribute
Create an NFKC-normalized qualified name from a libCST node.
crates/ruff_linter/src/fix/codemods.rs:209
↓ 2 callersMethodqualifiers
Return the set of type qualifiers.
crates/ty_python_semantic/src/types.rs:12176
↓ 2 callersFunctionquery_name
(_query: &Q)
crates/ruff_db/src/testing.rs:139
↓ 2 callersFunctionquery_stdlib_version
( relative_path: &Utf8Path, context: &ResolverContext, )
crates/ty_module_resolver/src/path.rs:527
↓ 2 callersFunctionquote
()
crates/ruff_python_codegen/src/stylist.rs:266
↓ 2 callersMethodquote_char
Returns the quote character for the current f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:55
↓ 2 callersFunctionquotes_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 callersMethodr_paren_range
(&self)
crates/ruff_python_ast/src/nodes.rs:3846
↓ 2 callersMethodradix_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 callersFunctionrange
(x: ops::Range<u32>)
crates/ruff_text_size/tests/serde.rs:11
↓ 2 callersMethodrange
(&self)
crates/ruff_db/src/files.rs:698
↓ 2 callersMethodrange
(&self)
crates/ruff_python_parser/src/error.rs:47
↓ 2 callersMethodrange
(&self)
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:154
↓ 2 callersMethodrange
(&self)
crates/ruff_linter/src/rules/pylint/rules/swap_with_temporary_variable.rs:156
↓ 2 callersMethodrange_reachability
( &self, )
crates/ty_python_core/src/use_def.rs:1063
↓ 2 callersFunctionraw
()
crates/ruff_python_codegen/src/generator.rs:1994
↓ 2 callersMethodraw
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 callersFunctionraw_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 callersMethodre_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 callersMethodread_file
Reads a file from the test directory.
crates/ruff/tests/cli/main.rs:162
↓ 2 callersFunctionread_from_stdin
Read a string from `stdin`.
crates/ruff/src/stdin.rs:5
↓ 2 callersFunctionread_report
( archive_bytes: bytes, filename: str, *, max_bytes: int = MAX_REPORT_BYTES )
scripts/publish_pr_report.py:172
↓ 2 callersFunctionread_source_text
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:20
↓ 2 callersMethodread_to_string
(&self, path: &SystemPath)
crates/ty_server/src/system.rs:208
↓ 2 callersMethodread_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 callersMethodread_virtual_path_to_string
( &self, path: impl AsRef<SystemVirtualPath>, )
crates/ruff_db/src/system/memory_fs.rs:141
↓ 2 callersFunctionreadlines_in_iter
(checker: &Checker, iter_expr: &Expr)
crates/ruff_linter/src/rules/refurb/rules/readlines_in_for.rs:76
↓ 2 callersMethodrebinding_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 callersMethodreceiver_member
(&self)
crates/ty_python_semantic/src/types/attribute_write.rs:320
↓ 2 callersFunctionreceiver_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 callersMethodreconcile
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 callersMethodrecord_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 callersMethodrecord_declaration
( &mut self, place: ScopedPlaceId, declaration: Definition<'db>, )
crates/ty_python_core/src/use_def.rs:2785
↓ 2 callersMethodrecord_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 callersMethodrecord_narrowing_constraint
Add given constraint to all live bindings.
crates/ty_python_core/src/use_def/place_state.rs:483
↓ 2 callersMethodrecord_narrowing_constraint_for_places
Records a narrowing constraint for only the specified places.
crates/ty_python_core/src/use_def.rs:2460
↓ 2 callersMethodrecord_narrowing_constraint_node_for_places
Records a narrowing constraint node for the specified places.
crates/ty_python_core/src/use_def.rs:2566
↓ 2 callersMethodrecord_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 callersMethodrecord_place_definition
(&mut self, place_id: ScopedPlaceId, expr: &'ast ast::Expr)
crates/ty_python_core/src/builder.rs:1417
↓ 2 callersMethodrecord_reachability_constraint_impl
( &mut self, reachability_constraint: ScopedReachabilityConstraintId, narrowing_constr
crates/ty_python_core/src/use_def.rs:2773
↓ 2 callersMethodrecord_reference
Marks a projected node as shared once multiple paths or binding roots reach it.
crates/ty_python_semantic/src/reachability.rs:1106
↓ 2 callersMethodrecord_reference_edit
Records a module reference edit.
crates/ty_ide/src/will_rename.rs:1042
↓ 2 callersMethodrecord_use
Appends the bindings for a source use and returns its scope-local ordinal.
crates/ty_python_core/src/use_def.rs:2909
↓ 2 callersMethodrecord_use_bindings
(&mut self, bindings: Bindings)
crates/ty_python_core/src/use_def.rs:2978
↓ 2 callersMethodrecursive_type_normalized
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, cycle: &salsa::Cycle,
crates/ty_python_semantic/src/types.rs:3841
↓ 2 callersMethodrecursive_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 callersMethodreference
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, graph: RecursiveTypeG
crates/ty_python_semantic/src/types/recursive.rs:207
↓ 2 callersFunctionreferenced_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 callersFunctionreferences_for_search
( db: &dyn Db, file: ProgramFile<'_>, search: &LocalReferenceSearch<'_>, mode: ReferencesMode,
crates/ty_ide/src/references.rs:142
↓ 2 callersMethodreferences_with_include_declaration
(&self, include_declaration: bool)
crates/ty_ide/src/find_references.rs:136
↓ 2 callersFunctionrefine_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 callersFunctionreflected_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 callersMethodregister
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 callersMethodregister
Registers a new pending request.
crates/ruff_server/src/session/request_queue.rs:62
↓ 2 callersMethodregister_alias
(&mut self, from: LintName, to: &'static LintMetadata)
crates/ty_python_semantic/src/lint.rs:386
↓ 2 callersFunctionregister_lints
Register all known semantic lints.
crates/ty_python_semantic/src/lib.rs:92
↓ 2 callersMethodregister_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 callersMethodregister_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 callersMethodregistration
( &mut self, watchers: Vec<FileSystemWatcher>, paths: Vec<SystemPathBuf>, cach
crates/ty_server/src/session/file_watcher.rs:214
↓ 2 callersFunctionreimplemented_operator
FURB118
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:95
↓ 2 callersFunctionreject_registration
(server: &mut TestServer, request: RequestId)
crates/ty_server/tests/e2e/file_watching.rs:527
↓ 2 callersFunctionrelation_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 callersMethodrelation_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 callersFunctionrelative_cached_vendored_root
Get the cache-relative path where vendored paths should be written to.
crates/ty_ide/src/lib.rs:356
↓ 2 callersMethodreload
Reload the project after its metadata or settings have changed.
crates/ty_project/src/lib.rs:464
↓ 2 callersMethodremaining_member_count
Count the canonical enum members still represented by this complement.
crates/ty_python_semantic/src/types/enums.rs:771
↓ 2 callersMethodremaining_member_names
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:764
↓ 2 callersMethodremove
(self, item)
crates/ruff_linter/resources/test/fixtures/refurb/FURB132.py:71
↓ 2 callersMethodremove_all
Removes all files and directories except the current working directory.
crates/ruff_db/src/system/memory_fs.rs:407
↓ 2 callersFunctionremove_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 callersMethodremove_fix
Remove the fix for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:403
↓ 2 callersFunctionremove_import_members
Remove any imports matching `members` from an import-from statement.
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:8
↓ 2 callersFunctionremove_member
Remove the member at the given index from a sequence of expressions.
crates/ruff_linter/src/fix/edits.rs:294
↓ 2 callersMethodremove_self
( self, db: &'db dyn Db, binding_context: Option<BindingContext<'db>>, )
crates/ty_python_semantic/src/types/generics.rs:517
↓ 2 callersMethodremove_virtual_file
(&self, path: impl AsRef<SystemVirtualPath>)
crates/ruff_db/src/system/memory_fs.rs:300
↓ 2 callersMethodrename
( &mut self, document: &Uri, position: lsp_types::Position, new_name: &str,
crates/ty_server/tests/e2e/main.rs:995
↓ 2 callersMethodrenameRejection
()
playground/ty/src/Editor/Editor.tsx:282
↓ 2 callersMethodrender
Buffer a display once so label comparisons can reuse its text and navigation ranges.
crates/ty_python_semantic/src/types/display.rs:331
↓ 2 callersFunctionrender_github_report
Render reproducers and unchecked seeds within GitHub's size limit.
python/py-fuzzer/fuzz.py:605
↓ 2 callersMethodrender_line
(&mut self, line: &str, source_indentation: usize, render_rst_links: bool)
crates/ty_ide/src/docstring/markdown/general.rs:367
↓ 2 callersMethodrender_line_with_no_link_pending
(&mut self, output: &mut String, line: Line<'_>)
crates/ty_ide/src/docstring/markdown/general/inline.rs:156
↓ 2 callersMethodrender_markdown
Renders the section as Markdown into the given buffer.
crates/ty_ide/src/docstring/markdown/structured.rs:183
↓ 2 callersMethodrender_markdown
(&self, output: &mut String)
crates/ty_ide/src/docstring/markdown/general/inline.rs:397
↓ 2 callersFunctionrender_metadata
(metadata: dict[str, Any])
scripts/collect_ty_ecosystem_run_metadata.py:395
↓ 2 callersFunctionrender_summary
Render a summary of all project comparisons.
scripts/memory_report.py:169
↓ 2 callersFunctionrender_title
( renderer: &Renderer, buffer: &mut StyledBuffer, title: &dyn MessageOrTitle, max_line_num_len
crates/ruff_annotate_snippets/src/renderer/render.rs:319
↓ 2 callersFunctionrender_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 callersMethodreplace_parameter_defaults
Replace default types in parameters of callables with `Unknown`.
crates/ty_python_semantic/src/types.rs:10798
↓ 2 callersFunctionreplace_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 callersMethodreport
( &self, context: &InferContext<'db, '_>, superclass: ClassType<'db>, name: &N
crates/ty_python_semantic/src/types/overrides/attributes.rs:596
↓ 2 callersFunctionreport_failed_to_converge_error
( path: &Path, transformed: &str, diagnostics: &[Diagnostic], )
crates/ruff_linter/src/linter.rs:652
↓ 2 callersMethodreport_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 callersFunctionreport_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
← previousnext →6,801–6,900 of 31,766, ranked by callers