MCPcopy Create free account

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

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

↓ 11 callersMethodcallable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:310
↓ 11 callersMethodcell
Returns the (raw) cell number (1-based) for the given row (1-based).
crates/ruff_notebook/src/index.rs:29
↓ 11 callersFunctioncode_actions_at
( server: &TestServer, diagnostics: DocumentDiagnosticReport, file: &SystemPath, range: Range,
crates/ty_server/tests/e2e/code_actions.rs:6
↓ 11 callersMethodconstraints
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:374
↓ 11 callersMethodcontext
Return the [`LintContext`] for the current analysis. Note that you should always prefer calling methods like `settings`, `report_diagnostic`, or `is_
crates/ruff_linter/src/checkers/ast/mod.rs:684
↓ 11 callersMethodcreate_directory_all
Creates a directory at `path`. All enclosing directories are created if they don't exist.
crates/ruff_db/src/system/memory_fs.rs:324
↓ 11 callersMethoddataclass_transformer_params
(self)
crates/ty_python_semantic/src/types/class.rs:306
↓ 11 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:319
↓ 11 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:220
↓ 11 callersMethoddefinition
Returns the [`Definition`] of this function. ## Warning This uses the semantic index to find the definition of the function. This means that if the
crates/ty_python_semantic/src/types/function.rs:462
↓ 11 callersFunctiondirectory_listing
( db: &'db dyn Db, path: &SystemPath, )
crates/ruff_db/src/files/directory.rs:94
↓ 11 callersMethoddisplay
(self, python_version: PythonVersion)
crates/ty_python_semantic/src/types/class/known.rs:1230
↓ 11 callersMethodedits
Return a slice of the [`Edit`] elements in the [`Fix`], sorted by [`Edit::start`] in ascending order.
crates/ruff_diagnostics/src/fix.rs:149
↓ 11 callersMethodenv_clear
Clears the inherited environment and any variables previously set on this command.
crates/ruff_db/src/system/command.rs:49
↓ 11 callersMethodfallback_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/literal.rs:253
↓ 11 callersMethodfields
Returns a list of all annotated attributes defined in this class, or any of its superclasses. See [`StaticClassLiteral::own_fields`] for more details
crates/ty_python_semantic/src/types/class/static_literal.rs:2548
↓ 11 callersMethodfile
(&self)
crates/ty_python_semantic/src/semantic_model.rs:70
↓ 11 callersFunctionfile_system
()
crates/ty_vendored/src/lib.rs:18
↓ 11 callersMethodfile_uri
(&self, path: impl AsRef<Path>)
crates/ruff_server/tests/e2e/main.rs:666
↓ 11 callersMethodfiles
(&self)
crates/ruff_db/src/lib.rs:200
↓ 11 callersMethodfirst
(&self)
crates/ruff_linter/src/suppression.rs:188
↓ 11 callersMethodfirst_operand
Returns the initial operand (`a` in `a < b <= c`). # Panics Panics if there are no operands. The parser always produces at least two operands, synth
crates/ruff_python_ast/src/nodes.rs:112
↓ 11 callersMethodfocus_range
(&self)
crates/ty_ide/src/lib.rs:157
↓ 11 callersMethodhas_starred_annotation
Return `true` if this parameter has an unpacked variadic annotation, e.g. `*args: *Ts`, `*args: Unpack[Ts]`, or `*args: *tuple[int, *tuple[str, ...],
crates/ty_python_semantic/src/types/signatures.rs:6440
↓ 11 callersMethodheader_range
Returns the range of the class's "header". For static classes, this is the class name and any arguments passed to the `class` statement. For dynamic
crates/ty_python_semantic/src/types/class.rs:884
↓ 11 callersMethodhide_severity
Whether to hide a diagnostic's severity or not.
crates/ruff_db/src/diagnostic/mod.rs:1536
↓ 11 callersMethodhover_request
Send a `textDocument/hover` request for the document at the given path and position.
crates/ty_server/tests/e2e/main.rs:1091
↓ 11 callersMethodignore_possibly_undefined
Returns the type of the place, ignoring possible undefinedness. If the place is *definitely* undefined, this function will return `None`. Otherwise,
crates/ty_python_semantic/src/place.rs:288
↓ 11 callersMethodinferable_typevars
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/generics.rs:549
↓ 11 callersMethodinto_unfolded
(self)
crates/ty_python_semantic/src/types/recursive.rs:718
↓ 11 callersMethodis_absolute
(&self)
crates/ruff_db/src/system/path.rs:82
↓ 11 callersMethodis_assignment
(&self, expr: &Expr)
crates/ruff_linter/src/rules/pylint/helpers.rs:98
↓ 11 callersMethodis_bound
(self)
crates/ty_python_core/src/place.rs:132
↓ 11 callersFunctionis_const_true
Return `true` if an [`Expr`] is a literal `True`.
crates/ruff_python_ast/src/helpers.rs:838
↓ 11 callersFunctionis_dict
Test whether the given binding can be considered a dictionary. For this, we check what value might be associated with it through it's initialization,
crates/ruff_python_semantic/src/analyze/typing.rs:1053
↓ 11 callersFunctionis_dunder
(id: &str)
crates/ruff_python_ast/src/helpers.rs:780
↓ 11 callersMethodis_empty
(&self)
crates/mdtest/src/matcher.rs:52
↓ 11 callersMethodis_empty
Returns `true` if there are no deferred nodes.
crates/ruff_linter/src/checkers/ast/deferred.rs:20
↓ 11 callersFunctionis_keyword_only_argument_non_default
(arguments: &Arguments, name: &str)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:9
↓ 11 callersMethodis_nonlocal
Is the symbol `nonlocal` its containing scope?
crates/ty_python_core/src/symbol.rs:86
↓ 11 callersMethodis_standard_library
(&self)
crates/ty_module_resolver/src/path.rs:701
↓ 11 callersMethodis_trivially_always_satisfied
Returns `true` if this constraint set's root is the `always` terminal. This is only a cheap sufficient check. A nonterminal constraint set can also b
crates/ty_python_semantic/src/types/constraints.rs:311
↓ 11 callersMethodis_undefined
(&self)
crates/ty_python_semantic/src/place.rs:280
↓ 11 callersMethodis_vendored_path
(&self)
crates/ruff_db/src/files/path.rs:58
↓ 11 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1720
↓ 11 callersMethodjoin
Combine occurrences without discarding symbolic dependencies at `Invariant`. Only evaluation can short-circuit there: later terms can still connect a
crates/ty_python_semantic/src/types/variance/equations.rs:46
↓ 11 callersMethodjoin_comma_separated
( &'fmt mut self, sequence_end: TextSize, )
crates/ruff_python_formatter/src/builders.rs:75
↓ 11 callersMethodjoin_with
Joins the objects by placing the specified separator between every two items. ## Examples Joining different tokens by separating them with a comma a
crates/ruff_formatter/src/formatter.rs:110
↓ 11 callersMethodkind
(&self)
crates/ruff_db/src/vendored.rs:313
↓ 11 callersMethodlast_component
(&self)
crates/ty_module_resolver/src/module_name.rs:114
↓ 11 callersMethodleading_dangling_trailing
Returns an iterator over the [leading](self#leading-comments), [dangling](self#dangling-comments), and [trailing](self#trailing) comments of `node`.
crates/ruff_python_formatter/src/comments/mod.rs:364
↓ 11 callersMethodlen
(&self)
crates/ty_project/src/files.rs:215
↓ 11 callersMethodline_end
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:67
↓ 11 callersMethodmark_formatted
Marks the comment as formatted
crates/ruff_python_formatter/src/comments/mod.rs:146
↓ 11 callersMethodmatches
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/infer/builder.rs:445
↓ 11 callersMethodname
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:892
↓ 11 callersMethodnext
(&mut self)
crates/ruff_python_semantic/src/analyze/class.rs:99
↓ 11 callersMethodnormalize_path
(&self, path: &'a SystemPath)
crates/ty_test/src/db.rs:489
↓ 11 callersMethodor_fall_back_to
Fallback (wholly or partially) to `fallback` to create a new [`LookupResult`].
crates/ty_python_semantic/src/place.rs:433
↓ 11 callersMethodparameter_documentation
Extract parameter documentation from popular docstring formats. Returns a map of parameter names to their documentation.
crates/ty_ide/src/docstring.rs:39
↓ 11 callersMethodparent_statement_id
Given a [`NodeId`], return the [`NodeId`] of the parent statement, if any.
crates/ruff_python_semantic/src/model.rs:1648
↓ 11 callersFunctionparenthesized
Formats `content` enclosed by the `left` and `right` parentheses. The implementation also ensures that expanding the parenthesized expression (or any
crates/ruff_python_formatter/src/expression/parentheses.rs:109
↓ 11 callersMethodparser_version
Return the [`PythonVersion`] to use for parsing. This will be either the Python version specified by the user or the latest supported version if unse
crates/ruff_linter/src/settings/mod.rs:908
↓ 11 callersMethodpartition
(self)
crates/ruff/src/args.rs:90
↓ 11 callersMethodpath
The full path that this entry represents.
crates/ruff_db/src/system/walk_directory.rs:172
↓ 11 callersMethodqualifiers
Get qualifiers for an annotation expression.
crates/ty_python_semantic/src/types/infer.rs:1153
↓ 11 callersMethodquote
(&self)
crates/ruff_python_codegen/src/stylist.rs:23
↓ 11 callersMethodrange
(&self)
crates/ruff_python_parser/src/semantic_errors.rs:1560
↓ 11 callersMethodrestore
Restore the semantic model to the given [`Snapshot`].
crates/ruff_python_semantic/src/model.rs:2065
↓ 11 callersMethodrules
Return the rules in this category.
crates/ruff_linter/src/codes.rs:185
↓ 11 callersMethodrun
(self, username)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S602.py:34
↓ 11 callersMethodsettings
(&self)
crates/ty_test/src/db.rs:57
↓ 11 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/ruff_server/src/session/client.rs:198
↓ 11 callersMethodsignature
(&self, db: &'db dyn Db, signature: &Signature<'db>)
crates/ty_python_semantic/src/types/constraints/resolution.rs:156
↓ 11 callersMethodslice
Returns the location of the comment in the original source code. Allows retrieving the text of the comment.
crates/ruff_python_formatter/src/comments/mod.rs:137
↓ 11 callersFunctionsource_text_slice
Emits a text as it is written in the source document. Optimized to avoid allocations.
crates/ruff_formatter/src/builders.rs:376
↓ 11 callersMethodspans
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:824
↓ 11 callersMethodsubtypes
(&self)
crates/ty_ide/src/type_hierarchy.rs:752
↓ 11 callersMethodswap_remove
Remove `ty` from the collection. Returns `true` if `ty` was previously in the collection and has now been removed. Returns `false` if `ty` was never
crates/ty_python_semantic/src/types/set_theoretic.rs:883
↓ 11 callersMethodsystem
(path: impl AsRef<SystemPath>)
crates/ruff_db/src/files/path.rs:27
↓ 11 callersMethodtext_len
(self)
crates/ruff_python_ast/src/str_prefix.rs:39
↓ 11 callersMethodto_location
Converts this range into an LSP location. Returns `None` if the URI for this file couldn't be resolved.
crates/ty_server/src/document/range.rs:40
↓ 11 callersMethodto_text_size
( self, text: &str, index: &LineIndex, position_encoding: PositionEncoding,
crates/ty_wasm/src/lib.rs:1170
↓ 11 callersMethodtoken
Creates a new token that uses this source.
crates/ruff_db/src/cancellation.rs:25
↓ 11 callersMethodtoken_len
(&self)
crates/ruff_python_trivia/src/cursor.rs:77
↓ 11 callersMethodtruncate
(&mut self, a: usize)
crates/ruff_index/src/vec.rs:47
↓ 11 callersMethodtry_into_module
Attempts to convert the [`Parsed<Mod>`] into a [`Parsed<ModModule>`]. This method checks if the `syntax` field of the output is a [`Mod::Module`]. If
crates/ruff_python_parser/src/lib.rs:502
↓ 11 callersMethodtry_map
A fallible version of [`UnionType::map`]. For each element in `self`, `transform_fn` is called on that element. If `transform_fn` returns `Some()` fo
crates/ty_python_semantic/src/types/set_theoretic.rs:454
↓ 11 callersMethodunion
(self, other: TokenSet)
crates/ruff_python_parser/src/token_set.rs:20
↓ 11 callersMethodunpack_aliases
(mut self, val: bool)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:732
↓ 11 callersMethoduse_system
(&mut self, system: S)
crates/ruff_db/src/system/test.rs:98
↓ 11 callersMethodvalues
()
crates/ruff_linter/src/registry.rs:447
↓ 11 callersMethodvariadic
Return the variadic parameter (`*args`), if any, and its index, or `None`.
crates/ty_python_semantic/src/types/signatures.rs:5793
↓ 11 callersMethodvisit
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:302
↓ 11 callersFunctionwalk_specialization_types
Visit specialization arguments without walking the generic declaration.
crates/ty_python_semantic/src/types/generics.rs:1214
↓ 11 callersMethodwhen_assignable_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:613
↓ 11 callersMethodwhen_true
(self)
crates/ty_python_semantic/src/types/constraints.rs:1889
↓ 11 callersMethodwith_declared_type
(self, declared_type: Option<Type<'db>>)
crates/ty_python_semantic/src/types/infer/type_context.rs:100
↓ 11 callersMethodwith_default_type
(mut self, default: Type<'db>)
crates/ty_python_semantic/src/types/signatures.rs:6175
↓ 11 callersMethodwith_name
(self, name: impl Into<OptionCow<'a>>)
crates/ruff_annotate_snippets/src/level.rs:167
← previousnext →1,401–1,500 of 31,562, ranked by callers