MCPcopy Create free account

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

Functions27,349 in github.com/astral-sh/ruff

↓ 7 callersMethodnext_index
(&self)
crates/ruff_index/src/vec.rs:69
↓ 7 callersMethodnodes
(&mut self, entries: I)
crates/ruff_python_formatter/src/builders.rs:201
↓ 7 callersMethodp_delim
(&mut self, first: &mut bool, s: &str)
crates/ruff_python_codegen/src/generator.rs:234
↓ 7 callersMethodparent_statement
(&self, node_id: NodeId)
crates/ruff_python_semantic/src/model.rs:1639
↓ 7 callersMethodparse_type_annotation
Parse a stringified type annotation as an AST expression, e.g. `"List[str]"` in `x: "List[str]"` This method is a wrapper around [`ruff_python_parser
crates/ruff_linter/src/checkers/ast/mod.rs:579
↓ 7 callersMethodpath
The full path that this entry represents.
crates/ruff_db/src/system/walk_directory.rs:150
↓ 7 callersMethodpath
Returns the path to the configuration file.
crates/ty_site_packages/src/version.rs:61
↓ 7 callersFunctionpep_604_union
Format the expressions as a PEP 604-style union.
crates/ruff_python_ast/src/helpers.rs:1724
↓ 7 callersMethodprefix_len
(&self)
crates/ty_python_semantic/src/types/tuple.rs:966
↓ 7 callersMethodprimary_message
Returns the primary message for this diagnostic. A diagnostic always has a message, but it may be empty.
crates/ruff_db/src/diagnostic/mod.rs:209
↓ 7 callersMethodprimary_span_ref
Returns a reference to the primary span of this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:298
↓ 7 callersMethodproperty_decorators
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:106
↓ 7 callersMethodpush_leading
Pushes a *leading* part for `key`.
crates/ruff_python_formatter/src/comments/map.rs:72
↓ 7 callersMethodpush_marker
Push a new marker to the sourcemap. ## Panics If `offset` is less than previous markers.
crates/ruff_diagnostics/src/source_map.rs:79
↓ 7 callersMethodquery
Loads this constraint set into a new builder, invokes a callback with that builder, and returns the result. This is more efficient than [`ConstraintS
crates/ty_python_semantic/src/types/constraints.rs:279
↓ 7 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:817
↓ 7 callersMethodquote_style
(&self)
crates/ruff_python_ast/src/nodes.rs:640
↓ 7 callersMethodrange
(&self)
crates/ruff_source_file/src/newlines.rs:235
↓ 7 callersMethodrange
Returns the range of the statements comprising the basic block at the given index
crates/ruff_python_semantic/src/cfg/graph.rs:46
↓ 7 callersMethodrange
(&self)
crates/ruff_python_formatter/src/expression/expr_dict.rs:98
↓ 7 callersMethodraw_value_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:67
↓ 7 callersMethodreduce
(self)
crates/ruff_python_stdlib/src/open_mode.rs:69
↓ 7 callersMethodregister
Registers a new pending request.
crates/ty_server/src/session/request_queue.rs:62
↓ 7 callersMethodremaining_literal_types
Expand this complement to the enum literals that remain possible.
crates/ty_python_semantic/src/types/enums.rs:746
↓ 7 callersMethodreport_diagnostic
Return a [`DiagnosticGuard`] for reporting a diagnostic. The guard derefs to a [`Diagnostic`], so it can be used to further modify the diagnostic bef
crates/ruff_linter/src/checkers/ast/mod.rs:436
↓ 7 callersFunctionreport_mismatched_type_name
( context: &InferContext<'db, '_>, node: impl Ranged, constructor: &str, expected_name: &str,
crates/ty_python_semantic/src/types/diagnostic.rs:1263
↓ 7 callersMethodresolve_target_version
Resolve the [`TargetVersion`] to use for linting. This method respects the per-file version overrides in [`LinterSettings::per_file_target_version`]
crates/ruff_linter/src/settings/mod.rs:897
↓ 7 callersMethodrun
Runs the directory traversal and calls the passed `builder` to create visitors that do the visiting. The walker may run multiple threads to visit the
crates/ruff_db/src/system/walk_directory.rs:70
↓ 7 callersMethodsettings
Get the document settings associated with this query.
crates/ruff_server/src/session/index.rs:558
↓ 7 callersMethodshadowed_bindings
Returns an iterator over all bindings that the given binding shadows, including itself.
crates/ruff_python_semantic/src/scope.rs:130
↓ 7 callersMethodsingle_element
Returns the single `CallableBinding` if this is not a union or intersection.
crates/ty_python_semantic/src/types/call/bind.rs:1070
↓ 7 callersMethodskip_auto_import
When set, symbols that aren't in scope but available in the environment will NOT be included. Auto-import is enabled by default. So one must opt into
crates/ty_ide/src/completion.rs:10770
↓ 7 callersMethodskip_bytes
Skips the next `count` bytes. ## Panics - If `count` is larger than the remaining bytes in the input stream. - If `count` indexes into a multi-byte c
crates/ruff_python_parser/src/lexer/cursor.rs:162
↓ 7 callersMethodsource_text
(&self)
crates/ruff_source_file/src/lib.rs:208
↓ 7 callersFunctionspace
Return a [`ParenthesizableWhitespace`] containing a single space.
crates/ruff_linter/src/cst/helpers.rs:7
↓ 7 callersMethodspawn
(self, f: F)
crates/ty_server/src/server/schedule/thread.rs:62
↓ 7 callersMethodsub_end
(&self, amount: TextSize)
crates/ruff_text_size/src/range.rs:449
↓ 7 callersMethodsuffix_len
(&self)
crates/ty_python_semantic/src/types/tuple.rs:970
↓ 7 callersFunctionsyntax_error
()
crates/ruff_wasm/tests/api.rs:90
↓ 7 callersMethodtake_salsa_events
Takes the salsa events.
crates/ty_module_resolver/src/db.rs:75
↓ 7 callersMethodto_specialized_class_type
Look up a generic [`KnownClass`] in its canonical module and return a [`Type`] representing a specialization of that class. If the class cannot be fo
crates/ty_python_semantic/src/types/class/known.rs:1040
↓ 7 callersMethodtokens
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:511
↓ 7 callersFunctiontraverse_union
Traverse a "union" type annotation, applying `func` to each union member. Supports traversal of `Union` and `|` union expressions. The function is c
crates/ruff_python_semantic/src/analyze/typing.rs:459
↓ 7 callersMethodtry_metaclass
Return the metaclass of this class, or an error if the metaclass cannot be inferred.
crates/ty_python_semantic/src/types/class/static_literal.rs:931
↓ 7 callersMethodvariance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1086
↓ 7 callersMethodversion
Get the version of document selected by this query.
crates/ruff_server/src/session/index.rs:615
↓ 7 callersMethodvirtual_file_path
Get the path for the document selected by this query, ignoring whether the file exists on disk. Returns the URI's path if this is an unsaved (untitle
crates/ruff_server/src/session/index.rs:642
↓ 7 callersMethodvisit
( &self, db: &'db dyn Db, ty: Type<'db>, type_mapping: &TypeMapping<'_, 'db>,
crates/ty_python_semantic/src/types.rs:319
↓ 7 callersMethodvisit_body
(&mut self, body: &'a [Stmt])
crates/ruff_python_ast/src/visitor.rs:93
↓ 7 callersMethodvisit_expr
(&mut self, expr: &Expr)
crates/ty_ide/src/semantic_tokens.rs:968
↓ 7 callersMethodwhen_some_and
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, f: impl FnOn
crates/ty_python_semantic/src/types/constraints.rs:150
↓ 7 callersMethodwidth
(self)
crates/ruff_formatter/src/format_element.rs:549
↓ 7 callersFunctionwith_escaped_paths
(f: impl FnOnce() -> R)
crates/ty_project/src/metadata.rs:1114
↓ 7 callersMethodwith_library_root
Add a "library" root to this test case.
crates/ty_module_resolver/src/testing.rs:135
↓ 7 callersMethodwith_print_mode
(mut self, mode: PrintMode)
crates/ruff_formatter/src/printer/call_stack.rs:74
↓ 6 callersMethodadd_binding
Add a [`Binding`] to the current scope, bound to the given name.
crates/ruff_linter/src/checkers/ast/mod.rs:2677
↓ 6 callersMethodadd_future_import
Add a `from __future__ import annotations` import.
crates/ruff_linter/src/importer/mod.rs:551
↓ 6 callersFunctionadd_inferred_python_version_hint_to_diagnostic
Add a subdiagnostic to `diagnostic` that explains why a certain Python version was inferred. ty can infer the Python version from various sources, su
crates/ty_python_semantic/src/diagnostic/mod.rs:46
↓ 6 callersMethodadd_predicate
Adds a new predicate to the list of all predicates, but does not record it. Returns the predicate ID for later recording using [`SemanticIndexBuilder:
crates/ty_python_core/src/builder.rs:1888
↓ 6 callersMethodadd_range
Add the given folding range if it spans multiple lines.
crates/ty_ide/src/folding_range.rs:127
↓ 6 callersMethodadd_standalone_expression
Record an expression that needs to be a Salsa ingredient, because we need to infer its type standalone (type narrowing tests, RHS of an assignment.)
crates/ty_python_core/src/builder.rs:2226
↓ 6 callersMethodadd_start
(&self, amount: TextSize)
crates/ruff_text_size/src/range.rs:429
↓ 6 callersFunctionadd_type_expression_reference_link
( mut diag: LintDiagnosticGuard<'db, 'ctx>, )
crates/ty_python_semantic/src/types/diagnostic.rs:2525
↓ 6 callersFunctionadjust_indentation
Safely adjust the indentation of the indented block at [`TextRange`]. The [`TextRange`] is assumed to represent an entire indented block, including t
crates/ruff_linter/src/fix/edits.rs:429
↓ 6 callersMethodalias
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1198
↓ 6 callersFunctionall
(x)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C419_2.py:2
↓ 6 callersMethodall_end_of_scope_symbol_bindings
( &'map self, )
crates/ty_python_core/src/use_def.rs:1147
↓ 6 callersMethodanalyze_successful_pattern
Compute the subject and binding types produced by a successful pattern. `subject_ty` is the type of the value reaching this pattern node. Structural
crates/ty_python_semantic/src/types/narrow.rs:1397
↓ 6 callersMethodapply_changes
( &mut self, path: &AnySystemPath, changes: &[ChangeEvent], )
crates/ty_server/src/session.rs:411
↓ 6 callersMethodapply_configuration_files
Applies the options from the configuration files to the project's options. This includes: The user-level configuration
crates/ty_project/src/metadata.rs:325
↓ 6 callersMethodas_str
(&self)
crates/ruff_db/src/system/path.rs:376
↓ 6 callersMethodas_str
The full debug text between the `{` and the conversion / `format_spec` / `}`.
crates/ruff_python_ast/src/nodes.rs:449
↓ 6 callersMethodas_str
(self)
crates/ruff_linter/src/docstrings/sections.rs:97
↓ 6 callersMethodas_str
(self)
crates/ruff_linter/src/rules/flake8_pie/rules/reimplemented_container_builtin.rs:99
↓ 6 callersMethodas_try_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:917
↓ 6 callersMethodas_union
(self)
crates/ty_python_semantic/src/types.rs:1682
↓ 6 callersFunctionassert_file_diagnostics
(db: &TestDb, filename: &str, expected: &[&str])
crates/ty_python_semantic/src/types/infer/tests.rs:51
↓ 6 callersFunctionassert_function_query_was_run
Assert that the Salsa query described by the generic parameter `C` was executed at least once with the input `input` in the history span represented b
crates/ruff_db/src/testing.rs:80
↓ 6 callersFunctionassert_logical_lines
(contents: &str, expected: &[&str])
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:666
↓ 6 callersFunctionassert_workspace_diagnostics_suspends_for_long_polling
( server: &mut TestServer, request_id: &lsp_server::RequestId, )
crates/ty_server/tests/e2e/pull_diagnostics.rs:1435
↓ 6 callersMethodassignable_solutions_with_inferable
Calculates the [`PathBounds`] that represent the valid solutions for when `self` is constraint-set assignable to `target`.
crates/ty_python_semantic/src/types/constraints.rs:3437
↓ 6 callersMethodat_soft_keyword
Returns `true` if the parser is at a soft keyword token.
crates/ruff_python_parser/src/parser/expression.rs:132
↓ 6 callersFunctionbar
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF070.py:97
↓ 6 callersMethodbind_self
Resolves this member type and binds member-local `Self` occurrences to `self_type`.
crates/ty_python_semantic/src/types/protocol_class.rs:524
↓ 6 callersMethodbindings_at_use
(&self, use_id: ScopedUseId)
crates/ty_python_core/src/use_def.rs:889
↓ 6 callersMethodbuild
(self)
crates/ty_project/src/glob/exclude.rs:90
↓ 6 callersMethodcall
(param)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/fmtonoff5.py:52
↓ 6 callersFunctioncapture_emitter_output
( emitter: &mut dyn Emitter, diagnostics: &[Diagnostic], )
crates/ruff_linter/src/message/mod.rs:323
↓ 6 callersMethodcell_offsets
Return the [`CellOffsets`] for the concatenated source code corresponding the Jupyter notebook.
crates/ruff_notebook/src/notebook.rs:397
↓ 6 callersMethodcheck_types_impl
( &mut self, db: &'db dyn Db, constraints: &ConstraintSetBuilder<'db>, call_ar
crates/ty_python_semantic/src/types/call/bind.rs:1025
↓ 6 callersMethodclass_definition_of_method
Return the [`Definition`] of the class enclosing this method, given the method's body scope, or `None` if it is not a method.
crates/ty_python_core/src/lib.rs:495
↓ 6 callersMethodclass_member
Look up a class-level member by iterating through the MRO.
crates/ty_python_semantic/src/types/class.rs:568
↓ 6 callersMethodclass_member_with_policy
( self, db: &'db dyn Db, name: Name, policy: MemberLookupPolicy, )
crates/ty_python_semantic/src/types.rs:2729
↓ 6 callersMethodcmp
(&self, other: &Self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:612
↓ 6 callersMethodcodes_as_str
Return the suppressed codes as strings
crates/ruff_linter/src/suppression.rs:78
↓ 6 callersFunctioncollect_unused_bindings
(source: &str)
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:207
↓ 6 callersFunctioncommand
()
crates/ruff/tests/analyze_graph.rs:15
↓ 6 callersMethodconstructed_instance_type
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:47
↓ 6 callersMethodcontains_self
Returns `true` if this type contains a `Self` type variable.
crates/ty_python_semantic/src/types.rs:1128
↓ 6 callersMethodcontents
(&self)
crates/ty_server/src/document/text_document.rs:81
← previousnext →1,701–1,800 of 27,349, ranked by callers