MCPcopy Create free account

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

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

↓ 9 callersMethodinto_iter
(self)
crates/ruff/src/commands/completions/config.rs:18
↓ 9 callersMethodinto_settings
(self, client: Client)
crates/ruff_server/src/session/options.rs:70
↓ 9 callersMethodis_ambiguous
(self)
crates/ty_python_core/src/lib.rs:993
↓ 9 callersMethodis_builtin
If the first segment is empty, the `CallPath` represents a "builtin binding". A builtin binding is the binding that a symbol has if it was part of Py
crates/ruff_python_ast/src/name.rs:363
↓ 9 callersMethodis_closed
Return whether this set excludes every value not named by its representation. A whole-domain or complement representation is not closed for an enum t
crates/ty_python_semantic/src/types/equality/enums.rs:566
↓ 9 callersMethodis_context_collection_enabled
Return true if error context collection is currently enabled.
crates/ty_python_semantic/src/types/relation.rs:1830
↓ 9 callersFunctionis_dotted_name
(expr: &ast::Expr)
crates/ruff_python_ast/src/helpers.rs:1840
↓ 9 callersMethodis_eager
(&self)
crates/ty_python_core/src/scope.rs:174
↓ 9 callersMethodis_empty
(self)
crates/ty_module_resolver/src/resolve.rs:471
↓ 9 callersMethodis_function_def
(&self)
crates/ty_python_core/src/definition.rs:1007
↓ 9 callersMethodis_function_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:39
↓ 9 callersMethodis_method
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2134
↓ 9 callersMethodis_multiline
(self)
crates/ruff_python_formatter/src/other/interpolated_string.rs:24
↓ 9 callersMethodis_nonlocal
Return `true` if this [`Binding`] represents a `nonlocal`. A [`Binding`] is a `nonlocal` if it's declared by a `nonlocal` statement, or shadows a [`Bi
crates/ruff_python_semantic/src/binding.rs:83
↓ 9 callersFunctionis_pathlib_path_call
(checker: &Checker, expr: &Expr)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:15
↓ 9 callersMethodis_positional_only
Returns `true` if this is a positional-only parameter.
crates/ty_python_semantic/src/types/signatures.rs:6364
↓ 9 callersMethodis_string
(self)
crates/ty_python_semantic/src/types/literal.rs:241
↓ 9 callersMethodis_symbol
Returns `true` if the reference is a `Symbol`, otherwise `false`.
crates/ty_python_core/src/place.rs:121
↓ 9 callersMethodis_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2725
↓ 9 callersMethodis_unused
Returns `true` if the given expression is an unused variable, or consists solely of references to other unused variables. This method is conservative
crates/ruff_python_semantic/src/model.rs:1956
↓ 9 callersMethodis_used
Return `true` if this [`Binding`] is used. This method is the opposite of [`Binding::is_unused`].
crates/ruff_python_semantic/src/binding.rs:48
↓ 9 callersMethoditer_enumerated
( &self, )
crates/ty_python_core/src/use_def.rs:788
↓ 9 callersMethodkind
(&self)
crates/ruff_formatter/src/format_element/tag.rs:129
↓ 9 callersMethodleft
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1228
↓ 9 callersMethodlen
The number of bytes in the name. All names are plain ASCII, so this is also the number of Unicode codepoints and the number of graphemes.
crates/ruff_unicode_names2/src/lib.rs:130
↓ 9 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:822
↓ 9 callersFunctionlex_source
(source: &str)
crates/ruff_python_parser/src/lexer.rs:1800
↓ 9 callersMethodline_end
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:162
↓ 9 callersMethodline_index
(&self, offset: TextSize)
crates/ruff_source_file/src/lib.rs:54
↓ 9 callersMethodlint_file_with_cache
( &self, path: &str, cache: &Cache, )
crates/ruff/src/cache.rs:1059
↓ 9 callersFunctionlog
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB163.py:36
↓ 9 callersMethodlookup_attribute
Lookup a qualified attribute in the current scope. For example, given `["Class", "method"`], resolve the `BindingKind::ClassDefinition` associated wi
crates/ruff_python_semantic/src/model.rs:1098
↓ 9 callersMethodmaterialization_kind
(self)
crates/ty_python_semantic/src/types.rs:11922
↓ 9 callersMethodmetaclass
Returns the metaclass of this class.
crates/ty_python_semantic/src/types/class.rs:717
↓ 9 callersFunctionmodule
Run lint rules over a module.
crates/ruff_linter/src/checkers/ast/analyze/module.rs:8
↓ 9 callersFunctionname
Find the name of `c`, or `None` if `c` has no name. The return value is an iterator that yields `&str` components of the name successively (including
crates/ruff_unicode_names2/src/lib.rs:218
↓ 9 callersMethodname
Get the name of a type qualifier. Note that this function can only be called on sets with a single member. Panics if more than a single bit is set.
crates/ty_python_semantic/src/types.rs:12030
↓ 9 callersFunctionnearest_enclosing_class
Returns the type of the nearest enclosing class for the given scope. This function walks up the ancestor scopes starting from the given scope, and fi
crates/ty_python_semantic/src/types/infer.rs:921
↓ 9 callersFunctionnever
()
crates/ty_python_semantic/resources/corpus/88_regression_tuple_type_short_circuit.py:13
↓ 9 callersMethodnext_back
(&mut self)
crates/ruff_python_ast/src/nodes.rs:322
↓ 9 callersMethodnode_support
(&self, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1675
↓ 9 callersFunctionother
(b)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/dummy_implementations.py:7
↓ 9 callersMethodoverloads
Returns all overloads for this call binding, including overloads that did not match.
crates/ty_python_semantic/src/types/call/bind.rs:4619
↓ 9 callersMethodown_class_member
Returns the inferred type of the class member named `name`. Only bound members or those marked as `ClassVars` are considered. You must provide the `i
crates/ty_python_semantic/src/types/class.rs:1913
↓ 9 callersMethodown_fields
Returns a map of all annotated attributes defined in the body of this class. This extends the `__annotations__` attribute at runtime by also including
crates/ty_python_semantic/src/types/class/static_literal.rs:2740
↓ 9 callersMethodowner
(&self, db: &'db dyn Db, module: Module<'db>)
crates/ty_python_semantic/src/dependency.rs:234
↓ 9 callersMethodparameters
Return the parameters in this signature.
crates/ty_python_semantic/src/types/signatures.rs:1358
↓ 9 callersFunctionparse_unchecked_source
Like [`ruff_python_parser::parse_unchecked_source`], but with an explicit [`PythonVersion`] and per-cell notebook parsing. Per-cell modules are merge
crates/ruff_linter/src/linter.rs:753
↓ 9 callersMethodpath
(&self, _file: File)
crates/ruff_linter/src/message/mod.rs:139
↓ 9 callersMethodpeek
Returns the next token kind without consuming it.
crates/ruff_python_parser/src/parser/mod.rs:380
↓ 9 callersMethodprimary_span_ref
Returns a reference to the primary span of this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:334
↓ 9 callersMethodpush_error
Helper function to push the given error, updating the current range with the error location and return the [`TokenKind::Unknown`] token.
crates/ruff_python_parser/src/lexer.rs:137
↓ 9 callersMethodputs
Sets `string` with `style` for given `line`, starting from `col`. If `line` does not exist in our buffer, adds empty lines up to the given and fills t
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:87
↓ 9 callersFunctionpytest_cursor_test_builder
()
crates/ty_ide/src/find_references.rs:3229
↓ 9 callersMethodquote_style
(&self)
crates/ruff_python_formatter/src/options.rs:127
↓ 9 callersMethodrange
(&self)
crates/ruff_python_ast/src/nodes.rs:229
↓ 9 callersFunctionread
()
crates/ruff_db/src/system/memory_fs.rs:913
↓ 9 callersMethodreduce
(self)
crates/ruff_python_stdlib/src/open_mode.rs:77
↓ 9 callersFunctionresolve_assignment
Return the [`QualifiedName`] of the value to which the given [`Expr`] is assigned, if any. For example, given: ```python import asyncio loop = async
crates/ruff_python_semantic/src/analyze/typing.rs:1186
↓ 9 callersMethodresolver_environment
Returns the module-resolution environment for this program file.
crates/ty_python_core/src/program_file.rs:80
↓ 9 callersMethodright
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1232
↓ 9 callersFunctionrule
Explain a `Rule` to the user.
crates/ruff/src/commands/rule.rs:102
↓ 9 callersMethodscope
(&self, id: FileScopeId)
crates/ty_python_core/src/lib.rs:488
↓ 9 callersMethodscope_kind
(&self)
crates/ty_python_core/src/scope.rs:398
↓ 9 callersFunctionsequence_pattern_type_builder
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/match_pattern.rs:172
↓ 9 callersMethodshow_error_message
Sends a request to display an error to the client with a formatted message. The error is sent in a `window/showMessage` notification. Logs an error i
crates/ty_server/src/session/client.rs:228
↓ 9 callersMethodsite_packages_paths
( &self, system: &dyn System, )
crates/ty_site_packages/src/lib.rs:431
↓ 9 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
↓ 9 callersFunctionskip_chars
(src: str, pos: Pos, chars: Iterable[str])
crates/ruff_benchmark/resources/tomllib/_parser.py:232
↓ 9 callersMethodslot_names
Returns this class's explicit or generated slot names when they are statically known. Inherited slots are excluded; callers that need the complete la
crates/ty_python_semantic/src/types/class/slots.rs:243
↓ 9 callersFunctionsoft_line_break_or_space
()
crates/ruff_formatter/src/builders.rs:190
↓ 9 callersMethodsource_location
( &self, offset: TextSize, position_encoding: PositionEncoding, )
crates/ruff_source_file/src/lib.rs:44
↓ 9 callersMethodsource_types
The inferred type of the source expression, before unpacking its elements.
crates/ty_python_semantic/src/types/call/arguments.rs:107
↓ 9 callersMethodsys_prefix
Returns the canonical, absolute `sys.prefix` of this environment.
crates/ty_site_packages/src/lib.rs:414
↓ 9 callersMethodsystem
(&self)
crates/ty_server/src/session.rs:213
↓ 9 callersFunctiontest_helper
(source: &str, expected: usize)
crates/ruff_linter/src/rules/pylint/rules/too_many_return_statements.rs:106
↓ 9 callersFunctiontext
Creates a text from a dynamic string. This is done by allocating a new string internally.
crates/ruff_formatter/src/builders.rs:343
↓ 9 callersMethodtext_len
Returns the length of the indentation in bytes. # Panics If the indentation is longer than 4GB.
crates/ruff_python_formatter/src/string/docstring.rs:1734
↓ 9 callersMethodtruncated_display
Return a truncated snippet for user-facing display.
crates/ruff_linter/src/fix/snippet.rs:27
↓ 9 callersMethodtry_expression_type
(&self, expr: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:1078
↓ 9 callersMethodtry_set_optional_fix
( &mut self, func: impl FnOnce() -> anyhow::Result<Option<Fix>>, )
crates/ruff_linter/src/checkers/ast/mod.rs:3926
↓ 9 callersMethodtype_expression_flags
Get metadata for a type expression from the current inference result.
crates/ty_python_semantic/src/types/infer/builder.rs:1119
↓ 9 callersMethodtyping_importer
Create a [`TypingImporter`] that will import `member` from either `typing` or `typing_extensions`. On Python <`version_added_to_typing`, `member` is
crates/ruff_linter/src/checkers/ast/mod.rs:659
↓ 9 callersFunctionvisit
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, right: EnumLi
crates/ty_python_semantic/src/types/equality.rs:1138
↓ 9 callersMethodvisit_type_definition
Visit an [`Expr`], and treat it as a type definition.
crates/ruff_linter/src/checkers/ast/mod.rs:2770
↓ 9 callersFunctionwalk_pattern
(visitor: &mut V, pattern: &'a Pattern)
crates/ruff_python_ast/src/visitor.rs:754
↓ 9 callersMethodwarning
Override the output style for [warnings][crate::Level::WARNING]
crates/ruff_annotate_snippets/src/renderer/mod.rs:216
↓ 9 callersMethodwith_auto_import
(mut self, enabled: bool)
crates/ty_server/src/session/options.rs:165
↓ 9 callersMethodwith_disable_language_services
(mut self, disable_language_services: bool)
crates/ty_server/src/session/options.rs:150
↓ 9 callersMethodwith_env_var
Set an environment variable for the test server's system.
crates/ty_server/tests/e2e/main.rs:1376
↓ 9 callersMethodwith_use_uv
Configure which uv integrations the test server enables.
crates/ty_server/tests/e2e/main.rs:1369
↓ 9 callersMethodwrite_files
(&self, files: impl IntoIterator<Item = (SystemPathBuf, &'a str)>)
crates/ruff_db/src/system/os/ignore.rs:62
↓ 8 callersMethod__init__
(self, foo)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:332
↓ 8 callersMethodacknowledge_request
Acknowledge a successful server-to-client request.
crates/ty_server/tests/e2e/main.rs:618
↓ 8 callersMethodadd
Attempts to adds the given completion to this collection. When added, `true` is returned. This might not add the completion for a variety of reasons
crates/ty_ide/src/completion.rs:245
↓ 8 callersMethodadd
(x, y)
crates/ruff_linter/resources/test/fixtures/refurb/FURB118.py:47
↓ 8 callersFunctionadd_argument
Generic function to add arguments or keyword arguments to function calls. The new argument will be inserted before the first existing keyword argumen
crates/ruff_linter/src/fix/edits.rs:278
↓ 8 callersMethodadd_definition
Add a [`Definition`] associated with the `definition_node` AST node. ## Panics This method panics if `debug_assertions` are enabled and the `definit
crates/ty_python_core/src/builder.rs:1520
↓ 8 callersFunctionadd_type_expression_reference_link
( mut diag: LintDiagnosticGuard<'db, 'env>, )
crates/ty_python_semantic/src/types/diagnostic.rs:3923
↓ 8 callersMethodall_end_of_scope_symbol_bindings
( &'map self, )
crates/ty_python_core/src/use_def.rs:1438
← previousnext →1,701–1,800 of 31,562, ranked by callers